Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753796AbcDNDNb (ORCPT ); Wed, 13 Apr 2016 23:13:31 -0400 Received: from m50-134.163.com ([123.125.50.134]:51475 "EHLO m50-134.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753756AbcDNDNW (ORCPT ); Wed, 13 Apr 2016 23:13:22 -0400 From: zengzhaoxiu@163.com To: linux-kernel@vger.kernel.org Cc: Zhaoxiu Zeng , Siva Reddy Kallam , Prashant Sreedharan , Michael Chan , netdev@vger.kernel.org Subject: [PATCH V3 29/29] ethernet: use parity8 in broadcom/tg3.c Date: Thu, 14 Apr 2016 11:12:44 +0800 Message-Id: <1460603564-5901-1-git-send-email-zengzhaoxiu@163.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1460601525-3822-1-git-send-email-zengzhaoxiu@163.com> References: <1460601525-3822-1-git-send-email-zengzhaoxiu@163.com> X-CM-TRANSID: DtGowABXqUKtCg9XiHsBAg--.893S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrtr4DZr43AFy7JrWrKry5CFg_yoW3GwcEkF 1Yq3W7ur4jkFyYkw4qkr4ay3yq9anY934ruF4vqay3Gr1DCr1UJw4kCF98JwnxWrWUGF9I yr9xXa9ru3y2gjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU50sj5UUUUU== X-Originating-IP: [112.95.225.98] X-CM-SenderInfo: p2hqw6xkdr5xrx6rljoofrz/1tbiJRFLgFUL-FAqpQAAsC Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 744 Lines: 27 From: Zhaoxiu Zeng Signed-off-by: Zhaoxiu Zeng --- 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.5.0