Re: [PATCH] bitfield: avoid gcc-8 -Wint-in-bool-context warning

2018-08-14 Thread Andrew Morton
On Tue, 14 Aug 2018 16:11:06 -0700 Andrew Morton wrote: > > include/linux/bitfield.h:103:3: note: in expansion of macro > > '__BF_FIELD_CHECK' > >__BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \ > >^~~~ > > drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1025:21: note: in e

Re: [PATCH] bitfield: avoid gcc-8 -Wint-in-bool-context warning

2018-08-14 Thread Andrew Morton
On Tue, 14 Aug 2018 00:09:34 +0200 Arnd Bergmann wrote: > Passing an enum into FIELD_GET() produces a long but harmless warning on > newer compilers: > > from include/linux/linkage.h:7, > from include/linux/kernel.h:7, > from include/linux/skbuf

RE: [PATCH] bitfield: avoid gcc-8 -Wint-in-bool-context warning

2018-08-14 Thread David Laight
From: Arnd Bergmann > Sent: 14 August 2018 12:08 ... > > There are also a whole load of crappy __packed in that header file. > > There might be one or two 64bit items on 32bit boundaries but > > that can be solved without using __packed. > > Agreed, this likely causes problems on architectures wit

Re: [PATCH] bitfield: avoid gcc-8 -Wint-in-bool-context warning

2018-08-14 Thread Johannes Berg
On Tue, 2018-08-14 at 13:08 +0200, Arnd Bergmann wrote: > > It would be much more useful to indicate where the values are used. > > Such a field/parameter could (probably) have the type of the enum. > > But, at some point, the compiler might start barfing at that at well. > > I think the compiler

Re: [PATCH] bitfield: avoid gcc-8 -Wint-in-bool-context warning

2018-08-14 Thread Arnd Bergmann
On Tue, Aug 14, 2018 at 12:04 PM David Laight wrote: > > From: Johannes Berg > > Sent: 14 August 2018 08:57 > ... > > > 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 0x1eULL > >

RE: [PATCH] bitfield: avoid gcc-8 -Wint-in-bool-context warning

2018-08-14 Thread David Laight
From: Johannes Berg > Sent: 14 August 2018 08:57 ... > > 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 0x1eULL > > > > > > enum iwl_rx_he_phy looks really strange. > > Why? I don't think

Re: [PATCH] bitfield: avoid gcc-8 -Wint-in-bool-context warning

2018-08-14 Thread Masahiro Yamada
2018-08-14 16:56 GMT+09:00 Johannes Berg : > On Tue, 2018-08-14 at 08:57 +0900, Masahiro Yamada wrote: >> 2018-08-14 7:09 GMT+09:00 Arnd Bergmann : >> > Passing an enum into FIELD_GET() produces a long but harmless warning on >> > newer compilers: >> > >> > from include/linux/linka

Re: [PATCH] bitfield: avoid gcc-8 -Wint-in-bool-context warning

2018-08-14 Thread Arnd Bergmann
On Tue, Aug 14, 2018 at 9:57 AM Johannes Berg wrote: > On Tue, 2018-08-14 at 08:57 +0900, Masahiro Yamada wrote: > > 2018-08-14 7:09 GMT+09:00 Arnd Bergmann : > > > drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1025:21: note: in expansion > > > of macro 'FIELD_GET' > > > le16_encode_bits(FIE

Re: [PATCH] bitfield: avoid gcc-8 -Wint-in-bool-context warning

2018-08-14 Thread Johannes Berg
On Tue, 2018-08-14 at 08:57 +0900, Masahiro Yamada wrote: > 2018-08-14 7:09 GMT+09:00 Arnd Bergmann : > > Passing an enum into FIELD_GET() produces a long but harmless warning on > > newer compilers: > > > > from include/linux/linkage.h:7, > > from include/linux/k

Re: [PATCH] bitfield: avoid gcc-8 -Wint-in-bool-context warning

2018-08-13 Thread Masahiro Yamada
2018-08-14 7:09 GMT+09:00 Arnd Bergmann : > Passing an enum into FIELD_GET() produces a long but harmless warning on > newer compilers: > > from include/linux/linkage.h:7, > from include/linux/kernel.h:7, > from include/linux/skbuff.h:17, >