From 302846e3a692131a99b462078fe232ca2927b9d3 Mon Sep 17 00:00:00 2001 From: Jim Cromie Date: Tue, 10 Apr 2012 14:56:22 +0000 Subject: [PATCH] ethernet: replace open-coded ARRAY_SIZE with macro Signed-off-by: Jim Cromie Signed-off-by: David S. Miller --- drivers/net/ethernet/s6gmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/s6gmac.c b/drivers/net/ethernet/s6gmac.c index 1895605abb35..8e9fda0c7aeb 100644 --- a/drivers/net/ethernet/s6gmac.c +++ b/drivers/net/ethernet/s6gmac.c @@ -937,7 +937,7 @@ static struct net_device_stats *s6gmac_stats(struct net_device *dev) do { unsigned long flags; spin_lock_irqsave(&pd->lock, flags); - for (i = 0; i < sizeof(pd->stats) / sizeof(unsigned long); i++) + for (i = 0; i < ARRAY_SIZE(pd->stats); i++) pd->stats[i] = pd->carry[i] << (S6_GMAC_STAT_SIZE_MIN - 1); s6gmac_stats_collect(pd, &statinf[0][0]); -- 2.30.2