diff mbox series

crypto: atmel-i2c - select CONFIG_BITREVERSE

Message ID 20201203232022.1485386-1-arnd@kernel.org
State New
Headers show
Series crypto: atmel-i2c - select CONFIG_BITREVERSE | expand

Commit Message

Arnd Bergmann Dec. 3, 2020, 11:20 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>


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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/crypto/Kconfig | 1 +
 1 file changed, 1 insertion(+)

-- 
2.27.0

Comments

Herbert Xu Dec. 11, 2020, 10:14 a.m. UTC | #1
On Fri, Dec 04, 2020 at 12:20:04AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>

> 

> 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")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

> ---

>  drivers/crypto/Kconfig | 1 +

>  1 file changed, 1 insertion(+)


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
diff mbox series

Patch

diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index 6a02ab13835c..67a17644ce17 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -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"