mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Syed Saba Kareem <syed.sabakareem@amd.com>
To: <broonie@kernel.org>, <alsa-devel@alsa-project.org>
Cc: <vijendar.mukunda@amd.com>, <Sunil-kumar.Dommati@amd.com>,
	"Syed Saba Kareem" <Syed.SabaKareem@amd.com>,
	Vijendar Mukunda <Vijendar.Mukunda@amd.com>,
	Venkata Prasad Potturu <venkataprasad.potturu@amd.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	"Syed Saba Kareem" <syed.sabakareem@amd.com>,
	"open list:AMD ASoC DRIVERS" <linux-sound@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: [PATCH] ASoC: amd: acp: Use IS_REACHABLE() for SND_SOC_ACPI_AMD_SDCA_QUIRKS guard
Date: Wed, 27 May 2026 19:02:00 +0530	[thread overview]
Message-ID: <20260527133208.3074614-1-syed.sabakareem@amd.com> (raw)

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


             reply	other threads:[~2026-05-27 13:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27 13:32 Syed Saba Kareem [this message]
2026-05-27 14:25 ` Syed Saba Kareem

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260527133208.3074614-1-syed.sabakareem@amd.com \
    --to=syed.sabakareem@amd.com \
    --cc=Sunil-kumar.Dommati@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=venkataprasad.potturu@amd.com \
    --cc=vijendar.mukunda@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®