Commit cbd9da7b authored by Nikitas Angelinas's avatar Nikitas Angelinas Committed by David S. Miller

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: default avatarNikitas Angelinas <nikitasangelinas@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dc99839c
...@@ -3830,10 +3830,9 @@ static const struct { ...@@ -3830,10 +3830,9 @@ static const struct {
static void enable_blocks_parity(struct bnx2x *bp) static void enable_blocks_parity(struct bnx2x *bp)
{ {
int i, mask_arr_len = int i;
sizeof(bnx2x_parity_mask)/(sizeof(bnx2x_parity_mask[0]));
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, REG_WR(bp, bnx2x_parity_mask[i].addr,
bnx2x_parity_mask[i].mask); bnx2x_parity_mask[i].mask);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment