RE: [PATCH] bitfield: avoid gcc-8 -Wint-in-bool-context warning
From: David Laight
Date: Tue Aug 14 2018 - 09:27:46 EST
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 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.
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.
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.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)