linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] bitfield: avoid gcc-8 -Wint-in-bool-context warning
Date: Tue, 14 Aug 2018 10:43:45 +0200	[thread overview]
Message-ID: <CAK8P3a2+ZLN_HmNJiNs4YFsvkqewnwq-a2d0uNe+RS61RAMYOQ@mail.gmail.com> (raw)
In-Reply-To: <1534233405.3547.4.camel@sipsolutions.net>

On Tue, Aug 14, 2018 at 9:57 AM Johannes Berg <johannes@sipsolutions.net> wrote:
> On Tue, 2018-08-14 at 08:57 +0900, Masahiro Yamada wrote:
> > 2018-08-14 7:09 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:

> > > drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1025:21: note: in expansion of macro 'FIELD_GET'
> > >     le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_SIBG_SYM_OR_USER_NUM_MASK,
> >
> >
> > How about fixing the root cause
> > in drivers/net/wireless/intel/iwlwifi/fw/api/rx.h ?
> >
> >
> > #define IWL_RX_HE_PHY_SIBG_SYM_OR_USER_NUM_MASK   0x1e00000000ULL
> >
> >
> > enum iwl_rx_he_phy looks really strange.
>
> Why? I don't think this is a problem, the enum is used here to get
> constants so that we can also have documentation for them. That's a
> common and accepted technique.

I think using #define is more common overall, but I also prefer using enum
for this in my own code.

   Arnd

  reply	other threads:[~2018-08-14  8:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-13 22:09 [PATCH] bitfield: avoid gcc-8 -Wint-in-bool-context warning Arnd Bergmann
2018-08-13 23:57 ` Masahiro Yamada
2018-08-14  7:56   ` Johannes Berg
2018-08-14  8:43     ` Arnd Bergmann [this message]
2018-08-14  9:31     ` Masahiro Yamada
2018-08-14 10:06     ` David Laight
2018-08-14 11:08       ` Arnd Bergmann
2018-08-14 11:10         ` Johannes Berg
2018-08-14 13:09         ` David Laight
2018-08-14 23:11 ` Andrew Morton
2018-08-14 23:13   ` Andrew Morton

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=CAK8P3a2+ZLN_HmNJiNs4YFsvkqewnwq-a2d0uNe+RS61RAMYOQ@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yamada.masahiro@socionext.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;
as well as URLs for NNTP newsgroup(s).