Skip to content

Commit

Permalink
platform/x86/intel: pmc/core: change pmc_lpm_modes to static
Browse files Browse the repository at this point in the history
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 <trix@redhat.com>
Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20220423123048.591405-1-trix@redhat.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  • Loading branch information
Tom Rix authored and Hans de Goede committed Apr 27, 2022
1 parent 20b5ec3 commit b4e74f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/intel/pmc/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ enum ppfear_regs {
#define ADL_LPM_STATUS_LATCH_EN_OFFSET 0x1704
#define ADL_LPM_LIVE_STATUS_OFFSET 0x1764

const char *pmc_lpm_modes[] = {
static const char *pmc_lpm_modes[] = {
"S0i2.0",
"S0i2.1",
"S0i2.2",
Expand Down

0 comments on commit b4e74f6

Please sign in to comment.