diff mbox series

[2/2] crypto: crypto4xx - Avoid linking failure with HW_RANDOM=m

Message ID 20210130225540.1639-2-f.fainelli@gmail.com
State Accepted
Commit 63b8ee4f548c36658c2854d353270b3474d45aeb
Headers show
Series None | expand

Commit Message

Florian Fainelli Jan. 30, 2021, 10:55 p.m. UTC
It is currently possible to build CONFIG_HW_RANDOM_PPC4XX=y with
CONFIG_HW_RANDOM=m which would lead to the inability of linking with
devm_hwrng_{register,unregister}. We cannot have the framework modular
and the consumer of that framework built-in, so make that dependency
explicit.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/crypto/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Herbert Xu Feb. 5, 2021, 3:38 a.m. UTC | #1
On Sat, Jan 30, 2021 at 02:55:38PM -0800, Florian Fainelli wrote:
> It is currently possible to build CONFIG_HW_RANDOM_PPC4XX=y with

> CONFIG_HW_RANDOM=m which would lead to the inability of linking with

> devm_hwrng_{register,unregister}. We cannot have the framework modular

> and the consumer of that framework built-in, so make that dependency

> explicit.

> 

> Reported-by: kernel test robot <lkp@intel.com>

> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

> ---

>  drivers/crypto/Kconfig | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)


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 e535f28a8028..c833ac08ea81 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -348,7 +348,7 @@  config CRYPTO_DEV_PPC4XX
 
 config HW_RANDOM_PPC4XX
 	bool "PowerPC 4xx generic true random number generator support"
-	depends on CRYPTO_DEV_PPC4XX && HW_RANDOM
+	depends on CRYPTO_DEV_PPC4XX && HW_RANDOM=y
 	default y
 	help
 	 This option provides the kernel-side support for the TRNG hardware