linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ALSA: hda: cs35l41: Fix build error unused-function
@ 2022-07-25  2:36 Ren Zhijie
  2022-07-25  6:32 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Ren Zhijie @ 2022-07-25  2:36 UTC (permalink / raw)
  To: james.schulman, david.rhodes, tanureal, rf, perex, tiwai,
	sbinding, vitalyr
  Cc: alsa-devel, patches, linux-kernel, arnd, Ren Zhijie

If CONFIG_PM_SLEEP is not set,
make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like this:

sound/pci/hda/cs35l41_hda.c:583:12: error: ‘cs35l41_runtime_resume’ defined but not used [-Werror=unused-function]
 static int cs35l41_runtime_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~~
sound/pci/hda/cs35l41_hda.c:565:12: error: ‘cs35l41_runtime_suspend’ defined but not used [-Werror=unused-function]
 static int cs35l41_runtime_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [sound/pci/hda/cs35l41_hda.o] Error 1

commit 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros,
deprecate old ones"), add new marco RUNTIME_PM_OPS to fix this unused-function problem.

Fixes: 1873ebd30cc8 ("ALSA: hda: cs35l41: Support Hibernation during Suspend")
Signed-off-by: Ren Zhijie <renzhijie2@huawei.com>
---
 sound/pci/hda/cs35l41_hda.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
index 28798d5c1cf1..93cf039abb02 100644
--- a/sound/pci/hda/cs35l41_hda.c
+++ b/sound/pci/hda/cs35l41_hda.c
@@ -1439,7 +1439,7 @@ void cs35l41_hda_remove(struct device *dev)
 EXPORT_SYMBOL_NS_GPL(cs35l41_hda_remove, SND_HDA_SCODEC_CS35L41);
 
 const struct dev_pm_ops cs35l41_hda_pm_ops = {
-	SET_RUNTIME_PM_OPS(cs35l41_runtime_suspend, cs35l41_runtime_resume, NULL)
+	RUNTIME_PM_OPS(cs35l41_runtime_suspend, cs35l41_runtime_resume, NULL)
 };
 EXPORT_SYMBOL_NS_GPL(cs35l41_hda_pm_ops, SND_HDA_SCODEC_CS35L41);
 
-- 
2.17.1


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

* Re: [PATCH -next] ALSA: hda: cs35l41: Fix build error unused-function
  2022-07-25  2:36 [PATCH -next] ALSA: hda: cs35l41: Fix build error unused-function Ren Zhijie
@ 2022-07-25  6:32 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2022-07-25  6:32 UTC (permalink / raw)
  To: Ren Zhijie
  Cc: james.schulman, david.rhodes, tanureal, rf, perex, tiwai,
	sbinding, vitalyr, patches, alsa-devel, linux-kernel, arnd

On Mon, 25 Jul 2022 04:36:11 +0200,
Ren Zhijie wrote:
> 
> If CONFIG_PM_SLEEP is not set,
> make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like this:
> 
> sound/pci/hda/cs35l41_hda.c:583:12: error: ‘cs35l41_runtime_resume’ defined but not used [-Werror=unused-function]
>  static int cs35l41_runtime_resume(struct device *dev)
>             ^~~~~~~~~~~~~~~~~~~~~~
> sound/pci/hda/cs35l41_hda.c:565:12: error: ‘cs35l41_runtime_suspend’ defined but not used [-Werror=unused-function]
>  static int cs35l41_runtime_suspend(struct device *dev)
>             ^~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[3]: *** [sound/pci/hda/cs35l41_hda.o] Error 1
> 
> commit 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros,
> deprecate old ones"), add new marco RUNTIME_PM_OPS to fix this unused-function problem.
> 
> Fixes: 1873ebd30cc8 ("ALSA: hda: cs35l41: Support Hibernation during Suspend")
> Signed-off-by: Ren Zhijie <renzhijie2@huawei.com>

Thanks, applied.


Takashi

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

end of thread, other threads:[~2022-07-25  6:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-25  2:36 [PATCH -next] ALSA: hda: cs35l41: Fix build error unused-function Ren Zhijie
2022-07-25  6:32 ` Takashi Iwai

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).