Skip to content

Commit eb2fd9b

Browse files
Tom Rixjwrdegoede
authored andcommitted
platform/x86/intel: pmc/core: change pmc_lpm_modes to static
Sparse reports this issue core.c: note: in included file: core.h:239:12: warning: symbol 'pmc_lpm_modes' was not declared. Should it be static? Global variables should not be defined in headers. This only works because core.h is only included by core.c. Single file use variables should be static, so change its storage-class specifier to static. Signed-off-by: Tom Rix <[email protected]> Reviewed-by: David E. Box <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
1 parent 00dd3ac commit eb2fd9b

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ enum ppfear_regs {
236236
#define ADL_LPM_STATUS_LATCH_EN_OFFSET 0x1704
237237
#define ADL_LPM_LIVE_STATUS_OFFSET 0x1764
238238

239-
const char *pmc_lpm_modes[] = {
239+
static const char *pmc_lpm_modes[] = {
240240
"S0i2.0",
241241
"S0i2.1",
242242
"S0i2.2",

0 commit comments

Comments
 (0)