summaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga-mgr.c
diff options
context:
space:
mode:
authorLoic Poulain <loic.poulain@linaro.org>2021-12-02 10:02:12 +0100
committerKalle Valo <quic_kvalo@quicinc.com>2021-12-08 10:34:12 +0200
commit09cab4308bf9b8076ee4a3c56015daf9ef9cb23e (patch)
tree09e97ab708658ded9f26a36f49528c70a1c78510 /drivers/fpga/fpga-mgr.c
parent9dcf6808b253a72b2c90eed179863bf5fab7d68c (diff)
wcn36xx: Fix max channels retrieval
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@intel.com> Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/1638435732-14657-1-git-send-email-loic.poulain@linaro.org
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions