Search Linux Wireless

Re: [PATCH] wifi: rtw88: fix uninitialized use of primary channel index

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

 



Nathan Chancellor <nathan@xxxxxxxxxx> writes:

> On Mon, Aug 15, 2022 at 02:20:04PM +0800, Ping-Ke Shih wrote:
>
>> clang reports uninitialized use:
>> 
>> >> drivers/net/wireless/realtek/rtw88/main.c:731:2: warning: variable
>>    'primary_channel_idx' is used uninitialized whenever switch default is
>>    taken [-Wsometimes-uninitialized]
>>            default:
>>            ^~~~~~~
>>    drivers/net/wireless/realtek/rtw88/main.c:754:39: note: uninitialized
>>    use occurs here
>>            hal->current_primary_channel_index = primary_channel_idx;
>>                                                 ^~~~~~~~~~~~~~~~~~~
>>    drivers/net/wireless/realtek/rtw88/main.c:687:24: note: initialize the
>>    variable 'primary_channel_idx' to silence this warning
>>            u8 primary_channel_idx;
>>                                  ^
>>                                   = '\0'
>> 
>> This situation could not happen, because possible channel bandwidth
>> 20/40/80MHz are enumerated.
>> 
>> Fixes: 341dd1f7de4c ("wifi: rtw88: add the update channel flow to support setting by parameters")
>> Reported-by: kernel test robot <lkp@xxxxxxxxx>
>> Signed-off-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
>
> Reviewed-by: Nathan Chancellor <nathan@xxxxxxxxxx>
>
> Can we get this into -next soon? This warning is breaking our builds due
> to CONFIG_WERROR.

Johannes applied it:

https://git.kernel.org/netdev/net-next/c/4ffb4d25ef12

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

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