The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] ASoC: SOF: Intel: move CODEC_PROBE_RETRIES definition
@ 2021-12-04 17:44 Arnd Bergmann
  2021-12-06  0:36 ` Hui Wang
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2021-12-04 17:44 UTC (permalink / raw)
  To: Pierre-Louis Bossart, Liam Girdwood, Ranjani Sridharan,
	Kai Vehmanen, Daniel Baluta
  Cc: Arnd Bergmann, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Kai-Heng Feng, Bard Liao, Hui Wang, sound-open-firmware,
	alsa-devel, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The macro is defined in an #ifdef but used outside:

sound/soc/sof/intel/hda-codec.c: In function 'hda_codec_probe':
sound/soc/sof/intel/hda-codec.c:132:42: error: 'CODEC_PROBE_RETRIES' undeclared (first use in this function)
  132 |         } while (resp == -1 && retry++ < CODEC_PROBE_RETRIES);
      |                                          ^~~~~~~~~~~~~~~~~~~

Move it to a place where it can be seen unconditionally.

Fixes: 046aede2f847 ("ASoC: SOF: Intel: Retry codec probing if it fails")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/sof/intel/hda-codec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sof/intel/hda-codec.c b/sound/soc/sof/intel/hda-codec.c
index 13cd96e6724a..4324178b3ca6 100644
--- a/sound/soc/sof/intel/hda-codec.c
+++ b/sound/soc/sof/intel/hda-codec.c
@@ -20,9 +20,10 @@
 #include "../../codecs/hdac_hda.h"
 #endif /* CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC */
 
+#define CODEC_PROBE_RETRIES 3
+
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
 #define IDISP_VID_INTEL	0x80860000
-#define CODEC_PROBE_RETRIES 3
 
 /* load the legacy HDA codec driver */
 static int request_codec_module(struct hda_codec *codec)
-- 
2.29.2


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

* Re: [PATCH] ASoC: SOF: Intel: move CODEC_PROBE_RETRIES definition
  2021-12-04 17:44 [PATCH] ASoC: SOF: Intel: move CODEC_PROBE_RETRIES definition Arnd Bergmann
@ 2021-12-06  0:36 ` Hui Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Hui Wang @ 2021-12-06  0:36 UTC (permalink / raw)
  To: Arnd Bergmann, Pierre-Louis Bossart, Liam Girdwood,
	Ranjani Sridharan, Kai Vehmanen, Daniel Baluta
  Cc: alsa-devel, Arnd Bergmann, linux-kernel, Mark Brown, Takashi Iwai,
	Kai-Heng Feng, Bard Liao, sound-open-firmware

Thanks Arnd, and Kai Vehmanen already sent a fix for this building 
failure: 
https://mailman.alsa-project.org/pipermail/alsa-devel/2021-December/193313.html

On 12/5/21 1:44 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The macro is defined in an #ifdef but used outside:
>
> sound/soc/sof/intel/hda-codec.c: In function 'hda_codec_probe':
> sound/soc/sof/intel/hda-codec.c:132:42: error: 'CODEC_PROBE_RETRIES' undeclared (first use in this function)
>    132 |         } while (resp == -1 && retry++ < CODEC_PROBE_RETRIES);
>        |                                          ^~~~~~~~~~~~~~~~~~~
>
> Move it to a place where it can be seen unconditionally.
>
> Fixes: 046aede2f847 ("ASoC: SOF: Intel: Retry codec probing if it fails")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   sound/soc/sof/intel/hda-codec.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/sof/intel/hda-codec.c b/sound/soc/sof/intel/hda-codec.c
> index 13cd96e6724a..4324178b3ca6 100644
> --- a/sound/soc/sof/intel/hda-codec.c
> +++ b/sound/soc/sof/intel/hda-codec.c
> @@ -20,9 +20,10 @@
>   #include "../../codecs/hdac_hda.h"
>   #endif /* CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC */
>   
> +#define CODEC_PROBE_RETRIES 3
> +
>   #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
>   #define IDISP_VID_INTEL	0x80860000
> -#define CODEC_PROBE_RETRIES 3
>   
>   /* load the legacy HDA codec driver */
>   static int request_codec_module(struct hda_codec *codec)

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

end of thread, other threads:[~2021-12-06  0:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-04 17:44 [PATCH] ASoC: SOF: Intel: move CODEC_PROBE_RETRIES definition Arnd Bergmann
2021-12-06  0:36 ` Hui Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox