[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210210072407.GM4493@gondor.apana.org.au>
Date: Wed, 10 Feb 2021 18:24:07 +1100
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Boris Brezillon <bbrezillon@...nel.org>,
Arnaud Ebalard <arno@...isbad.org>,
Srujana Challa <schalla@...vell.com>,
"David S. Miller" <davem@...emloft.net>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Suheil Chandran <schandran@...vell.com>,
Lukasz Bartosik <lbartosik@...vell.com>,
Arnd Bergmann <arnd@...db.de>, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: Re: [PATCH 1/2] crypto: octeontx2 - fix -Wpointer-bool-conversion
warning
On Thu, Feb 04, 2021 at 04:42:15PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> When CONFIG_CPUMASK_OFFSTACK is disabled, clang reports a warning
> about a bogus condition:
>
> drivers/crypto/marvell/octeontx2/otx2_cptlf.c:334:21: error: address of array 'lfs->lf[slot].affinity_mask' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
> if (lfs->lf[slot].affinity_mask)
> ~~ ~~~~~~~~~~~~~~^~~~~~~~~~~~~
>
> In this configuration, the free_cpumask_var() function does nothing,
> so the condition could be skipped.
>
> When the option is enabled, there is no warning, but the check
> is also redundant because free_cpumask_var() falls back to kfree(),
> which is documented as ignoring NULL pointers.
>
> Remove the check to avoid the warning.
>
> Fixes: 64506017030d ("crypto: octeontx2 - add LF framework")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> drivers/crypto/marvell/octeontx2/otx2_cptlf.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists