brcmsmac: use ARRAY_SIZE on rfseq_updategainu_events
authorColin Ian King <colin.king@canonical.com>
Thu, 7 Dec 2017 10:20:47 +0000 (10:20 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 14 Dec 2017 12:40:08 +0000 (14:40 +0200)
Use the ARRAY_SIZE macro on rfseq_updategainu_events to determine
size of the array. Improvement suggested by coccinelle.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c

index 763e8ba6b17812f8369ee913a4a19766bff68628..7e01981bc5c8bf70475712c0942aa8cfe36c7c94 100644 (file)
@@ -16049,8 +16049,7 @@ static void wlc_phy_workarounds_nphy_gainctrl(struct brcms_phy *pi)
                wlc_phy_set_rfseq_nphy(pi, NPHY_RFSEQ_UPDATEGAINU,
                                       rfseq_updategainu_events,
                                       rfseq_updategainu_dlys,
-                                      sizeof(rfseq_updategainu_events) /
-                                      sizeof(rfseq_updategainu_events[0]));
+                                      ARRAY_SIZE(rfseq_updategainu_events));
 
                mod_phy_reg(pi, 0x153, (0xff << 8), (90 << 8));