]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: aquantia: Eliminate AQ_DIMOF, replace with ARRAY_SIZE
authorIgor Russkikh <igor.russkikh@aquantia.com>
Mon, 15 Jan 2018 13:41:13 +0000 (16:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Jan 2018 19:40:00 +0000 (14:40 -0500)
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/aq_nic.c
drivers/net/ethernet/aquantia/atlantic/aq_utils.h
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c

index 75a894a9251c2114e7d30d40ab795f89ded413fe..546dd8cc12f5bd8c29de975bb78c08693aae9f8b 100644 (file)
@@ -992,7 +992,7 @@ void aq_nic_free_hot_resources(struct aq_nic_s *self)
        if (!self)
                goto err_exit;
 
-       for (i = AQ_DIMOF(self->aq_vec); i--;) {
+       for (i = ARRAY_SIZE(self->aq_vec); i--;) {
                if (self->aq_vec[i]) {
                        aq_vec_free(self->aq_vec[i]);
                        self->aq_vec[i] = NULL;
index e12bcdfb874a4409f8ccec886f626b19b48b2b52..981633833f2f6ac827c346154eb0bfb518c857ba 100644 (file)
@@ -14,8 +14,6 @@
 
 #include "aq_common.h"
 
-#define AQ_DIMOF(_ARY_)  ARRAY_SIZE(_ARY_)
-
 struct aq_obj_s {
        atomic_t flags;
 };
index f18dce14c93cfa89f5c091db5f5b06c6e882aa68..97920ca37690ac368db44615e4e5d0ddbd392648 100644 (file)
@@ -193,7 +193,7 @@ static int hw_atl_a0_hw_rss_set(struct aq_hw_s *self,
                        ((i * 3U) & 0xFU));
        }
 
-       for (i = AQ_DIMOF(bitary); i--;) {
+       for (i = ARRAY_SIZE(bitary); i--;) {
                rpf_rss_redir_tbl_wr_data_set(self, bitary[i]);
                rpf_rss_redir_tbl_addr_set(self, i);
                rpf_rss_redir_wr_en_set(self, 1U);
index e4a22ce7bf09d50f21ffed6425783d7be7c88da5..83006731d040004553b682f6502edbdcebc95db3 100644 (file)
@@ -194,7 +194,7 @@ static int hw_atl_b0_hw_rss_set(struct aq_hw_s *self,
                        ((i * 3U) & 0xFU));
        }
 
-       for (i = AQ_DIMOF(bitary); i--;) {
+       for (i = ARRAY_SIZE(bitary); i--;) {
                rpf_rss_redir_tbl_wr_data_set(self, bitary[i]);
                rpf_rss_redir_tbl_addr_set(self, i);
                rpf_rss_redir_wr_en_set(self, 1U);
index f2ce12ed4218ee8d39a462b6ffc1fada96358506..1a6cf9eb6b1cf055d037eff8d754d2f75ac60790 100644 (file)
@@ -396,7 +396,7 @@ int hw_atl_utils_get_mac_permanent(struct aq_hw_s *self,
                                            aq_hw_read_reg(self, 0x00000374U) +
                                            (40U * 4U),
                                            mac_addr,
-                                           AQ_DIMOF(mac_addr));
+                                           ARRAY_SIZE(mac_addr));
        if (err < 0) {
                mac_addr[0] = 0U;
                mac_addr[1] = 0U;