[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190307.094255.1632492378766651810.davem@davemloft.net>
Date: Thu, 07 Mar 2019 09:42:55 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: arnd@...db.de
Cc: benve@...co.com, _govind@....com, pkaustub@...co.com,
ndesaulniers@...gle.com, natechancellor@...il.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [v2] enic: fix build warning without
CONFIG_CPUMASK_OFFSTACK
From: Arnd Bergmann <arnd@...db.de>
Date: Thu, 7 Mar 2019 16:52:24 +0100
> 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@...db.de>
> ---
> v2: use cpumask_available() instead of open-coding a copy
Applied.
Powered by blists - more mailing lists