ath10k: Use ARRAY_SIZE
authorVasyl Gomonovych <gomonovych@gmail.com>
Thu, 18 Jul 2019 20:30:32 +0000 (22:30 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 17 Sep 2019 14:09:01 +0000 (17:09 +0300)
fix coccinelle warning, use ARRAY_SIZE

Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/snoc.c

index 80ce68c0f75e5f171c75cd5811bad0376b0ddf6c..13ee97edf6df265afa038388001809a48a392779 100644 (file)
@@ -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;