diff mbox series

[v2,-next] crypto: atmel-i2c - Fix build error while CRC16 set to m

Message ID 20190531121749.9144-1-yuehaibing@huawei.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series [v2,-next] crypto: atmel-i2c - Fix build error while CRC16 set to m | expand

Commit Message

Yue Haibing May 31, 2019, 12:17 p.m. UTC
If CRYPTO_DEV_ATMEL_ECC is set m, which select CRC16 to m,
while CRYPTO_DEV_ATMEL_SHA204A is set to y, building fails.

drivers/crypto/atmel-i2c.o: In function 'atmel_i2c_checksum':
atmel-i2c.c:(.text+0x16): undefined reference to 'crc16'

Add CRC16 dependency to CRYPTO_DEV_ATMEL_SHA204A

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: da001fb651b0 ("crypto: atmel-i2c - add support for SHA204A random number generator")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2:use 'select' instead of 'depends on'
---
 drivers/crypto/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Herbert Xu June 6, 2019, 6:58 a.m. UTC | #1
On Fri, May 31, 2019 at 08:17:49PM +0800, YueHaibing wrote:
> If CRYPTO_DEV_ATMEL_ECC is set m, which select CRC16 to m,
> while CRYPTO_DEV_ATMEL_SHA204A is set to y, building fails.
> 
> drivers/crypto/atmel-i2c.o: In function 'atmel_i2c_checksum':
> atmel-i2c.c:(.text+0x16): undefined reference to 'crc16'
> 
> Add CRC16 dependency to CRYPTO_DEV_ATMEL_SHA204A
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: da001fb651b0 ("crypto: atmel-i2c - add support for SHA204A random number generator")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> v2:use 'select' instead of 'depends on'
> ---
>  drivers/crypto/Kconfig | 1 +
>  1 file changed, 1 insertion(+)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index fe01a99..603413f 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -542,6 +542,7 @@  config CRYPTO_DEV_ATMEL_SHA204A
 	depends on I2C
 	select CRYPTO_DEV_ATMEL_I2C
 	select HW_RANDOM
+	select CRC16
 	help
 	  Microhip / Atmel SHA accelerator and RNG.
 	  Select this if you want to use the Microchip / Atmel SHA204A