From: Joe Perches <joe@perches.com>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>,
linux-wimax@intel.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: wimax: i2400m: control.c: Cleaning up conjunction always evaluates to false
Date: Sat, 07 Jun 2014 04:42:55 -0700 [thread overview]
Message-ID: <1402141375.28369.2.camel@joe-AO725> (raw)
In-Reply-To: <1402140397-17404-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
On Sat, 2014-06-07 at 13:26 +0200, Rickard Strandqvist wrote:
> Logical conjunction always evaluates to false: minor < 2 && minor > 1
> I guess what you wanted is rather: minor > 2 || minor < 1
[]
> diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c
[]
> @@ -1061,7 +1061,7 @@ int i2400m_firmware_check(struct i2400m *i2400m)
> goto error_bad_major;
> }
> result = 0;
> - if (minor < I2400M_HDIv_MINOR_2 && minor > I2400M_HDIv_MINOR)
> + if (minor > I2400M_HDIv_MINOR_2 || minor < I2400M_HDIv_MINOR)
perhaps clearer as:
if (!(minor == I2400M_HDIv_MINOR || minor == I2400M_HDIv_MINOR_2))
> dev_warn(dev, "untested minor fw version %u.%u.%u\n",
> major, minor, branch);
> /* Yes, we ignore the branch -- we don't have to track it */
next prev parent reply other threads:[~2014-06-07 11:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-07 11:26 Rickard Strandqvist
2014-06-07 11:42 ` Joe Perches [this message]
2014-06-07 11:52 ` Rickard Strandqvist
2014-06-11 7:15 ` David Miller
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=1402141375.28369.2.camel@joe-AO725 \
--to=joe@perches.com \
--cc=inaky.perez-gonzalez@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wimax@intel.com \
--cc=netdev@vger.kernel.org \
--cc=rickard_strandqvist@spectrumdigital.se \
/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
all inboxes | Powered by JetHome®