Skip to contentSkip to conversation

ASoC: SOF: Intel: move CODEC_PROBE_RETRIES definition

PATCH In review Arnd Bergmann 2 participants 2 messages Dec 4, 2021 – Dec 6, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: SOF: Intel: move CODEC_PROBE_RETRIES definition

From: Arnd Bergmann <[email protected]>

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")
---
 sound/soc/sof/intel/hda-codec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/sof/intel/hda-codec.c +2 -1
index 13cd96e6724a..4324178b3ca6 100644
@@ -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)
Signature · 1 line
2.29.2
#1 lore raw

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

Quoted 33 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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")
---
  sound/soc/sof/intel/hda-codec.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/sof/intel/hda-codec.c +2 -1
index 13cd96e6724a..4324178b3ca6 100644
@@ -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)