diff options
| author | Xi Pardee <[email protected]> | 2024-06-24 20:32:13 +0000 |
|---|---|---|
| committer | Ilpo Järvinen <[email protected]> | 2024-07-08 07:43:35 +0000 |
| commit | 4455e2b1c80cd0838d8883b18022e5bafdf2d1f4 (patch) | |
| tree | fe4bd9c6db995bdd3d6bf044bc0008b5fe34cf49 /drivers/platform/x86/intel/pmc | |
| parent | platform/x86:intel/pmc: Convert index variables to be unsigned (diff) | |
| download | kernel-4455e2b1c80cd0838d8883b18022e5bafdf2d1f4.tar.gz kernel-4455e2b1c80cd0838d8883b18022e5bafdf2d1f4.zip | |
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]>
Diffstat (limited to 'drivers/platform/x86/intel/pmc')
| -rw-r--r-- | drivers/platform/x86/intel/pmc/core.c | 3 |
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; |
