summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorXi Pardee <xi.pardee@linux.intel.com>2024-06-24 13:32:13 -0700
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2024-07-08 10:43:35 +0300
commit4455e2b1c80cd0838d8883b18022e5bafdf2d1f4 (patch)
treefe4bd9c6db995bdd3d6bf044bc0008b5fe34cf49 /drivers/platform
parenta57a94d185004013e05734ffb626b0341742f9fb (diff)
platform/x86:intel/pmc: Move pmc assignment closer to first usage
Move pmc variable assignment closer to the conditional statement of its first use for better readability. Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com> Link: https://lore.kernel.org/r/20240624203218.2428475-5-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/intel/pmc/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
index 68b1c8c3bf98..fdf2859daeaa 100644
--- a/drivers/platform/x86/intel/pmc/core.c
+++ b/drivers/platform/x86/intel/pmc/core.c
@@ -621,9 +621,10 @@ static int pmc_core_ltr_show(struct seq_file *s, void *unused)
unsigned int i, index, ltr_index = 0;
for (i = 0; i < ARRAY_SIZE(pmcdev->pmcs); ++i) {
- struct pmc *pmc = pmcdev->pmcs[i];
+ struct pmc *pmc;
const struct pmc_bit_map *map;
+ pmc = pmcdev->pmcs[i];
if (!pmc)
continue;