summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8723au
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/rtl8723au')
-rw-r--r--drivers/staging/rtl8723au/core/rtw_cmd.c3
-rw-r--r--drivers/staging/rtl8723au/core/rtw_mlme_ext.c3
-rw-r--r--drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c6
-rw-r--r--drivers/staging/rtl8723au/hal/HalHWImg8723A_MAC.c2
4 files changed, 6 insertions, 8 deletions
diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c
index 3035bb864c39..cd4e0f05d82f 100644
--- a/drivers/staging/rtl8723au/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723au/core/rtw_cmd.c
@@ -295,8 +295,7 @@ static void rtw_cmd_work(struct work_struct *work)
post_process:
/* call callback function for post-processed */
- if (pcmd->cmdcode < (sizeof(rtw_cmd_callback) /
- sizeof(struct _cmd_callback))) {
+ if (pcmd->cmdcode < ARRAY_SIZE(rtw_cmd_callback)) {
pcmd_callback = rtw_cmd_callback[pcmd->cmdcode].callback;
if (!pcmd_callback) {
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_,
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
index 7cd005215e7e..a39e441ee365 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
@@ -2154,8 +2154,7 @@ OnAction23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
category = mgmt->u.action.category;
- for (i = 0;
- i < sizeof(OnAction23a_tbl) / sizeof(struct action_handler); i++) {
+ for (i = 0; i < ARRAY_SIZE(OnAction23a_tbl); i++) {
ptable = &OnAction23a_tbl[i];
if (category == ptable->num)
diff --git a/drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c b/drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c
index e8cab9e97385..8d3ea6c0cbe6 100644
--- a/drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c
+++ b/drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c
@@ -219,7 +219,7 @@ void ODM_ReadAndConfig_AGC_TAB_1T_8723A(struct dm_odm_t *pDM_Odm)
u32 i;
u8 platform = 0x04;
u8 board = pDM_Odm->BoardType;
- u32 ArrayLen = sizeof(Array_AGC_TAB_1T_8723A)/sizeof(u32);
+ u32 ArrayLen = ARRAY_SIZE(Array_AGC_TAB_1T_8723A);
u32 *Array = Array_AGC_TAB_1T_8723A;
hex = board;
@@ -467,7 +467,7 @@ void ODM_ReadAndConfig_PHY_REG_1T_8723A(struct dm_odm_t *pDM_Odm)
u32 i = 0;
u8 platform = 0x04;
u8 board = pDM_Odm->BoardType;
- u32 ArrayLen = sizeof(Array_PHY_REG_1T_8723A)/sizeof(u32);
+ u32 ArrayLen = ARRAY_SIZE(Array_PHY_REG_1T_8723A);
u32 *Array = Array_PHY_REG_1T_8723A;
hex += board;
@@ -523,7 +523,7 @@ void ODM_ReadAndConfig_PHY_REG_MP_8723A(struct dm_odm_t *pDM_Odm)
u32 i;
u8 platform = 0x04;
u8 board = pDM_Odm->BoardType;
- u32 ArrayLen = sizeof(Array_PHY_REG_MP_8723A)/sizeof(u32);
+ u32 ArrayLen = ARRAY_SIZE(Array_PHY_REG_MP_8723A);
u32 *Array = Array_PHY_REG_MP_8723A;
hex += board;
diff --git a/drivers/staging/rtl8723au/hal/HalHWImg8723A_MAC.c b/drivers/staging/rtl8723au/hal/HalHWImg8723A_MAC.c
index 93b2d183d694..9bf685905e68 100644
--- a/drivers/staging/rtl8723au/hal/HalHWImg8723A_MAC.c
+++ b/drivers/staging/rtl8723au/hal/HalHWImg8723A_MAC.c
@@ -145,7 +145,7 @@ void ODM_ReadAndConfig_MAC_REG_8723A(struct dm_odm_t *pDM_Odm)
u32 i = 0;
u8 platform = 0x04;
u8 board = pDM_Odm->BoardType;
- u32 ArrayLen = sizeof(Array_MAC_REG_8723A)/sizeof(u32);
+ u32 ArrayLen = ARRAY_SIZE(Array_MAC_REG_8723A);
u32 *Array = Array_MAC_REG_8723A;
hex += board;