* [PATCH 1/2] crypto: octeontx2 - fix -Wpointer-bool-conversion warning
@ 2021-02-04 15:42 Arnd Bergmann
2021-02-04 15:42 ` [PATCH 2/2] crypto: marvell - fix ethernet driver dependency Arnd Bergmann
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Arnd Bergmann @ 2021-02-04 15:42 UTC (permalink / raw)
To: Boris Brezillon, Arnaud Ebalard, Srujana Challa, Herbert Xu,
David S. Miller, Nathan Chancellor, Nick Desaulniers,
Suheil Chandran, Lukasz Bartosik
Cc: Arnd Bergmann, linux-crypto, linux-kernel, clang-built-linux
From: Arnd Bergmann <arnd@arndb.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@arndb.de>
---
drivers/crypto/marvell/octeontx2/otx2_cptlf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptlf.c b/drivers/crypto/marvell/octeontx2/otx2_cptlf.c
index e27ea8909368..823a4571fd67 100644
--- a/drivers/crypto/marvell/octeontx2/otx2_cptlf.c
+++ b/drivers/crypto/marvell/octeontx2/otx2_cptlf.c
@@ -331,8 +331,7 @@ void otx2_cptlf_free_irqs_affinity(struct otx2_cptlfs_info *lfs)
irq_set_affinity_hint(pci_irq_vector(lfs->pdev,
lfs->lf[slot].msix_offset +
offs), NULL);
- if (lfs->lf[slot].affinity_mask)
- free_cpumask_var(lfs->lf[slot].affinity_mask);
+ free_cpumask_var(lfs->lf[slot].affinity_mask);
}
}
--
2.29.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] crypto: marvell - fix ethernet driver dependency
2021-02-04 15:42 [PATCH 1/2] crypto: octeontx2 - fix -Wpointer-bool-conversion warning Arnd Bergmann
@ 2021-02-04 15:42 ` Arnd Bergmann
2021-02-04 19:47 ` Herbert Xu
2021-02-04 21:22 ` [PATCH 1/2] crypto: octeontx2 - fix -Wpointer-bool-conversion warning Nathan Chancellor
2021-02-10 7:24 ` Herbert Xu
2 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2021-02-04 15:42 UTC (permalink / raw)
To: Boris Brezillon, Arnaud Ebalard, Srujana Challa, Herbert Xu,
David S. Miller, Lukasz Bartosik, Suheil Chandran
Cc: Arnd Bergmann, linux-crypto, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The OcteonTX2 CPT driver force-enables the OCTEONTX2_MBOX symbol,
which fails when network drivers are disabled globally
WARNING: unmet direct dependencies detected for OCTEONTX2_MBOX
Depends on [n]: NETDEVICES [=n] && ETHERNET [=n] && NET_VENDOR_MARVELL [=n]
Selected by [y]:
- CRYPTO_DEV_OCTEONTX2_CPT [=y] && CRYPTO [=y] && CRYPTO_HW [=y] && (ARM64 [=y] || COMPILE_TEST [=y]) && PCI_MSI [=y] && 64BIT [=y] && CRYPTO_LIB_AES [=y]
The crypto driver actually fails to link without the ethernet side,
so this is a hard dependency. Change the 'select' into 'depends on'
to make it build reliably without warnings.
Fixes: 5e8ce8334734 ("crypto: marvell - add Marvell OcteonTX2 CPT PF driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/crypto/marvell/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/marvell/Kconfig b/drivers/crypto/marvell/Kconfig
index 2efbd79180ce..576d9e46fb88 100644
--- a/drivers/crypto/marvell/Kconfig
+++ b/drivers/crypto/marvell/Kconfig
@@ -39,9 +39,9 @@ config CRYPTO_DEV_OCTEONTX_CPT
config CRYPTO_DEV_OCTEONTX2_CPT
tristate "Marvell OcteonTX2 CPT driver"
depends on ARM64 || COMPILE_TEST
+ depends on OCTEONTX2_MBOX
depends on PCI_MSI && 64BIT
depends on CRYPTO_LIB_AES
- select OCTEONTX2_MBOX
select CRYPTO_DEV_MARVELL
select CRYPTO_SKCIPHER
select CRYPTO_HASH
--
2.29.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] crypto: marvell - fix ethernet driver dependency
2021-02-04 15:42 ` [PATCH 2/2] crypto: marvell - fix ethernet driver dependency Arnd Bergmann
@ 2021-02-04 19:47 ` Herbert Xu
0 siblings, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2021-02-04 19:47 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Boris Brezillon, Arnaud Ebalard, Srujana Challa, David S. Miller,
Lukasz Bartosik, Suheil Chandran, Arnd Bergmann, linux-crypto,
linux-kernel
On Thu, Feb 04, 2021 at 04:42:16PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The OcteonTX2 CPT driver force-enables the OCTEONTX2_MBOX symbol,
> which fails when network drivers are disabled globally
>
> WARNING: unmet direct dependencies detected for OCTEONTX2_MBOX
> Depends on [n]: NETDEVICES [=n] && ETHERNET [=n] && NET_VENDOR_MARVELL [=n]
> Selected by [y]:
> - CRYPTO_DEV_OCTEONTX2_CPT [=y] && CRYPTO [=y] && CRYPTO_HW [=y] && (ARM64 [=y] || COMPILE_TEST [=y]) && PCI_MSI [=y] && 64BIT [=y] && CRYPTO_LIB_AES [=y]
>
> The crypto driver actually fails to link without the ethernet side,
> so this is a hard dependency. Change the 'select' into 'depends on'
> to make it build reliably without warnings.
>
> Fixes: 5e8ce8334734 ("crypto: marvell - add Marvell OcteonTX2 CPT PF driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/crypto/marvell/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
There is already a patch for this:
https://patchwork.kernel.org/project/linux-crypto/patch/20210129054856.GA20020@gondor.apana.org.au/
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] crypto: octeontx2 - fix -Wpointer-bool-conversion warning
2021-02-04 15:42 [PATCH 1/2] crypto: octeontx2 - fix -Wpointer-bool-conversion warning Arnd Bergmann
2021-02-04 15:42 ` [PATCH 2/2] crypto: marvell - fix ethernet driver dependency Arnd Bergmann
@ 2021-02-04 21:22 ` Nathan Chancellor
2021-02-10 7:24 ` Herbert Xu
2 siblings, 0 replies; 5+ messages in thread
From: Nathan Chancellor @ 2021-02-04 21:22 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Boris Brezillon, Arnaud Ebalard, Srujana Challa, Herbert Xu,
David S. Miller, Nick Desaulniers, Suheil Chandran,
Lukasz Bartosik, Arnd Bergmann, linux-crypto, linux-kernel,
clang-built-linux
On Thu, Feb 04, 2021 at 04:42:15PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.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@arndb.de>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
> ---
> drivers/crypto/marvell/octeontx2/otx2_cptlf.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptlf.c b/drivers/crypto/marvell/octeontx2/otx2_cptlf.c
> index e27ea8909368..823a4571fd67 100644
> --- a/drivers/crypto/marvell/octeontx2/otx2_cptlf.c
> +++ b/drivers/crypto/marvell/octeontx2/otx2_cptlf.c
> @@ -331,8 +331,7 @@ void otx2_cptlf_free_irqs_affinity(struct otx2_cptlfs_info *lfs)
> irq_set_affinity_hint(pci_irq_vector(lfs->pdev,
> lfs->lf[slot].msix_offset +
> offs), NULL);
> - if (lfs->lf[slot].affinity_mask)
> - free_cpumask_var(lfs->lf[slot].affinity_mask);
> + free_cpumask_var(lfs->lf[slot].affinity_mask);
> }
> }
>
> --
> 2.29.2
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] crypto: octeontx2 - fix -Wpointer-bool-conversion warning
2021-02-04 15:42 [PATCH 1/2] crypto: octeontx2 - fix -Wpointer-bool-conversion warning Arnd Bergmann
2021-02-04 15:42 ` [PATCH 2/2] crypto: marvell - fix ethernet driver dependency Arnd Bergmann
2021-02-04 21:22 ` [PATCH 1/2] crypto: octeontx2 - fix -Wpointer-bool-conversion warning Nathan Chancellor
@ 2021-02-10 7:24 ` Herbert Xu
2 siblings, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2021-02-10 7:24 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Boris Brezillon, Arnaud Ebalard, Srujana Challa, David S. Miller,
Nathan Chancellor, Nick Desaulniers, Suheil Chandran,
Lukasz Bartosik, Arnd Bergmann, linux-crypto, linux-kernel,
clang-built-linux
On Thu, Feb 04, 2021 at 04:42:15PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.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@arndb.de>
> ---
> drivers/crypto/marvell/octeontx2/otx2_cptlf.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-02-10 7:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 15:42 [PATCH 1/2] crypto: octeontx2 - fix -Wpointer-bool-conversion warning Arnd Bergmann
2021-02-04 15:42 ` [PATCH 2/2] crypto: marvell - fix ethernet driver dependency Arnd Bergmann
2021-02-04 19:47 ` Herbert Xu
2021-02-04 21:22 ` [PATCH 1/2] crypto: octeontx2 - fix -Wpointer-bool-conversion warning Nathan Chancellor
2021-02-10 7:24 ` Herbert Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.