staging: r8188eu: Use the ARRAY_SIZE() macro
authorFabio M. De Francesco <fmdefrancesco@gmail.com>
Sat, 2 Apr 2022 16:34:39 +0000 (18:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Apr 2022 05:33:49 +0000 (07:33 +0200)
commitc9736770e6c30295dfd1802dde87b7f727d699f7
tree62adf86837056fd7589d7c71321afa0e58b851f6
parent28f7545d9f08f49d02e02fc1ee556161bfa95a5e
staging: r8188eu: Use the ARRAY_SIZE() macro

Use the ARRAY_SIZE() macro in places where there are open coded
calculations of the size of arrays.

ARRAY_SIZE(arr) makes sure that "arr" is an array, it's safer than
sizeof(arr) / sizeof(arr[0]), and improves readibility.

Detected with the help of Coccinelle.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20220402163439.20457-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_mlme_ext.c
drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c
drivers/staging/r8188eu/hal/HalHWImg8188E_MAC.c
drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c
drivers/staging/r8188eu/os_dep/ioctl_linux.c