From: zengzhaoxiu@163.com
To: linux-kernel@vger.kernel.org
Cc: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com>,
Siva Reddy Kallam <siva.kallam@broadcom.com>,
Prashant Sreedharan <prashant@broadcom.com>,
Michael Chan <mchan@broadcom.com>,
netdev@vger.kernel.org
Subject: [patch V4 29/31] ethernet: use parity8 in broadcom/tg3.c
Date: Wed, 11 May 2016 17:24:33 +0800 [thread overview]
Message-ID: <1462958673-26096-1-git-send-email-zengzhaoxiu@163.com> (raw)
In-Reply-To: <1462955158-28394-1-git-send-email-zengzhaoxiu@163.com>
From: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com>
Signed-off-by: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com>
Acked-by: Siva Reddy Kallam <siva.kallam@broadcom.com>
---
drivers/net/ethernet/broadcom/tg3.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 3010080..802a429 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -12939,11 +12939,7 @@ static int tg3_test_nvram(struct tg3 *tp)
err = -EIO;
for (i = 0; i < NVRAM_SELFBOOT_DATA_SIZE; i++) {
- u8 hw8 = hweight8(data[i]);
-
- if ((hw8 & 0x1) && parity[i])
- goto out;
- else if (!(hw8 & 0x1) && !parity[i])
+ if (parity8(data[i]) == !!parity[i])
goto out;
}
err = 0;
--
2.7.4
next prev parent reply other threads:[~2016-05-11 9:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 8:25 [patch V4 00/31] bitops: add parity functions zengzhaoxiu
2016-05-11 9:17 ` [patch V4 10/31] sunrpc: use parity8 zengzhaoxiu
2016-05-11 9:22 ` [patch V4 23/31] ethernet: use parity8 in sun/niu.c zengzhaoxiu
2016-05-11 23:59 ` David Miller
2016-05-11 9:24 ` zengzhaoxiu [this message]
2016-05-11 23:59 ` [patch V4 29/31] ethernet: use parity8 in broadcom/tg3.c David Miller
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=1462958673-26096-1-git-send-email-zengzhaoxiu@163.com \
--to=zengzhaoxiu@163.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=prashant@broadcom.com \
--cc=siva.kallam@broadcom.com \
--cc=zhaoxiu.zeng@gmail.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).