summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorIvan Safonov <insafonov@gmail.com>2015-10-27 22:13:57 +0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-29 09:09:08 +0900
commitbbef4729a1c9eefa509f10c9a0a799e026d54719 (patch)
tree4661f6f6fe25cec0d1e41c07236f42b175d3db9d /drivers/staging
parente2911905bca5403d87d35805f80d9c7f178e4802 (diff)
downloadlinux-bbef4729a1c9eefa509f10c9a0a799e026d54719.tar.bz2
staging: rtl8188eu: sizeof/sizeof replaced by ARRAY_SIZE kernel macro
ARRAY_SIZE shorter and more difficult to create bugs. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/rtl8188eu/hal/mac_cfg.c2
-rw-r--r--drivers/staging/rtl8188eu/hal/rf_cfg.c2
-rw-r--r--drivers/staging/rtl8188eu/os_dep/ioctl_linux.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rtl8188eu/hal/mac_cfg.c b/drivers/staging/rtl8188eu/hal/mac_cfg.c
index febc83a5adb8..b867db5d20bf 100644
--- a/drivers/staging/rtl8188eu/hal/mac_cfg.c
+++ b/drivers/staging/rtl8188eu/hal/mac_cfg.c
@@ -123,7 +123,7 @@ bool rtl88eu_phy_mac_config(struct adapter *adapt)
u32 arraylength;
u32 *ptrarray;
- arraylength = sizeof(array_MAC_REG_8188E)/sizeof(u32);
+ arraylength = ARRAY_SIZE(array_MAC_REG_8188E);
ptrarray = array_MAC_REG_8188E;
for (i = 0; i < arraylength; i = i + 2)
diff --git a/drivers/staging/rtl8188eu/hal/rf_cfg.c b/drivers/staging/rtl8188eu/hal/rf_cfg.c
index a3f1abaf60d9..44945427cc34 100644
--- a/drivers/staging/rtl8188eu/hal/rf_cfg.c
+++ b/drivers/staging/rtl8188eu/hal/rf_cfg.c
@@ -198,7 +198,7 @@ static void rtl8188e_config_rf_reg(struct adapter *adapt,
static bool rtl88e_phy_config_rf_with_headerfile(struct adapter *adapt)
{
u32 i;
- u32 array_len = sizeof(Array_RadioA_1T_8188E)/sizeof(u32);
+ u32 array_len = ARRAY_SIZE(Array_RadioA_1T_8188E);
u32 *array = Array_RadioA_1T_8188E;
for (i = 0; i < array_len; i += 2) {
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index 969574926e21..bda423e72fa8 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -3091,7 +3091,7 @@ static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev)
struct iw_handler_def rtw_handlers_def = {
.standard = rtw_handlers,
- .num_standard = sizeof(rtw_handlers) / sizeof(iw_handler),
+ .num_standard = ARRAY_SIZE(rtw_handlers),
.get_wireless_stats = rtw_get_wireless_stats,
};