Arnd Bergmann 43d281662f enic: fix build warning without CONFIG_CPUMASK_OFFSTACK
The enic driver relies on the CONFIG_CPUMASK_OFFSTACK feature to
dynamically allocate a struct member, but this is normally intended for
local variables.

Building with clang, I get a warning for a few locations that check the
address of the cpumask_var_t:

drivers/net/ethernet/cisco/enic/enic_main.c:122:22: error: address of array 'enic->msix[i].affinity_mask' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]

As far as I can tell, the code is still correct, as the truth value of
the pointer is what we need in this configuration. To get rid of
the warning, use cpumask_available() instead of checking the
pointer directly.

Fixes: 322cf7e3a4e8 ("enic: assign affinity hint to interrupts")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-03-07 09:41:08 -08:00
..
2019-03-04 19:16:09 -08:00
2019-02-20 11:40:21 -08:00
2019-03-04 15:32:51 +00:00
2019-02-28 14:05:33 +10:00
2019-03-01 09:13:04 -08:00
2019-03-04 19:33:04 -08:00
2019-02-15 09:12:28 -08:00
2019-03-01 09:50:10 +01:00
2019-03-04 19:23:56 -08:00
2019-03-02 11:39:54 -08:00
2019-03-04 15:32:51 +00:00