public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Colin Vidal <colin@cvidal.org>
To: Joe Perches <joe@perches.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"open list:STAGING SUBSYSTEM" <devel@driverdev.osuosl.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Staging: fix coding style in rtl8188eu/core
Date: Tue, 02 Feb 2016 22:28:33 +0100	[thread overview]
Message-ID: <1454448513.3898.3.camel@cvidal.org> (raw)
In-Reply-To: <1454447665.7291.40.camel@perches.com>

On Tue, 2016-02-02 at 13:14 -0800, Joe Perches wrote:
> On Tue, 2016-02-02 at 21:57 +0100, Colin Vidal wrote:
> > Set constant on the left of the test, and jump a new line to avoid
> > to
> > exceed the 80 char length limit.
> []
> > diff --git a/drivers/staging/rtl8188eu/core/rtw_iol.c
> > b/drivers/staging/rtl8188eu/core/rtw_iol.c
> []
> > @@ -22,10 +22,11 @@
> >  
> >  bool rtw_IOL_applied(struct adapter  *adapter)
> >  {
> > -	if (1 == adapter->registrypriv.fw_iol)
> > +	if (adapter->registrypriv.fw_iol == 1)
> >  		return true;
> >  
> > -	if ((2 == adapter->registrypriv.fw_iol) &&
> > (!adapter_to_dvobj(adapter)->ishighspeed))
> > +	if ((adapter->registrypriv.fw_iol == 2)
> > +	    && (!adapter_to_dvobj(adapter)->ishighspeed))
> >  		return true;
> >  	return false;
> >  }
> 
> Please review your patches with scripts/checkpatch.pl
> 
> Perhaps this is better as:
> 
> bool rtw_IOL_applied(struct adapter *adapter)
> {
> 	if (adapter->registrypriv.fw_iol == 1)
> 		return true;
> 
> 	if (adapter->registrypriv.fw_iol == 2 &&
> 	    !adapter_to_dvobj(adapter)->ishighspeed)
> 		return true;
> 
> 	return false;
> }
> 
> or maybe even
> 
> bool rtw_IOL_applied(struct adapter *adapter)
> {
> 	return adapter->registrypriv.fw_iol == 1 ||
> 	       (adapter->registrypriv.fw_iol == 2 &&
> 		!adapter_to_dvobj(adapter)->ishighspeed);
> }
> 

Oh, yeah, the second one is obviously finer. If I'm right, I should
resend a new patch with a subject which looks something like "[PATCH
v2] ... " ? 

Thanks

  reply	other threads:[~2016-02-02 21:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 20:57 [PATCH] Staging: fix coding style in rtl8188eu/core Colin Vidal
2016-02-02 21:14 ` Joe Perches
2016-02-02 21:28   ` Colin Vidal [this message]
2016-02-02 22:51     ` Joe Perches
  -- strict thread matches above, loose matches on Subject: below --
2016-02-02 22:54 Colin Vidal
2016-02-02 23:04 ` Colin Vidal

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=1454448513.3898.3.camel@cvidal.org \
    --to=colin@cvidal.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@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