From: Matthias Kaehlcke <mka@chromium.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "David S . Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org, Grant Grundler <grundler@chromium.org>,
Michael Davidson <md@google.com>,
Greg Hackmann <ghackmann@google.com>
Subject: Re: [PATCH] mac80211: Fix clang warning about constant operand in logical operation
Date: Thu, 6 Apr 2017 16:07:26 -0700 [thread overview]
Message-ID: <20170406230726.GB78690@google.com> (raw)
In-Reply-To: <1491519117.11399.10.camel@sipsolutions.net>
El Fri, Apr 07, 2017 at 12:51:57AM +0200 Johannes Berg ha dit:
> On Thu, 2017-04-06 at 15:42 -0700, Matthias Kaehlcke wrote:
> >
> > Thanks, it would also require to move the initialization of
> > ieee80211_default_rc_algo into an ifdef. If you can live with such a
> > solution I'm happy to change it.
>
> I think that'd be something I can live with, yeah.
>
> > > git grep 'IS_ENABLED(' | grep '&&'
> >
> > Indeed the warning is not triggered by these constructs. It seems
> > clang only emits the warning when the constant operand is not
> > boolean.
>
> That points to just adding "> 0" to the condition here as another
> alternative solution, I guess? With a comment to make sure it's not
> removed again, that'd seem like the best thing to do.
Good point, that's more digestible. I'll send an updated change soon.
Matthias
next prev parent reply other threads:[~2017-04-06 23:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 18:56 [PATCH] mac80211: Fix clang warning about constant operand in logical operation Matthias Kaehlcke
2017-04-06 18:56 ` Matthias Kaehlcke
2017-04-06 19:11 ` Johannes Berg
2017-04-06 19:11 ` Johannes Berg
2017-04-06 19:24 ` Matthias Kaehlcke
2017-04-06 21:12 ` Johannes Berg
2017-04-06 21:12 ` Johannes Berg
2017-04-06 22:42 ` Matthias Kaehlcke
2017-04-06 22:51 ` Johannes Berg
2017-04-06 23:07 ` Matthias Kaehlcke [this message]
2017-04-10 14:12 ` David Laight
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=20170406230726.GB78690@google.com \
--to=mka@chromium.org \
--cc=davem@davemloft.net \
--cc=ghackmann@google.com \
--cc=grundler@chromium.org \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=md@google.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.