[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1283980837-5025-1-git-send-email-nikitasangelinas@gmail.com>
Date: Wed, 8 Sep 2010 22:20:37 +0100
From: Nikitas Angelinas <nikitasangelinas@...il.com>
To: eilong@...adcom.com, davem@...emloft.net, dmitry@...adcom.com,
yanivr@...adcom.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Nikitas Angelinas <nikitasangelinas@...il.com>
Subject: [PATCH 5/8] 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@...il.com>
---
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 f8c3f08..e534ae8 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -3803,10 +3803,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);
}
--
1.7.2.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists