[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a2+ZLN_HmNJiNs4YFsvkqewnwq-a2d0uNe+RS61RAMYOQ@mail.gmail.com>
Date: Tue, 14 Aug 2018 10:43:45 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Johannes Berg <johannes@...solutions.net>
Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Al Viro <viro@...iv.linux.org.uk>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] bitfield: avoid gcc-8 -Wint-in-bool-context warning
On Tue, Aug 14, 2018 at 9:57 AM Johannes Berg <johannes@...solutions.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@...db.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
Powered by blists - more mailing lists