Skip to content

Commit

Permalink
ethernet: replace open-coded ARRAY_SIZE with macro
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jim Cromie authored and David S. Miller committed Apr 13, 2012
1 parent 4133099 commit 302846e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/s6gmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 302846e

Please sign in to comment.