Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
[firefly-linux-kernel-4.4.55.git] / drivers / net / ethernet / s6gmac.c
index 6f0d28429e30650293f78ddb3914232d35c3fc51..2ed3ab4b3c2d61648633596662cf47489172d289 100644 (file)
@@ -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]);