diff mbox series

[2/2] crypto: marvell - fix ethernet driver dependency

Message ID 20210204154230.1702563-2-arnd@kernel.org (mailing list archive)
State Not Applicable
Delegated to: Herbert Xu
Headers show
Series [1/2] crypto: octeontx2 - fix -Wpointer-bool-conversion warning | expand

Commit Message

Arnd Bergmann Feb. 4, 2021, 3:42 p.m. UTC
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(-)

Comments

Herbert Xu Feb. 4, 2021, 7:47 p.m. UTC | #1
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,
diff mbox series

Patch

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