Search Linux Wireless

Re: [PATCH] wifi: iwlfifi: fix -Wunused-const-variable gcc warning

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

 



On Mon, 2023-06-19 at 13:00 +0300, Dmitry Antipov wrote:
> Fix the following gcc 13.1 warning observed with W=1:
> 
> drivers/net/wireless/intel/iwlwifi/dvm/rs.c:207:39: warning:
> ‘iwl_rate_mcs’ defined but not used [-Wunused-const-variable=]
> 
> This table is actually used in 'rs_sta_dbgfs_scale_table_read()'
> only if CONFIG_MAC80211_DEBUGFS is enabled.
> 
> Signed-off-by: Dmitry Antipov <dmantipov@xxxxxxxxx>
> ---
>  drivers/net/wireless/intel/iwlwifi/dvm/rs.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/rs.c b/drivers/net/wireless/intel/iwlwifi/dvm/rs.c
> index 687c906a9d72..ecad7403ec96 100644
> --- a/drivers/net/wireless/intel/iwlwifi/dvm/rs.c
> +++ b/drivers/net/wireless/intel/iwlwifi/dvm/rs.c
> @@ -203,6 +203,8 @@ static const u16 expected_tpt_mimo3_40MHz[4][IWL_RATE_COUNT] = {
>  	{0, 0, 0, 0, 277, 0, 478, 624, 737, 911, 1026, 1070, 1109}, /* AGG+SGI */
>  };
>  
> +#ifdef CONFIG_MAC80211_DEBUGFS
> +
>  /* mbps, mcs */
>  static const struct iwl_rate_mcs_info iwl_rate_mcs[IWL_RATE_COUNT] = {
> 

Maybe move it to the existing ifdef, or even into the function?

Also, you have a typo in subject, 'iwlwifi', but should probably be
"wifi: iwlwifi: dvm: ..." since dvm/mvm are hugely different.

johannes




[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