diff mbox

[07/11] ethernet: replace open-coded ARRAY_SIZE with macro

Message ID 1334105782-9286-1-git-send-email-jim.cromie@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Jim Cromie April 11, 2012, 12:56 a.m. UTC
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
 drivers/net/ethernet/s6gmac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

David Miller April 13, 2012, 5:15 p.m. UTC | #1
From: Jim Cromie <jim.cromie@gmail.com>
Date: Tue, 10 Apr 2012 18:56:22 -0600

> Signed-off-by: Jim Cromie <jim.cromie@gmail.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ethernet/s6gmac.c b/drivers/net/ethernet/s6gmac.c
index 1895605..8e9fda0 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]);