* [PATCH] ASoC: amd: acp: Use IS_REACHABLE() for SND_SOC_ACPI_AMD_SDCA_QUIRKS guard
@ 2026-05-27 13:32 Syed Saba Kareem
2026-05-27 14:25 ` Syed Saba Kareem
0 siblings, 1 reply; 2+ messages in thread
From: Syed Saba Kareem @ 2026-05-27 13:32 UTC (permalink / raw)
To: broonie, alsa-devel
Cc: vijendar.mukunda, Sunil-kumar.Dommati, Syed Saba Kareem,
Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, Syed Saba Kareem,
open list:AMD ASoC DRIVERS, open list
From: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Fix a build failure when CONFIG_SND_SOC_ACPI_AMD_MATCH=y (built-in) and
CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS=m (module):
x86_64-linux-ld: sound/soc/amd/acp/amd-acp70-acpi-match.o:(.data+0xf00):
undefined reference to `snd_soc_acpi_amd_sdca_is_device_rt712_vb'
The header guard uses IS_ENABLED() which evaluates to true for both =y
and =m configs. This causes the real function declaration to be used even
when the symbol is only available in a loadable module, resulting in an
undefined reference when the caller is built-in.
Replace IS_ENABLED() with IS_REACHABLE() which correctly evaluates to
false when the dependency is a module but the caller is built-in, causing
the static inline stub to be used instead.
Fixes: 10d366a846be ("ASoC: amd: acp: Fix Kconfig dependencies for SND_SOC_ACPI_AMD_SDCA_QUIRKS")
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
---
sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
index 0e644e71e76f..66df37d29d84 100644
--- a/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
+++ b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
@@ -9,7 +9,7 @@
#ifndef _SND_SOC_ACPI_AMD_SDCA_QUIRKS
#define _SND_SOC_ACPI_AMD_SDCA_QUIRKS
-#if IS_ENABLED(CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS)
+#if IS_REACHABLE(CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS)
bool snd_soc_acpi_amd_sdca_is_device_rt712_vb(void *arg);
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: amd: acp: Use IS_REACHABLE() for SND_SOC_ACPI_AMD_SDCA_QUIRKS guard
2026-05-27 13:32 [PATCH] ASoC: amd: acp: Use IS_REACHABLE() for SND_SOC_ACPI_AMD_SDCA_QUIRKS guard Syed Saba Kareem
@ 2026-05-27 14:25 ` Syed Saba Kareem
0 siblings, 0 replies; 2+ messages in thread
From: Syed Saba Kareem @ 2026-05-27 14:25 UTC (permalink / raw)
To: broonie, alsa-devel
Cc: vijendar.mukunda, Sunil-kumar.Dommati, Venkata Prasad Potturu,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
open list:AMD ASoC DRIVERS, open list, Arnd Bergmann
On 5/27/26 19:02, Syed Saba Kareem wrote:
> From: Syed Saba Kareem <Syed.SabaKareem@amd.com>
>
> Fix a build failure when CONFIG_SND_SOC_ACPI_AMD_MATCH=y (built-in) and
> CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS=m (module):
>
> x86_64-linux-ld: sound/soc/amd/acp/amd-acp70-acpi-match.o:(.data+0xf00):
> undefined reference to `snd_soc_acpi_amd_sdca_is_device_rt712_vb'
>
> The header guard uses IS_ENABLED() which evaluates to true for both =y
> and =m configs. This causes the real function declaration to be used even
> when the symbol is only available in a loadable module, resulting in an
> undefined reference when the caller is built-in.
>
> Replace IS_ENABLED() with IS_REACHABLE() which correctly evaluates to
> false when the dependency is a module but the caller is built-in, causing
> the static inline stub to be used instead.
>
> Fixes: 10d366a846be ("ASoC: amd: acp: Fix Kconfig dependencies for SND_SOC_ACPI_AMD_SDCA_QUIRKS")
> Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
> ---
> sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
> index 0e644e71e76f..66df37d29d84 100644
> --- a/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
> +++ b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
> @@ -9,7 +9,7 @@
> #ifndef _SND_SOC_ACPI_AMD_SDCA_QUIRKS
> #define _SND_SOC_ACPI_AMD_SDCA_QUIRKS
>
> -#if IS_ENABLED(CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS)
> +#if IS_REACHABLE(CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS)
>
> bool snd_soc_acpi_amd_sdca_is_device_rt712_vb(void *arg);
>
As per Arnd Bergmann offline comments this fix wont work , will send a
another patch with proper fix.
Please discard this patch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-27 14:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-27 13:32 [PATCH] ASoC: amd: acp: Use IS_REACHABLE() for SND_SOC_ACPI_AMD_SDCA_QUIRKS guard Syed Saba Kareem
2026-05-27 14:25 ` Syed Saba Kareem
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®