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>
This commit is contained in:
committed by
David S. Miller
parent
f59d978275
commit
4c3616cdda
@@ -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 */
|
||||
|
Reference in New Issue
Block a user