Search Linux Wireless

Re: [PATCH] iwlegacy: 4965-rs: remove three unused variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alexander Vorwerk <alexander.vorwerk@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> The following warnings showed up when compiling with W=1.
> 
> drivers/net/wireless/intel/iwlegacy/4965-rs.c: In function ‘il4965_rs_stay_in_table’:
> drivers/net/wireless/intel/iwlegacy/4965-rs.c:1636:18: warning: variable ‘il’ set but not used [-Wunused-but-set-variable]
>   struct il_priv *il;
>                   ^~
> drivers/net/wireless/intel/iwlegacy/4965-rs.c: In function ‘il4965_rs_alloc_sta’:
> drivers/net/wireless/intel/iwlegacy/4965-rs.c:2257:18: warning: variable ‘il’ set but not used [-Wunused-but-set-variable]
>   struct il_priv *il;
>                   ^~
> drivers/net/wireless/intel/iwlegacy/4965-rs.c: In function ‘il4965_rs_sta_dbgfs_scale_table_write’:
> drivers/net/wireless/intel/iwlegacy/4965-rs.c:2535:18: warning: variable ‘il’ set but not used [-Wunused-but-set-variable]
>   struct il_priv *il;
>                   ^~
> 
> Fixing by removing the variables.
> 
> Signed-off-by: Alexander Vorwerk <alexander.vorwerk@xxxxxxxxxxxxxxxxxxxxxx>

Please compile test your patches:

In file included from drivers/net/wireless/intel/iwlegacy/4965-rs.c:22:
drivers/net/wireless/intel/iwlegacy/4965-rs.c: In function 'il4965_rs_stay_in_table':
drivers/net/wireless/intel/iwlegacy/common.h:2927:32: error: 'il' undeclared (first use in this function); did you mean 'i'?
 2927 |         if (il_get_debug_level(il) & level)                             \
      |                                ^~
drivers/net/wireless/intel/iwlegacy/common.h:3043:33: note: in expansion of macro 'IL_DBG'
 3043 | #define D_RATE(f, a...)         IL_DBG(IL_DL_RATE, f, ## a)
      |                                 ^~~~~~
drivers/net/wireless/intel/iwlegacy/4965-rs.c:1664:25: note: in expansion of macro 'D_RATE'
 1664 |                         D_RATE("LQ: stay is expired %d %d %d\n",
      |                         ^~~~~~
drivers/net/wireless/intel/iwlegacy/common.h:2927:32: note: each undeclared identifier is reported only once for each function it appears in
 2927 |         if (il_get_debug_level(il) & level)                             \
      |                                ^~
drivers/net/wireless/intel/iwlegacy/common.h:3043:33: note: in expansion of macro 'IL_DBG'
 3043 | #define D_RATE(f, a...)         IL_DBG(IL_DL_RATE, f, ## a)
      |                                 ^~~~~~
drivers/net/wireless/intel/iwlegacy/4965-rs.c:1664:25: note: in expansion of macro 'D_RATE'
 1664 |                         D_RATE("LQ: stay is expired %d %d %d\n",
      |                         ^~~~~~
drivers/net/wireless/intel/iwlegacy/4965-rs.c: In function 'il4965_rs_alloc_sta':
drivers/net/wireless/intel/iwlegacy/common.h:2927:32: error: 'il' undeclared (first use in this function); did you mean 'inl'?
 2927 |         if (il_get_debug_level(il) & level)                             \
      |                                ^~
drivers/net/wireless/intel/iwlegacy/common.h:3043:33: note: in expansion of macro 'IL_DBG'
 3043 | #define D_RATE(f, a...)         IL_DBG(IL_DL_RATE, f, ## a)
      |                                 ^~~~~~
drivers/net/wireless/intel/iwlegacy/4965-rs.c:2256:9: note: in expansion of macro 'D_RATE'
 2256 |         D_RATE("create station rate scale win\n");
      |         ^~~~~~
drivers/net/wireless/intel/iwlegacy/4965-rs.c: In function 'il4965_rs_sta_dbgfs_scale_table_write':
drivers/net/wireless/intel/iwlegacy/common.h:2927:32: error: 'il' undeclared (first use in this function); did you mean 'inl'?
 2927 |         if (il_get_debug_level(il) & level)                             \
      |                                ^~
drivers/net/wireless/intel/iwlegacy/common.h:3043:33: note: in expansion of macro 'IL_DBG'
 3043 | #define D_RATE(f, a...)         IL_DBG(IL_DL_RATE, f, ## a)
      |                                 ^~~~~~
drivers/net/wireless/intel/iwlegacy/4965-rs.c:2549:9: note: in expansion of macro 'D_RATE'
 2549 |         D_RATE("sta_id %d rate 0x%X\n", lq_sta->lq.sta_id,
      |         ^~~~~~
make[5]: *** [scripts/Makefile.build:288: drivers/net/wireless/intel/iwlegacy/4965-rs.o] Error 1
make[4]: *** [scripts/Makefile.build:550: drivers/net/wireless/intel/iwlegacy] Error 2
make[3]: *** [scripts/Makefile.build:550: drivers/net/wireless/intel] Error 2
make[2]: *** [scripts/Makefile.build:550: drivers/net/wireless] Error 2
make[1]: *** [scripts/Makefile.build:550: drivers/net] Error 2
make: *** [Makefile:1834: drivers] Error 2

Patch set to Changes Requested.

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20220318030025.12890-1-alexander.vorwerk@xxxxxxxxxxxxxxxxxxxxxx/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux