public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Tom Rix <trix@redhat.com>
Cc: philipp.g.hortmann@gmail.com, dragan.m.cvetic@gmail.com,
	wjsota@gmail.com, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8192e: set dm_rx_path_sel_table storage-class-specifier to static
Date: Sat, 11 Feb 2023 17:40:22 +0100	[thread overview]
Message-ID: <Y+fE9kpVMdcW6EZ1@kroah.com> (raw)
In-Reply-To: <20230211152856.2129062-1-trix@redhat.com>

On Sat, Feb 11, 2023 at 07:28:56AM -0800, Tom Rix wrote:
> smatch reports
> drivers/staging/rtl8192e/rtl8192e/rtl_dm.c:147:21:
>   warning: symbol 'dm_rx_path_sel_table' was not declared. Should it be static?
> 
> dm_rx_path_sel_table is only used in rtl_dm.c, so it should be static
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>  drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
> index d8455b23e555..3bc5dabf2e2c 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
> @@ -144,7 +144,7 @@ const u8 dm_cck_tx_bb_gain_ch14[CCK_TX_BB_GAIN_TABLE_LEN][8] = {
>  /*------------------------Define global variable-----------------------------*/
>  struct dig_t dm_digtable;
>  
> -struct drx_path_sel dm_rx_path_sel_table;
> +static struct drx_path_sel dm_rx_path_sel_table;

So now you have a local variable in the chunk that says "global
variable" :(

Please always be aware of the context of the code you are changing.

thanks,

greg k-h

      reply	other threads:[~2023-02-11 16:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-11 15:28 [PATCH] staging: rtl8192e: set dm_rx_path_sel_table storage-class-specifier to static Tom Rix
2023-02-11 16:40 ` Greg KH [this message]

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=Y+fE9kpVMdcW6EZ1@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=dragan.m.cvetic@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=philipp.g.hortmann@gmail.com \
    --cc=trix@redhat.com \
    --cc=wjsota@gmail.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