Skip to contentSkip to conversation

crypto: atmel-i2c - select CONFIG_BITREVERSE

PATCH In review Arnd Bergmann 2 participants 2 messages Dec 3, 2020 – Dec 11, 2020 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: atmel-i2c - select CONFIG_BITREVERSE

From: Arnd Bergmann <[email protected]>

The bitreverse helper is almost always built into the kernel, but in a rare randconfig build it is possible to hit a case in which it is a loadable module while the atmel-i2c driver is built-in:

arm-linux-gnueabi-ld: drivers/crypto/atmel-i2c.o: in function `atmel_i2c_checksum':
atmel-i2c.c:(.text+0xa0): undefined reference to `byte_rev_table'

Add one more 'select' statement to prevent this.

Fixes 11105693fa05 ("crypto: atmel-ecc - introduce Microchip / Atmel ECC driver")
---
 drivers/crypto/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/crypto/Kconfig +1 -0
index 6a02ab13835c..67a17644ce17 100644
@@ -550,6 +550,7 @@ config CRYPTO_DEV_ATMEL_SHA
 
 config CRYPTO_DEV_ATMEL_I2C
 	tristate
+	select BITREVERSE
 
 config CRYPTO_DEV_ATMEL_ECC
 	tristate "Support for Microchip / Atmel ECC hw accelerator"
Signature · 1 line
2.27.0
maintainer
#1 lore raw
Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The bitreverse helper is almost always built into the kernel, but in a rare randconfig build it is possible to hit a case in which it is a loadable module while the atmel-i2c driver is built-in:

arm-linux-gnueabi-ld: drivers/crypto/atmel-i2c.o: in function `atmel_i2c_checksum':
atmel-i2c.c:(.text+0xa0): undefined reference to `byte_rev_table'

Quoted 7 lines

Add one more 'select' statement to prevent this.

Fixes 11105693fa05 ("crypto: atmel-ecc - introduce Microchip / Atmel ECC driver")
---
 drivers/crypto/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Patch applied. Thanks.

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