summaryrefslogtreecommitdiff
path: root/drivers/net/e1000/e1000_ethtool.c
diff options
context:
space:
mode:
authorAlejandro Martinez Ruiz <alex@flawedcode.org>2007-10-18 12:00:15 +0400
committerDavid S. Miller <davem@davemloft.net>2008-01-29 02:03:36 +0300
commit4c3616cdda0632a3d0e39069765f9ea0e6bd093e (patch)
treed913f63996d479394bcdabd21ebfbdbe16bd1844 /drivers/net/e1000/e1000_ethtool.c
parentf59d9782751bf1a2c51e7e1e9f614ffec35fb52e (diff)
downloadlinux-4c3616cdda0632a3d0e39069765f9ea0e6bd093e.tar.xz
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/e1000/e1000_ethtool.c')
-rw-r--r--drivers/net/e1000/e1000_ethtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index b83ccce8a9b7..2e44191d4b42 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -110,7 +110,7 @@ static const char e1000_gstrings_test[][ETH_GSTRING_LEN] = {
"Interrupt test (offline)", "Loopback test (offline)",
"Link test (on/offline)"
};
-#define E1000_TEST_LEN sizeof(e1000_gstrings_test) / ETH_GSTRING_LEN
+#define E1000_TEST_LEN ARRAY_SIZE(e1000_gstrings_test)
static int
e1000_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)