Search Linux Wireless

Re: [PATCH] wcn36xx: Fix max channels retrieval

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

 



Loic Poulain <loic.poulain@xxxxxxxxxx> wrote:

> Kernel test robot reported:drivers/net/wireless/ath/wcn36xx/smd.c:943:33:
>    sparse: sparse: cast truncates bits from constant value (780 becomes 80)
> 
> The 'channels' field is not a simple u8 array but an array of
> channel_params. Using sizeof for retrieving the max number of
> channels is then wrong.
> 
> In practice, it was not an issue, because the sizeof returned
> value is 780, which is truncated in min_t (u8) to 80, which is
> the value we expect...
> 
> Fix that properly using ARRAY_SIZE instead of sizeof.
> 
> Fixes: d707f812bb05 ("wcn36xx: Channel list update before hardware scan")
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Signed-off-by: Loic Poulain <loic.poulain@xxxxxxxxxx>
> Signed-off-by: Kalle Valo <quic_kvalo@xxxxxxxxxxx>

Patch applied to ath-next branch of ath.git, thanks.

09cab4308bf9 wcn36xx: Fix max channels retrieval

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/1638435732-14657-1-git-send-email-loic.poulain@xxxxxxxxxx/

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