* [PATCH -next] crypto: atmel-i2c - Fix build error while CRC16 set to m
@ 2019-05-31 9:49 YueHaibing
2019-05-31 9:53 ` Ard Biesheuvel
2019-05-31 12:17 ` [PATCH v2 " YueHaibing
0 siblings, 2 replies; 4+ messages in thread
From: YueHaibing @ 2019-05-31 9:49 UTC (permalink / raw)
To: herbert, davem; +Cc: linux-kernel, linux-crypto, YueHaibing
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, and also make
CRYPTO_DEV_ATMEL_ECC depends on CRC16.
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>
---
drivers/crypto/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index fe01a99..7aebff8 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -528,7 +528,7 @@ config CRYPTO_DEV_ATMEL_ECC
depends on I2C
select CRYPTO_DEV_ATMEL_I2C
select CRYPTO_ECDH
- select CRC16
+ depends on CRC16
help
Microhip / Atmel ECC hw accelerator.
Select this if you want to use the Microchip / Atmel module for
@@ -540,6 +540,7 @@ config CRYPTO_DEV_ATMEL_ECC
config CRYPTO_DEV_ATMEL_SHA204A
tristate "Support for Microchip / Atmel SHA accelerator and RNG"
depends on I2C
+ depends on CRC16
select CRYPTO_DEV_ATMEL_I2C
select HW_RANDOM
help
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] crypto: atmel-i2c - Fix build error while CRC16 set to m
2019-05-31 9:49 [PATCH -next] crypto: atmel-i2c - Fix build error while CRC16 set to m YueHaibing
@ 2019-05-31 9:53 ` Ard Biesheuvel
2019-05-31 12:17 ` [PATCH v2 " YueHaibing
1 sibling, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2019-05-31 9:53 UTC (permalink / raw)
To: YueHaibing
Cc: Herbert Xu, David S. Miller, Linux Kernel Mailing List,
open list:HARDWARE RANDOM NUMBER GENERATOR CORE
On Fri, 31 May 2019 at 11:50, YueHaibing <yuehaibing@huawei.com> 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, and also make
> CRYPTO_DEV_ATMEL_ECC depends on CRC16.
>
Please use 'select' in both cases, not 'depends on'
> 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>
> ---
> drivers/crypto/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
> index fe01a99..7aebff8 100644
> --- a/drivers/crypto/Kconfig
> +++ b/drivers/crypto/Kconfig
> @@ -528,7 +528,7 @@ config CRYPTO_DEV_ATMEL_ECC
> depends on I2C
> select CRYPTO_DEV_ATMEL_I2C
> select CRYPTO_ECDH
> - select CRC16
> + depends on CRC16
> help
> Microhip / Atmel ECC hw accelerator.
> Select this if you want to use the Microchip / Atmel module for
> @@ -540,6 +540,7 @@ config CRYPTO_DEV_ATMEL_ECC
> config CRYPTO_DEV_ATMEL_SHA204A
> tristate "Support for Microchip / Atmel SHA accelerator and RNG"
> depends on I2C
> + depends on CRC16
> select CRYPTO_DEV_ATMEL_I2C
> select HW_RANDOM
> help
> --
> 2.7.4
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 -next] crypto: atmel-i2c - Fix build error while CRC16 set to m
2019-05-31 9:49 [PATCH -next] crypto: atmel-i2c - Fix build error while CRC16 set to m YueHaibing
2019-05-31 9:53 ` Ard Biesheuvel
@ 2019-05-31 12:17 ` YueHaibing
2019-06-06 6:58 ` Herbert Xu
1 sibling, 1 reply; 4+ messages in thread
From: YueHaibing @ 2019-05-31 12:17 UTC (permalink / raw)
To: herbert, davem, ard.biesheuvel; +Cc: linux-kernel, linux-crypto, YueHaibing
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(+)
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
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 -next] crypto: atmel-i2c - Fix build error while CRC16 set to m
2019-05-31 12:17 ` [PATCH v2 " YueHaibing
@ 2019-06-06 6:58 ` Herbert Xu
0 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2019-06-06 6:58 UTC (permalink / raw)
To: YueHaibing; +Cc: davem, ard.biesheuvel, linux-kernel, linux-crypto
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.
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-06 6:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31 9:49 [PATCH -next] crypto: atmel-i2c - Fix build error while CRC16 set to m YueHaibing
2019-05-31 9:53 ` Ard Biesheuvel
2019-05-31 12:17 ` [PATCH v2 " YueHaibing
2019-06-06 6:58 ` Herbert Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.