From 4455e2b1c80cd0838d8883b18022e5bafdf2d1f4 Mon Sep 17 00:00:00 2001 From: Xi Pardee Date: Mon, 24 Jun 2024 13:32:13 -0700 Subject: platform/x86:intel/pmc: Move pmc assignment closer to first usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move pmc variable assignment closer to the conditional statement of its first use for better readability. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20240624203218.2428475-5-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen --- drivers/platform/x86/intel/pmc/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/platform') 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; -- cgit v1.2.3