aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bnx2x/bnx2x_main.c5
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
3831static void enable_blocks_parity(struct bnx2x *bp) 3831static 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}