diff options
author | Nikitas Angelinas <nikitasangelinas@gmail.com> | 2010-09-08 11:20:37 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-09 21:56:01 -0700 |
commit | cbd9da7be869f676afc204e1a664163778c770bd (patch) | |
tree | eee8a43469e77e882e2a388351693eccb0490ef4 /drivers/net/bnx2x/bnx2x_main.c | |
parent | dc99839cf600518ed1f20e47522fe7f629387078 (diff) | |
download | op-kernel-dev-cbd9da7be869f676afc204e1a664163778c770bd.zip op-kernel-dev-cbd9da7be869f676afc204e1a664163778c770bd.tar.gz |
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>
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_main.c')
-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 f0a7884..7ba3a6d 100644 --- a/drivers/net/bnx2x/bnx2x_main.c +++ b/drivers/net/bnx2x/bnx2x_main.c @@ -3830,10 +3830,9 @@ static const struct { static void enable_blocks_parity(struct bnx2x *bp) { - int i, mask_arr_len = - sizeof(bnx2x_parity_mask)/(sizeof(bnx2x_parity_mask[0])); + int i; - for (i = 0; i < mask_arr_len; i++) + for (i = 0; i < ARRAY_SIZE(bnx2x_parity_mask); i++) REG_WR(bp, bnx2x_parity_mask[i].addr, bnx2x_parity_mask[i].mask); } |