projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4133099
)
ethernet: replace open-coded ARRAY_SIZE with macro
author
Jim Cromie
<jim.cromie@gmail.com>
Tue, 10 Apr 2012 14:56:22 +0000
(14:56 +0000)
committer
David S. Miller
<davem@davemloft.net>
Fri, 13 Apr 2012 17:15:14 +0000
(13:15 -0400)
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/s6gmac.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/s6gmac.c
b/drivers/net/ethernet/s6gmac.c
index
1895605
..
8e9fda0
100644
(file)
--- 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]);