From: Jim Cromie Date: Tue, 10 Apr 2012 14:56:22 +0000 (+0000) Subject: ethernet: replace open-coded ARRAY_SIZE with macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=302846e3a692131a99b462078fe232ca2927b9d3;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ethernet: replace open-coded ARRAY_SIZE with macro Signed-off-by: Jim Cromie Signed-off-by: David S. Miller --- 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]);