linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Galo <anglor@varoa.net>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-next@vger.kernel.org,
	Larry Finger <Larry.Finger@lwfinger.net>
Subject: Re: [PATCH] staging: rtl8188eu: style fixes
Date: Sun, 23 Apr 2017 21:00:47 +0200	[thread overview]
Message-ID: <20170423190046.GA7641@lear> (raw)
In-Reply-To: <20170421182449.475cc6ea@canb.auug.org.au>

On 21-04, Stephen Rothwell wrote:
> Hi Galo,
> 
> On Fri, 21 Apr 2017 10:06:25 +0200 Galo <anglor@varoa.net> wrote:
> >
> > @@ -1461,7 +1460,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
> >  			goto exit;
> >  	}
> >  
> > -	if (*candidate == NULL || (*candidate)->network.Rssi < competitor->network.Rssi) {
> > +	if (!candidate || (*candidate)->network.Rssi < competitor->network.Rssi) {
> 
> These are not equivalent.  It should be "!*candidate"
> 
> -- 
> Cheers,
> Stephen Rothwell
> 

Thanks a lot for catching this.  I blindly copied from the checkpatch
suggestion, which is indeed wrong:

    CHECK: Comparison to NULL could be written "!candidate"
    #216: FILE: drivers/staging/rtl8188eu/core/rtw_mlme.c:1463:
    +       if (*candidate == NULL || (*candidate)->network.Rssi <
    competitor->network.Rssi)  {}

Fixing this in a new version of the patch, I'll report the issue in
checkpatch separately.

Galo

  reply	other threads:[~2017-04-23 19:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-20 21:42 [PATCH] staging: rtl8188eu: style fixes Galo Navarro
2017-04-21  4:21 ` Greg Kroah-Hartman
2017-04-21  8:06   ` Galo
2017-04-21  8:18     ` Greg Kroah-Hartman
2017-04-23 19:03       ` [PATCH v2] " Galo
2017-04-28 10:29         ` Greg Kroah-Hartman
2017-04-21  8:24     ` [PATCH] " Stephen Rothwell
2017-04-23 19:00       ` Galo [this message]
2017-06-02 14:36 Galo
2017-06-02 17:41 ` Nicholas Mc Guire
2017-06-03  8:18 ` Greg Kroah-Hartman

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=20170423190046.GA7641@lear \
    --to=anglor@varoa.net \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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).