netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Poirier <benjamin.poirier@gmail.com>
To: Coiby Xu <coiby.xu@gmail.com>
Cc: linux-staging@lists.linux.dev, netdev@vger.kernel.org
Subject: Re: About improving the qlge Ethernet driver by following drivers/staging/qlge/TODO
Date: Fri, 7 May 2021 21:16:20 +0900	[thread overview]
Message-ID: <YJUvlC6RVGuonNmu@f3> (raw)
In-Reply-To: <20210507013239.4kmzsxtxnrpdqhuk@Rk>

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

  reply	other threads:[~2021-05-07 12:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04 13:14 About improving the qlge Ethernet driver by following drivers/staging/qlge/TODO Coiby Xu
2021-05-05  8:59 ` Benjamin Poirier
2021-05-07  1:32   ` Coiby Xu
2021-05-07 12:16     ` Benjamin Poirier [this message]
2021-05-07 13:25       ` Coiby Xu
2021-05-08 23:27     ` Coiby Xu
2021-05-09  7:51       ` Benjamin Poirier
2021-05-09 23:54         ` Coiby Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YJUvlC6RVGuonNmu@f3 \
    --to=benjamin.poirier@gmail.com \
    --cc=coiby.xu@gmail.com \
    --cc=linux-staging@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).