netdev: convert non-obvious instances to use ARRAY_SIZE()
This will convert remaining non-obvious or naive calculations of array sizes to use ARRAY_SIZE() macro. Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:

committed by
Jeff Garzik

parent
88a15f2e28
commit
e9edda697e
@@ -4443,7 +4443,7 @@ static struct {
|
||||
{REG_MAC_COLL_EXCESS},
|
||||
{REG_MAC_COLL_LATE}
|
||||
};
|
||||
#define CAS_REG_LEN (sizeof(ethtool_register_table)/sizeof(int))
|
||||
#define CAS_REG_LEN ARRAY_SIZE(ethtool_register_table)
|
||||
#define CAS_MAX_REGS (sizeof (u32)*CAS_REG_LEN)
|
||||
|
||||
static void cas_read_regs(struct cas *cp, u8 *ptr, int len)
|
||||
|
Reference in New Issue
Block a user