* [PATCH] sound: hda_intel: fix warning if SND_HDA_I915=n
@ 2015-06-17 12:53 Frans Klaver
2015-06-17 13:13 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Frans Klaver @ 2015-06-17 12:53 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Frans Klaver, Jaroslav Kysela, linux-kernel
When building with CONFIG_SND_HDA_I915=n, I get the following warning:
sound/pci/hda/hda_intel.c: In function ‘azx_probe_continue’:
sound/pci/hda/hda_intel.c:1882:2: warning: label ‘skip_i915’ defined but not used [-Wunused-label]
skip_i915:
^
Fix this by using 'if (IS_ENABLED())' rather than #ifdef.
Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
---
sound/pci/hda/hda_intel.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index a244ba706317..d85a53ceab6d 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1856,8 +1856,8 @@ static int azx_probe_continue(struct azx *chip)
int err;
/* Request power well for Haswell HDA controller and codec */
- if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {
-#ifdef CONFIG_SND_HDA_I915
+ if (IS_ENABLED(CONFIG_SND_HDA_I915) &&
+ chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {
err = hda_i915_init(hda);
if (err < 0) {
/* if the controller is bound only with HDMI/DP
@@ -1876,7 +1876,6 @@ static int azx_probe_continue(struct azx *chip)
"Cannot turn on display power on i915\n");
goto out_free;
}
-#endif
}
skip_i915:
--
2.3.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sound: hda_intel: fix warning if SND_HDA_I915=n
2015-06-17 12:53 [PATCH] sound: hda_intel: fix warning if SND_HDA_I915=n Frans Klaver
@ 2015-06-17 13:13 ` Takashi Iwai
2015-06-17 13:17 ` Frans Klaver
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2015-06-17 13:13 UTC (permalink / raw)
To: Frans Klaver; +Cc: Jaroslav Kysela, linux-kernel
At Wed, 17 Jun 2015 14:53:19 +0200,
Frans Klaver wrote:
>
> When building with CONFIG_SND_HDA_I915=n, I get the following warning:
>
> sound/pci/hda/hda_intel.c: In function ‘azx_probe_continue’:
> sound/pci/hda/hda_intel.c:1882:2: warning: label ‘skip_i915’ defined but not used [-Wunused-label]
> skip_i915:
> ^
>
> Fix this by using 'if (IS_ENABLED())' rather than #ifdef.
>
> Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
This was already fixed in the latest tree. Thanks.
Takashi
> ---
> sound/pci/hda/hda_intel.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> index a244ba706317..d85a53ceab6d 100644
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -1856,8 +1856,8 @@ static int azx_probe_continue(struct azx *chip)
> int err;
>
> /* Request power well for Haswell HDA controller and codec */
> - if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {
> -#ifdef CONFIG_SND_HDA_I915
> + if (IS_ENABLED(CONFIG_SND_HDA_I915) &&
> + chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {
> err = hda_i915_init(hda);
> if (err < 0) {
> /* if the controller is bound only with HDMI/DP
> @@ -1876,7 +1876,6 @@ static int azx_probe_continue(struct azx *chip)
> "Cannot turn on display power on i915\n");
> goto out_free;
> }
> -#endif
> }
>
> skip_i915:
> --
> 2.3.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sound: hda_intel: fix warning if SND_HDA_I915=n
2015-06-17 13:13 ` Takashi Iwai
@ 2015-06-17 13:17 ` Frans Klaver
0 siblings, 0 replies; 3+ messages in thread
From: Frans Klaver @ 2015-06-17 13:17 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Jaroslav Kysela, linux-kernel
On Wed, Jun 17, 2015 at 03:13:39PM +0200, Takashi Iwai wrote:
> At Wed, 17 Jun 2015 14:53:19 +0200,
> Frans Klaver wrote:
> >
> > When building with CONFIG_SND_HDA_I915=n, I get the following warning:
> >
> > sound/pci/hda/hda_intel.c: In function ‘azx_probe_continue’:
> > sound/pci/hda/hda_intel.c:1882:2: warning: label ‘skip_i915’ defined but not used [-Wunused-label]
> > skip_i915:
> > ^
> >
> > Fix this by using 'if (IS_ENABLED())' rather than #ifdef.
> >
> > Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
>
> This was already fixed in the latest tree. Thanks.
Alright, hadn't noticed that.
Thanks,
Frans
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-17 13:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-17 12:53 [PATCH] sound: hda_intel: fix warning if SND_HDA_I915=n Frans Klaver
2015-06-17 13:13 ` Takashi Iwai
2015-06-17 13:17 ` Frans Klaver
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.