提交 302846e3 编写于 作者: J Jim Cromie 提交者: David S. Miller

ethernet: replace open-coded ARRAY_SIZE with macro

Signed-off-by: NJim Cromie <jim.cromie@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4133099b
......@@ -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]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册