mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
staging: r8188eu: fix array_size.cocci warning
Fix following array_size.cocci warning: ./drivers/staging/r8188eu/core/rtw_rf.c:38:48-49: WARNING: Use ARRAY_SIZE. ARRAY_SIZE() defined in <linux/kernel.h> is safer because it uses __must_be_array(). Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com> Link: https://lore.kernel.org/r/20211116064124.8833-2-guozhengkui@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
944f0f697a
commit
fce0490dcb
@@ -35,7 +35,7 @@ static struct ch_freq ch_freq_map[] = {
|
||||
{216, 5080},/* Japan, means J16 */
|
||||
};
|
||||
|
||||
static int ch_freq_map_num = (sizeof(ch_freq_map) / sizeof(struct ch_freq));
|
||||
static int ch_freq_map_num = ARRAY_SIZE(ch_freq_map);
|
||||
|
||||
u32 rtw_ch2freq(u32 channel)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user