From: Dan Carpenter <dan.carpenter@oracle.com>
To: Luis de Bethencourt <luisbg@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
hamohammed.sa@gmail.com, paul.gortmaker@windriver.com,
gregkh@linuxfoundation.org, gdonald@gmail.com,
cristina.opriceana@gmail.com
Subject: Re: [PATCH] staging: rtl8192u: simplify conditional statement
Date: Thu, 15 Oct 2015 15:56:12 +0300 [thread overview]
Message-ID: <20151015125611.GZ7340@mwanda> (raw)
In-Reply-To: <1444912394-17664-1-git-send-email-luisbg@osg.samsung.com>
On Thu, Oct 15, 2015 at 01:33:14PM +0100, Luis de Bethencourt wrote:
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
> index c443e2e..1c2d1a4 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
> @@ -466,10 +466,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
> /* this prevent excessive time wait when we
> * need to wait for a syncro scan to end..
> */
> - if(ieee->state < IEEE80211_LINKED)
> - ;
> - else
> - if (ieee->sync_scan_hurryup)
> + if(!ieee->state > IEEE80211_LINKED && ieee->sync_scan_hurryup)
The precedence is wrong here. What you wrote is equivalent to:
if ((!ieee->state) > IEEE80211_LINKED)
goto out;
Which can never be true. Also use checkpatch.pl on your patches before
sending.
regards,
dan carpenter
next prev parent reply other threads:[~2015-10-15 12:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-15 12:33 [PATCH] staging: rtl8192u: simplify conditional statement Luis de Bethencourt
2015-10-15 12:56 ` Dan Carpenter [this message]
2015-10-15 15:14 ` kbuild test robot
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=20151015125611.GZ7340@mwanda \
--to=dan.carpenter@oracle.com \
--cc=cristina.opriceana@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gdonald@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hamohammed.sa@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luisbg@osg.samsung.com \
--cc=paul.gortmaker@windriver.com \
/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