Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933547AbdCaQrR convert rfc822-to-8bit (ORCPT ); Fri, 31 Mar 2017 12:47:17 -0400 Received: from lhrrgout.huawei.com ([194.213.3.17]:18144 "EHLO lhrrgout.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933518AbdCaQrO (ORCPT ); Fri, 31 Mar 2017 12:47:14 -0400 From: Salil Mehta To: Joe Perches , "davem@davemloft.net" CC: "Zhuangyuzeng (Yisen)" , "mehta.salil.lnk@gmail.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linuxarm Subject: RE: [PATCH V2 net-next 18/18] net: hns: Some checkpatch.pl script & warning fixes Thread-Topic: [PATCH V2 net-next 18/18] net: hns: Some checkpatch.pl script & warning fixes Thread-Index: AQHSqhEWpDtOGl3YH0S5jPqfTU50mqGvBpmAgAAhs9A= Date: Fri, 31 Mar 2017 16:46:53 +0000 Message-ID: References: <20170331112032.4692-1-salil.mehta@huawei.com> <20170331112032.4692-19-salil.mehta@huawei.com> <1490975097.27353.10.camel@perches.com> In-Reply-To: <1490975097.27353.10.camel@perches.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.203.181.152] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.58DE8806.01C8,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 058c047fd8fc9f0080fc010a57372e3e Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1213 Lines: 36 > -----Original Message----- > From: Joe Perches [mailto:joe@perches.com] > Sent: Friday, March 31, 2017 4:45 PM > To: Salil Mehta; davem@davemloft.net > Cc: Zhuangyuzeng (Yisen); mehta.salil.lnk@gmail.com; > netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Linuxarm > Subject: Re: [PATCH V2 net-next 18/18] net: hns: Some checkpatch.pl > script & warning fixes > > On Fri, 2017-03-31 at 12:20 +0100, Salil Mehta wrote: > > This patch fixes some checkpatch.pl script caught errors and > > warnings during the compilation time. > [] > > diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c > b/drivers/net/ethernet/hisilicon/hns/hns_enet.c > [] > > @@ -512,7 +512,8 @@ static void hns_nic_reuse_page(struct sk_buff > *skb, int i, > > int last_offset; > > bool twobufs; > > > > - twobufs = ((PAGE_SIZE < 8192) && hnae_buf_size(ring) == > HNS_BUFFER_SIZE_2048); > > + twobufs = ((PAGE_SIZE < 8192) && hnae_buf_size(ring) > > + == HNS_BUFFER_SIZE_2048); > > This would read nicer without splitting a comparison test > onto multiple lines > > twobufs = PAGE_SIZE < 8192 && > hnae_buf_size(ring) == HNS_BUFFER_SIZE_2048; For sure, thanks for noticing. Will correct this! Best regards Salil >