diff options
author | Denis Cheng <crquan@gmail.com> | 2007-09-02 06:30:18 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:51:15 -0400 |
commit | ff8ac60948ba819b89e9c87083e8050fc2f89999 (patch) | |
tree | 611975d22d7ddd8c49a073c61e6e4b7c9523fedb /drivers/net/netxen | |
parent | 10d024c1b2fd58af8362670d7d6e5ae52fc33353 (diff) |
drivers/net/: all drivers/net/ cleanup with ARRAY_SIZE
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r-- | drivers/net/netxen/netxen_nic.h | 2 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index aaa34939485b..7bbd5d14175f 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -1119,7 +1119,7 @@ static const struct netxen_brdinfo netxen_boards[] = { | |||
1119 | {NETXEN_BRDTYPE_P2_SB31_2G, 2, "Dual Gb"}, | 1119 | {NETXEN_BRDTYPE_P2_SB31_2G, 2, "Dual Gb"}, |
1120 | }; | 1120 | }; |
1121 | 1121 | ||
1122 | #define NUM_SUPPORTED_BOARDS (sizeof(netxen_boards)/sizeof(struct netxen_brdinfo)) | 1122 | #define NUM_SUPPORTED_BOARDS ARRAY_SIZE(netxen_boards) |
1123 | 1123 | ||
1124 | static inline void get_brd_port_by_type(u32 type, int *ports) | 1124 | static inline void get_brd_port_by_type(u32 type, int *ports) |
1125 | { | 1125 | { |
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index a7b8d7f23259..2c19b8df98fa 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -569,7 +569,7 @@ int netxen_is_flash_supported(struct netxen_adapter *adapter) | |||
569 | /* if the flash size less than 4Mb, make huge war cry and die */ | 569 | /* if the flash size less than 4Mb, make huge war cry and die */ |
570 | for (j = 1; j < 4; j++) { | 570 | for (j = 1; j < 4; j++) { |
571 | addr = j * NETXEN_NIC_WINDOW_MARGIN; | 571 | addr = j * NETXEN_NIC_WINDOW_MARGIN; |
572 | for (i = 0; i < (sizeof(locs) / sizeof(locs[0])); i++) { | 572 | for (i = 0; i < ARRAY_SIZE(locs); i++) { |
573 | if (netxen_rom_fast_read(adapter, locs[i], &val01) == 0 | 573 | if (netxen_rom_fast_read(adapter, locs[i], &val01) == 0 |
574 | && netxen_rom_fast_read(adapter, (addr + locs[i]), | 574 | && netxen_rom_fast_read(adapter, (addr + locs[i]), |
575 | &val02) == 0) { | 575 | &val02) == 0) { |