From: Nikitas Angelinas <nikitasangelinas@gmail.com>
To: eilong@broadcom.com, davem@davemloft.net, dmitry@broadcom.com,
yanivr@broadcom.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Nikitas Angelinas <nikitasangelinas@gmail.com>
Subject: [PATCH 5/8] drivers/net/bnx2x: use ARRAY_SIZE macro in bnx2x_main.c
Date: Wed, 8 Sep 2010 22:20:37 +0100 [thread overview]
Message-ID: <1283980837-5025-1-git-send-email-nikitasangelinas@gmail.com> (raw)
In-Reply-To: <1283979457-4649-1-git-send-email-nikitasangelinas@gmail.com>
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>
---
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
next parent reply other threads:[~2010-09-08 21:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1283979457-4649-1-git-send-email-nikitasangelinas@gmail.com>
2010-09-08 21:20 ` Nikitas Angelinas [this message]
2010-09-10 4:56 ` [PATCH 5/8] drivers/net/bnx2x: use ARRAY_SIZE macro in bnx2x_main.c David Miller
2010-09-08 21:25 ` [PATCH 6/8] drivers/net/wireless/ath/ath9k: use ARRAY_SIZE macro in ani.c Nikitas Angelinas
[not found] ` <1283981142-5062-1-git-send-email-nikitasangelinas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-09-08 21:31 ` Luis R. Rodriguez
2010-09-08 21:29 ` [PATCH 8/8] net/wireless: use ARRAY_SIZE macro in radiotap.c Nikitas Angelinas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1283980837-5025-1-git-send-email-nikitasangelinas@gmail.com \
--to=nikitasangelinas@gmail.com \
--cc=davem@davemloft.net \
--cc=dmitry@broadcom.com \
--cc=eilong@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yanivr@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).