Skip to content

Commit 4455e2b

Browse files
xpardee-createij-intel
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent a57a94d commit 4455e2b

File tree

1 file changed

+2
-1
lines changed
  • drivers/platform/x86/intel/pmc

1 file changed

+2
-1
lines changed

drivers/platform/x86/intel/pmc/core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,10 @@ static int pmc_core_ltr_show(struct seq_file *s, void *unused)
621621
unsigned int i, index, ltr_index = 0;
622622

623623
for (i = 0; i < ARRAY_SIZE(pmcdev->pmcs); ++i) {
624-
struct pmc *pmc = pmcdev->pmcs[i];
624+
struct pmc *pmc;
625625
const struct pmc_bit_map *map;
626626

627+
pmc = pmcdev->pmcs[i];
627628
if (!pmc)
628629
continue;
629630

0 commit comments

Comments
 (0)