diff options
author | Alejandro Martinez Ruiz <alex@flawedcode.org> | 2007-10-14 21:37:43 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-15 15:57:38 -0400 |
commit | e9edda697ed7697f1288d0656570e49c47e204ae (patch) | |
tree | 6d43d602b7e0eb98940a516e0e0d2c8fd1a7006a /drivers/net/cassini.c | |
parent | 88a15f2e28bd6a908b2925f1b76e70ef3a88297d (diff) |
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>
Diffstat (limited to 'drivers/net/cassini.c')
-rw-r--r-- | drivers/net/cassini.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 563bf5f6fa2a..7df31b5561cc 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -4443,7 +4443,7 @@ static struct { | |||
4443 | {REG_MAC_COLL_EXCESS}, | 4443 | {REG_MAC_COLL_EXCESS}, |
4444 | {REG_MAC_COLL_LATE} | 4444 | {REG_MAC_COLL_LATE} |
4445 | }; | 4445 | }; |
4446 | #define CAS_REG_LEN (sizeof(ethtool_register_table)/sizeof(int)) | 4446 | #define CAS_REG_LEN ARRAY_SIZE(ethtool_register_table) |
4447 | #define CAS_MAX_REGS (sizeof (u32)*CAS_REG_LEN) | 4447 | #define CAS_MAX_REGS (sizeof (u32)*CAS_REG_LEN) |
4448 | 4448 | ||
4449 | static void cas_read_regs(struct cas *cp, u8 *ptr, int len) | 4449 | static void cas_read_regs(struct cas *cp, u8 *ptr, int len) |