linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] crypto: sl3516 - Fix build warning without CONFIG_PM
@ 2021-06-17  3:51 YueHaibing
  2021-06-17 13:00 ` LABBE Corentin
  0 siblings, 1 reply; 3+ messages in thread
From: YueHaibing @ 2021-06-17  3:51 UTC (permalink / raw)
  To: ulli.kroll, linus.walleij, clabbe, herbert, davem
  Cc: linux-arm-kernel, linux-crypto, linux-kernel, YueHaibing

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)
            ^~~~~~~~~~~~~~~~~~~

Use #ifdef macro to guard this.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/crypto/gemini/sl3516-ce-core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/gemini/sl3516-ce-core.c b/drivers/crypto/gemini/sl3516-ce-core.c
index da6cd529a6c0..00bfc5e19818 100644
--- a/drivers/crypto/gemini/sl3516-ce-core.c
+++ b/drivers/crypto/gemini/sl3516-ce-core.c
@@ -320,6 +320,7 @@ static void sl3516_ce_unregister_algs(struct sl3516_ce_dev *ce)
 	}
 }
 
+#ifdef CONFIG_PM
 static void sl3516_ce_start(struct sl3516_ce_dev *ce)
 {
 	ce->ctx = 0;
@@ -365,6 +366,7 @@ static int sl3516_ce_pm_resume(struct device *dev)
 	sl3516_ce_pm_suspend(dev);
 	return err;
 }
+#endif
 
 static const struct dev_pm_ops sl3516_ce_pm_ops = {
 	SET_RUNTIME_PM_OPS(sl3516_ce_pm_suspend, sl3516_ce_pm_resume, NULL)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] crypto: sl3516 - Fix build warning without CONFIG_PM
  2021-06-17  3:51 [PATCH -next] crypto: sl3516 - Fix build warning without CONFIG_PM YueHaibing
@ 2021-06-17 13:00 ` LABBE Corentin
  2021-06-18  7:57   ` YueHaibing
  0 siblings, 1 reply; 3+ messages in thread
From: LABBE Corentin @ 2021-06-17 13:00 UTC (permalink / raw)
  To: YueHaibing
  Cc: ulli.kroll, linus.walleij, herbert, davem, linux-arm-kernel,
	linux-crypto, linux-kernel

Le Thu, Jun 17, 2021 at 11:51:29AM +0800, YueHaibing a écrit :
> 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)
>             ^~~~~~~~~~~~~~~~~~~
> 
> Use #ifdef macro to guard this.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/crypto/gemini/sl3516-ce-core.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

Hello

Thanks for the report, but I am sorry and need to NAK this patch.

The driver needs PM, without it, clock and resets are never set.
The correct fix is to add "depends on PM".

Regards

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] crypto: sl3516 - Fix build warning without CONFIG_PM
  2021-06-17 13:00 ` LABBE Corentin
@ 2021-06-18  7:57   ` YueHaibing
  0 siblings, 0 replies; 3+ messages in thread
From: YueHaibing @ 2021-06-18  7:57 UTC (permalink / raw)
  To: LABBE Corentin
  Cc: ulli.kroll, linus.walleij, herbert, davem, linux-arm-kernel,
	linux-crypto, linux-kernel

On 2021/6/17 21:00, LABBE Corentin wrote:
> Le Thu, Jun 17, 2021 at 11:51:29AM +0800, YueHaibing a écrit :
>> 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)
>>             ^~~~~~~~~~~~~~~~~~~
>>
>> Use #ifdef macro to guard this.
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>>  drivers/crypto/gemini/sl3516-ce-core.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
> 
> Hello
> 
> Thanks for the report, but I am sorry and need to NAK this patch.
> 
> The driver needs PM, without it, clock and resets are never set.
> The correct fix is to add "depends on PM".

Ok, v2 on the way, thanks.

> 
> Regards
> .
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-18  7:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17  3:51 [PATCH -next] crypto: sl3516 - Fix build warning without CONFIG_PM YueHaibing
2021-06-17 13:00 ` LABBE Corentin
2021-06-18  7:57   ` YueHaibing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).