summaryrefslogtreecommitdiffstats
path: root/drivers/net/cassini.c
diff options
context:
space:
mode:
authorAlejandro Martinez Ruiz <alex@flawedcode.org>2007-10-18 10:00:15 +0200
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:03:36 -0800
commit4c3616cdda0632a3d0e39069765f9ea0e6bd093e (patch)
treed913f63996d479394bcdabd21ebfbdbe16bd1844 /drivers/net/cassini.c
parentf59d9782751bf1a2c51e7e1e9f614ffec35fb52e (diff)
downloadblackbird-op-linux-4c3616cdda0632a3d0e39069765f9ea0e6bd093e.tar.gz
blackbird-op-linux-4c3616cdda0632a3d0e39069765f9ea0e6bd093e.zip
netdev: use ARRAY_SIZE() instead of sizeof(array) / ETH_GSTRING_LEN
Using ARRAY_SIZE() on arrays of the form array[][K] makes it unnecessary to know the value of K when checking its size. Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/cassini.c')
-rw-r--r--drivers/net/cassini.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index d66915d82b24..2bacb5e4604d 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -4394,7 +4394,7 @@ static struct {
{"tx_fifo_errors"},
{"tx_packets"}
};
-#define CAS_NUM_STAT_KEYS (sizeof(ethtool_cassini_statnames)/ETH_GSTRING_LEN)
+#define CAS_NUM_STAT_KEYS ARRAY_SIZE(ethtool_cassini_statnames)
static struct {
const int offsets; /* neg. values for 2nd arg to cas_read_phy */
OpenPOWER on IntegriCloud