diff options
author | Alejandro Martinez Ruiz <alex@flawedcode.org> | 2007-10-18 04:00:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:03:36 -0500 |
commit | 4c3616cdda0632a3d0e39069765f9ea0e6bd093e (patch) | |
tree | d913f63996d479394bcdabd21ebfbdbe16bd1844 /drivers/net/myri10ge | |
parent | f59d9782751bf1a2c51e7e1e9f614ffec35fb52e (diff) |
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/myri10ge')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index c90958f6d3fe..6bdabc3a84bf 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -1431,7 +1431,7 @@ static const char myri10ge_gstrings_stats[][ETH_GSTRING_LEN] = { | |||
1431 | }; | 1431 | }; |
1432 | 1432 | ||
1433 | #define MYRI10GE_NET_STATS_LEN 21 | 1433 | #define MYRI10GE_NET_STATS_LEN 21 |
1434 | #define MYRI10GE_STATS_LEN sizeof(myri10ge_gstrings_stats) / ETH_GSTRING_LEN | 1434 | #define MYRI10GE_STATS_LEN ARRAY_SIZE(myri10ge_gstrings_stats) |
1435 | 1435 | ||
1436 | static void | 1436 | static void |
1437 | myri10ge_get_strings(struct net_device *netdev, u32 stringset, u8 * data) | 1437 | myri10ge_get_strings(struct net_device *netdev, u32 stringset, u8 * data) |