diff mbox series

[v2,-next] crypto: sl3516 - Fix build warning without CONFIG_PM

Message ID 20210618093551.23748-1-yuehaibing@huawei.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series [v2,-next] crypto: sl3516 - Fix build warning without CONFIG_PM | expand

Commit Message

Yue Haibing June 18, 2021, 9:35 a.m. UTC
drivers/crypto/gemini/sl3516-ce-core.c:345:12:
 warning: ‘sl3516_ce_pm_resume’ defined but not used [-Wunused-function]
 static int sl3516_ce_pm_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~

The driver needs PM, otherwise clock and resets are never set.
So make it depends on PM to fix this warning.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Suggested-by: LABBE Corentin <clabbe@baylibre.com>
---
v2: Using depends on PM instead of #ifdef macro

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

Comments

Herbert Xu June 24, 2021, 7:36 a.m. UTC | #1
On Fri, Jun 18, 2021 at 05:35:51PM +0800, YueHaibing wrote:
> drivers/crypto/gemini/sl3516-ce-core.c:345:12:
>  warning: ‘sl3516_ce_pm_resume’ defined but not used [-Wunused-function]
>  static int sl3516_ce_pm_resume(struct device *dev)
>             ^~~~~~~~~~~~~~~~~~~
> 
> The driver needs PM, otherwise clock and resets are never set.
> So make it depends on PM to fix this warning.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Suggested-by: LABBE Corentin <clabbe@baylibre.com>
> ---
> v2: Using depends on PM instead of #ifdef macro
> 
>  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 99b090790178..6f14f39d32e3 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -273,6 +273,7 @@  config CRYPTO_DEV_SL3516
 	select CRYPTO_ECB
 	select CRYPTO_AES
 	select HW_RANDOM
+	depends on PM
 	help
 	  This option allows you to have support for SL3516 crypto offloader.