Thread (21 messages) read the whole thread 21 messages, 2 authors, 2017-03-31

RE: [PATCH V2 net-next 18/18] net: hns: Some checkpatch.pl script & warning fixes

From: Salil Mehta <hidden>
Date: 2017-03-31 16:47:17
Also in: lkml

-----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:
quoted
This patch fixes some checkpatch.pl script caught errors and
warnings during the compilation time.
[]
quoted
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
[]
quoted
@@ -512,7 +512,8 @@ static void hns_nic_reuse_page(struct sk_buff
*skb, int i,
quoted
 	int last_offset;
 	bool twobufs;

-	twobufs = ((PAGE_SIZE < 8192) && hnae_buf_size(ring) ==
HNS_BUFFER_SIZE_2048);
quoted
+	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help