All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8192e: set dm_rx_path_sel_table storage-class-specifier to static
@ 2023-02-11 15:28 Tom Rix
  2023-02-11 16:40 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-02-11 15:28 UTC (permalink / raw)
  To: gregkh, philipp.g.hortmann, dragan.m.cvetic, wjsota
  Cc: linux-staging, linux-kernel, Tom Rix

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;
 /*------------------------Define global variable-----------------------------*/
 
 
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: rtl8192e: set dm_rx_path_sel_table storage-class-specifier to static
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2023-02-11 16:40 UTC (permalink / raw)
  To: Tom Rix
  Cc: philipp.g.hortmann, dragan.m.cvetic, wjsota, linux-staging, linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-11 16:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.