lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ