lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YJUvlC6RVGuonNmu@f3>
Date:   Fri, 7 May 2021 21:16:20 +0900
From:   Benjamin Poirier <benjamin.poirier@...il.com>
To:     Coiby Xu <coiby.xu@...il.com>
Cc:     linux-staging@...ts.linux.dev, netdev@...r.kernel.org
Subject: Re: About improving the qlge Ethernet driver by following
 drivers/staging/qlge/TODO

On 2021-05-07 09:32 +0800, Coiby Xu wrote:
[...]
> > > > * fix weird line wrapping (all over, ex. the ql_set_routing_reg() calls in
> > > >   qlge_set_multicast_list()).
> > > 
> > > This issue of weird line wrapping is supposed to be all over. But I can
> > > only find the ql_set_routing_reg() calls in qlge_set_multicast_list have
> > > this problem,
> > > 
> > > 			if (qlge_set_routing_reg
> > > 			    (qdev, RT_IDX_PROMISCUOUS_SLOT, RT_IDX_VALID, 1)) {
> > > 
> > > I can't find other places where functions calls put square and arguments
> > > in the new line. Could you give more hints?
> > 
> > Here are other examples of what I would call weird line wrapping:
> > 
> > 	status = qlge_validate_flash(qdev,
> > 				     sizeof(struct flash_params_8000) /
> > 				   sizeof(u16),
> > 				   "8000");
> 
> Oh, I also found this one but I think it more fits another TODO item,
> i.e., "* fix weird indentation (all over, ex. the for loops in
> qlge_get_stats())".
> 
> > 
> > 	status = qlge_wait_reg_rdy(qdev,
> > 				   XGMAC_ADDR, XGMAC_ADDR_RDY, XGMAC_ADDR_XME);
> > 
> > [...]
> 
> Do you mean we should change it as follows,
> 
> 
> 	status = qlge_wait_reg_rdy(qdev, XGMAC_ADDR, XGMAC_ADDR_RDY,
> 				               XGMAC_ADDR_XME);

	status = qlge_wait_reg_rdy(qdev, XGMAC_ADDR, XGMAC_ADDR_RDY,
				   XGMAC_ADDR_XME);

> 
> "V=" in vim could detect some indentation problems but not the line
> wrapping issue. So I just scanned the code manually to find this issue. Do
> you know there is a tool that could check if the code fits the kernel
> coding style?

See Documentation/process/coding-style.rst section 9.

You can search online for info about how to configure vim for the kernel
coding style, ex:
https://stackoverflow.com/questions/33676829/vim-configuration-for-linux-kernel-development

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ