lkml.org 
[lkml]   [2017]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V2 net-next 18/18] net: hns: Some checkpatch.pl script & warning fixes
From
Date
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;


\
 
 \ /
  Last update: 2017-03-31 17:45    [W:0.065 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site