summaryrefslogtreecommitdiffstats
path: root/drivers/net/e100.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/e100.c
parentf59d9782751bf1a2c51e7e1e9f614ffec35fb52e (diff)
downloadop-kernel-dev-4c3616cdda0632a3d0e39069765f9ea0e6bd093e.zip
op-kernel-dev-4c3616cdda0632a3d0e39069765f9ea0e6bd093e.tar.gz
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/e100.c')
-rw-r--r--drivers/net/e100.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index b87402b..597fd29 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2369,7 +2369,7 @@ static const char e100_gstrings_test[][ETH_GSTRING_LEN] = {
"Mac loopback (offline)",
"Phy loopback (offline)",
};
-#define E100_TEST_LEN sizeof(e100_gstrings_test) / ETH_GSTRING_LEN
+#define E100_TEST_LEN ARRAY_SIZE(e100_gstrings_test)
static void e100_diag_test(struct net_device *netdev,
struct ethtool_test *test, u64 *data)
@@ -2431,7 +2431,7 @@ static const char e100_gstrings_stats[][ETH_GSTRING_LEN] = {
"rx_flow_control_unsupported", "tx_tco_packets", "rx_tco_packets",
};
#define E100_NET_STATS_LEN 21
-#define E100_STATS_LEN sizeof(e100_gstrings_stats) / ETH_GSTRING_LEN
+#define E100_STATS_LEN ARRAY_SIZE(e100_gstrings_stats)
static int e100_get_sset_count(struct net_device *netdev, int sset)
{
OpenPOWER on IntegriCloud