mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David E. Box" <david.e.box@linux.intel.com>
To: Tom Rix <trix@redhat.com>,
	irenic.rajneesh@gmail.com, david.e.box@intel.com,
	hdegoede@redhat.com, markgross@kernel.org
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] platform/x86/intel: pmc/core: change pmc_lpm_modes to static
Date: Mon, 25 Apr 2022 07:10:28 -0700	[thread overview]
Message-ID: <ccc214492fb66bfec88a9aec516e4cbeff80eb99.camel@linux.intel.com> (raw)
In-Reply-To: <20220423123048.591405-1-trix@redhat.com>

On Sat, 2022-04-23 at 08:30 -0400, Tom Rix wrote:
> 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>

Thanks

> ---
>  drivers/platform/x86/intel/pmc/core.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/intel/pmc/core.h
> b/drivers/platform/x86/intel/pmc/core.h
> index a46d3b53bf61..7a059e02c265 100644
> --- a/drivers/platform/x86/intel/pmc/core.h
> +++ b/drivers/platform/x86/intel/pmc/core.h
> @@ -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",


  reply	other threads:[~2022-04-25 14:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-23 12:30 Tom Rix
2022-04-25 14:10 ` David E. Box [this message]
2022-04-27 14:44 ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ccc214492fb66bfec88a9aec516e4cbeff80eb99.camel@linux.intel.com \
    --to=david.e.box@linux.intel.com \
    --cc=david.e.box@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=irenic.rajneesh@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®