diff options
author | Nikitas Angelinas <nikitasangelinas@gmail.com> | 2010-09-08 07:20:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-10 00:56:01 -0400 |
commit | cbd9da7be869f676afc204e1a664163778c770bd (patch) | |
tree | eee8a43469e77e882e2a388351693eccb0490ef4 | |
parent | dc99839cf600518ed1f20e47522fe7f629387078 (diff) |
drivers/net/bnx2x: use ARRAY_SIZE macro in bnx2x_main.c
Replace sizeof(bnx2x_parity_mask)/(sizeof(bnx2x_parity_mask[0]) with
ARRAY_SIZE(bnx2x_parity_mask) in drivers/net/bnx2x/bnx2x_main.c
Signed-off-by: Nikitas Angelinas <nikitasangelinas@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/bnx2x/bnx2x_main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c index f0a788467fb1..7ba3a6d96fd5 100644 --- a/drivers/net/bnx2x/bnx2x_main.c +++ b/drivers/net/bnx2x/bnx2x_main.c | |||
@@ -3830,10 +3830,9 @@ static const struct { | |||
3830 | 3830 | ||
3831 | static void enable_blocks_parity(struct bnx2x *bp) | 3831 | static void enable_blocks_parity(struct bnx2x *bp) |
3832 | { | 3832 | { |
3833 | int i, mask_arr_len = | 3833 | int i; |
3834 | sizeof(bnx2x_parity_mask)/(sizeof(bnx2x_parity_mask[0])); | ||
3835 | 3834 | ||
3836 | for (i = 0; i < mask_arr_len; i++) | 3835 | for (i = 0; i < ARRAY_SIZE(bnx2x_parity_mask); i++) |
3837 | REG_WR(bp, bnx2x_parity_mask[i].addr, | 3836 | REG_WR(bp, bnx2x_parity_mask[i].addr, |
3838 | bnx2x_parity_mask[i].mask); | 3837 | bnx2x_parity_mask[i].mask); |
3839 | } | 3838 | } |