Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752890AbcDVEq2 (ORCPT ); Fri, 22 Apr 2016 00:46:28 -0400 Received: from mail-lf0-f50.google.com ([209.85.215.50]:33481 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039AbcDVEq0 (ORCPT ); Fri, 22 Apr 2016 00:46:26 -0400 MIME-Version: 1.0 Date: Fri, 22 Apr 2016 10:16:24 +0530 Message-ID: Subject: Re: [PATCH V3 29/29] ethernet: use parity8 in broadcom/tg3.c From: Siva Reddy Kallam To: zengzhaoxiu@163.com, Prashant Sreedharan , Michael Chan , Zhaoxiu Zeng Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1117 Lines: 32 On Thu, Apr 14, 2016 at 8:42 AM, wrote: > > From: Zhaoxiu Zeng > > Signed-off-by: Zhaoxiu Zeng Looks good to me. Acked-by: Siva Reddy Kallam > --- > 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 > >