From: Vasyl Gomonovych Date: Thu, 18 Jul 2019 20:30:32 +0000 (+0200) Subject: ath10k: Use ARRAY_SIZE X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7921ae0919078292bfa88adb812ad7cfb621f977;p=linux.git ath10k: Use ARRAY_SIZE fix coccinelle warning, use ARRAY_SIZE Signed-off-by: Vasyl Gomonovych Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c index 80ce68c0f75e5..13ee97edf6df2 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.c +++ b/drivers/net/wireless/ath/ath10k/snoc.c @@ -976,8 +976,7 @@ static int ath10k_snoc_wlan_enable(struct ath10k *ar, sizeof(struct ath10k_svc_pipe_cfg); cfg.ce_svc_cfg = (struct ath10k_svc_pipe_cfg *) &target_service_to_ce_map_wlan; - cfg.num_shadow_reg_cfg = sizeof(target_shadow_reg_cfg_map) / - sizeof(struct ath10k_shadow_reg_cfg); + cfg.num_shadow_reg_cfg = ARRAY_SIZE(target_shadow_reg_cfg_map); cfg.shadow_reg_cfg = (struct ath10k_shadow_reg_cfg *) &target_shadow_reg_cfg_map;