Skip to contentSkip to conversation

crypto: ixp4xx - Remove COMPILE_TEST from Kconfig dependencies

PATCH New Tom Zanussi 3 participants 3 messages Apr 7, 2023 – Apr 13, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: ixp4xx - Remove COMPILE_TEST from Kconfig dependencies

COMPILE_TEST was added during the move to drivers/crypto/intel/ but shouldn't have been as it triggers a build bug when not compiled by the target compiler. So remove it to match the original.

---
 drivers/crypto/intel/ixp4xx/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/intel/ixp4xx/Kconfig +1 -1
index af3cc5688328..4cfb1e37f45b 100644
@@ -1,6 +1,6 @@
 config CRYPTO_DEV_IXP4XX
 	tristate "Driver for IXP4xx crypto hardware acceleration"
-	depends on (ARCH_IXP4XX || COMPILE_TEST) && IXP4XX_QMGR && IXP4XX_NPE
+	depends on ARCH_IXP4XX && IXP4XX_QMGR && IXP4XX_NPE
 	select CRYPTO_AES
 	select CRYPTO_DES
 	select CRYPTO_ECB
Signature · 1 line
2.34.1
maintainer
#1 lore raw

PATCH 1/1 crypto: ixp4xx - Do not check word size when compile testing

Quoted 10 lines · Tom Zanussi

COMPILE_TEST was added during the move to drivers/crypto/intel/ but shouldn't have been as it triggers a build bug when not compiled by the target compiler. So remove it to match the original.

---
 drivers/crypto/intel/ixp4xx/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

We could also fix it by making the BUILD_BUG_ON conditional:

---8<---
The BUILD_BUG_ON preventing compilation on foreign architectures should be disabled when we're doing compile testing.

drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c +2 -1
index b63e2359a133..5d640f13ad1c 100644
@@ -263,7 +263,8 @@ static int setup_crypt_desc(void)
 {
 	struct device *dev = &pdev->dev;
 
-	BUILD_BUG_ON(sizeof(struct crypt_ctl) != 64);
+	BUILD_BUG_ON(!IS_ENABLED(CONFIG_COMPILE_TEST) &&
+		     sizeof(struct crypt_ctl) != 64);
 	crypt_virt = dma_alloc_coherent(dev,
 					NPE_QLEN * sizeof(struct crypt_ctl),
 					&crypt_phys, GFP_ATOMIC);
Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Reviewed-by on v1 1/1
#2 lore raw

Re: [PATCH] crypto: ixp4xx - Do not check word size when compile testing

Quoted 14 lines · Herbert Xu
Quoted 10 lines · Tom Zanussi

COMPILE_TEST was added during the move to drivers/crypto/intel/ but shouldn't have been as it triggers a build bug when not compiled by the target compiler. So remove it to match the original.

---
 drivers/crypto/intel/ixp4xx/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

We could also fix it by making the BUILD_BUG_ON conditional:

Quoted 8 lines

---8<---
The BUILD_BUG_ON preventing compilation on foreign architectures should be disabled when we're doing compile testing.

This fix is more elegant I think, as it keeps the compile coverage.

Yours,
Linus Walleij