All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda - fix unused Realtek function when PM is not enabled
@ 2022-04-30 19:33 ` Randy Dunlap
  0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2022-04-30 19:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, kernel test robot, Takashi Iwai, Jaroslav Kysela,
	alsa-devel

When CONFIG_PM is not enabled, alc_shutup() is not needed,
so move it inside the #ifdef CONFIG_PM guard.
Also drop some contiguous #endif / #ifdef CONFIG_PM for simplicity.

Fixes this build warning:
sound/pci/hda/patch_realtek.c:886:20: warning: unused function 'alc_shutup'

Fixes: 08c189f2c552 ("ALSA: hda - Use generic parser codes for Realtek driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: alsa-devel@alsa-project.org
---
 sound/pci/hda/patch_realtek.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -937,6 +937,9 @@ static int alc_init(struct hda_codec *co
 	return 0;
 }
 
+#define alc_free	snd_hda_gen_free
+
+#ifdef CONFIG_PM
 static inline void alc_shutup(struct hda_codec *codec)
 {
 	struct alc_spec *spec = codec->spec;
@@ -950,9 +953,6 @@ static inline void alc_shutup(struct hda
 		alc_shutup_pins(codec);
 }
 
-#define alc_free	snd_hda_gen_free
-
-#ifdef CONFIG_PM
 static void alc_power_eapd(struct hda_codec *codec)
 {
 	alc_auto_setup_eapd(codec, false);
@@ -966,9 +966,7 @@ static int alc_suspend(struct hda_codec
 		spec->power_hook(codec);
 	return 0;
 }
-#endif
 
-#ifdef CONFIG_PM
 static int alc_resume(struct hda_codec *codec)
 {
 	struct alc_spec *spec = codec->spec;

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

* [PATCH] ALSA: hda - fix unused Realtek function when PM is not enabled
@ 2022-04-30 19:33 ` Randy Dunlap
  0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2022-04-30 19:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Takashi Iwai, alsa-devel, Randy Dunlap, kernel test robot

When CONFIG_PM is not enabled, alc_shutup() is not needed,
so move it inside the #ifdef CONFIG_PM guard.
Also drop some contiguous #endif / #ifdef CONFIG_PM for simplicity.

Fixes this build warning:
sound/pci/hda/patch_realtek.c:886:20: warning: unused function 'alc_shutup'

Fixes: 08c189f2c552 ("ALSA: hda - Use generic parser codes for Realtek driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: alsa-devel@alsa-project.org
---
 sound/pci/hda/patch_realtek.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -937,6 +937,9 @@ static int alc_init(struct hda_codec *co
 	return 0;
 }
 
+#define alc_free	snd_hda_gen_free
+
+#ifdef CONFIG_PM
 static inline void alc_shutup(struct hda_codec *codec)
 {
 	struct alc_spec *spec = codec->spec;
@@ -950,9 +953,6 @@ static inline void alc_shutup(struct hda
 		alc_shutup_pins(codec);
 }
 
-#define alc_free	snd_hda_gen_free
-
-#ifdef CONFIG_PM
 static void alc_power_eapd(struct hda_codec *codec)
 {
 	alc_auto_setup_eapd(codec, false);
@@ -966,9 +966,7 @@ static int alc_suspend(struct hda_codec
 		spec->power_hook(codec);
 	return 0;
 }
-#endif
 
-#ifdef CONFIG_PM
 static int alc_resume(struct hda_codec *codec)
 {
 	struct alc_spec *spec = codec->spec;

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

* Re: [PATCH] ALSA: hda - fix unused Realtek function when PM is not enabled
  2022-04-30 19:33 ` Randy Dunlap
@ 2022-05-08  9:11   ` Takashi Iwai
  -1 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2022-05-08  9:11 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-kernel, kernel test robot, Jaroslav Kysela, alsa-devel

On Sat, 30 Apr 2022 21:33:18 +0200,
Randy Dunlap wrote:
> 
> When CONFIG_PM is not enabled, alc_shutup() is not needed,
> so move it inside the #ifdef CONFIG_PM guard.
> Also drop some contiguous #endif / #ifdef CONFIG_PM for simplicity.
> 
> Fixes this build warning:
> sound/pci/hda/patch_realtek.c:886:20: warning: unused function 'alc_shutup'
> 
> Fixes: 08c189f2c552 ("ALSA: hda - Use generic parser codes for Realtek driver")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: alsa-devel@alsa-project.org

Thanks, applied now.


Takashi

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

* Re: [PATCH] ALSA: hda - fix unused Realtek function when PM is not enabled
@ 2022-05-08  9:11   ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2022-05-08  9:11 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: alsa-devel, linux-kernel, kernel test robot

On Sat, 30 Apr 2022 21:33:18 +0200,
Randy Dunlap wrote:
> 
> When CONFIG_PM is not enabled, alc_shutup() is not needed,
> so move it inside the #ifdef CONFIG_PM guard.
> Also drop some contiguous #endif / #ifdef CONFIG_PM for simplicity.
> 
> Fixes this build warning:
> sound/pci/hda/patch_realtek.c:886:20: warning: unused function 'alc_shutup'
> 
> Fixes: 08c189f2c552 ("ALSA: hda - Use generic parser codes for Realtek driver")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: alsa-devel@alsa-project.org

Thanks, applied now.


Takashi

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

end of thread, other threads:[~2022-05-08  9:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-30 19:33 [PATCH] ALSA: hda - fix unused Realtek function when PM is not enabled Randy Dunlap
2022-04-30 19:33 ` Randy Dunlap
2022-05-08  9:11 ` Takashi Iwai
2022-05-08  9:11   ` Takashi Iwai

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.