mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] soundwire: Correct ifdef for stub functions
@ 2026-06-15 15:05 Charles Keepax
  2026-06-15 15:49 ` Charles Keepax
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Keepax @ 2026-06-15 15:05 UTC (permalink / raw)
  To: vkoul
  Cc: pierre-louis.bossart, yung-chuan.liao, broonie,
	srinivas.kandagatla, oder_chiou, jack.yu, shumingf, linux-sound,
	linux-kernel, patches

Currently the stubs for SoundWire functions are enabled using
IS_ENABLED(). The trouble is if a driver intends to use the stubs
it by definition also does not depend on SOUNDWIRE. This means a
state can arise where SOUNDWIRE=m and DRIVER_CALLING_STUBS=y,
leading to a link time failure. Update the stubs to use
IS_REACHABLE such that the stubs will still be used in the
above situation.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202606151303.Erj5lfRD-lkp@intel.com/
Fixes: 6726b47a2a60 ("soundwire: Provide build stubs for common functions")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 include/linux/soundwire/sdw.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h
index 6147eb1fb210d..b96f0310da7c0 100644
--- a/include/linux/soundwire/sdw.h
+++ b/include/linux/soundwire/sdw.h
@@ -1077,7 +1077,7 @@ int sdw_bpt_send_async(struct sdw_bus *bus, struct sdw_slave *slave, struct sdw_
 int sdw_bpt_wait(struct sdw_bus *bus, struct sdw_slave *slave, struct sdw_bpt_msg *msg);
 int sdw_bpt_send_sync(struct sdw_bus *bus, struct sdw_slave *slave, struct sdw_bpt_msg *msg);
 
-#if IS_ENABLED(CONFIG_SOUNDWIRE)
+#if IS_REACHABLE(CONFIG_SOUNDWIRE)
 
 int sdw_stream_add_slave(struct sdw_slave *slave,
 			 struct sdw_stream_config *stream_config,
-- 
2.47.3


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

end of thread, other threads:[~2026-06-17  9:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-15 15:05 [PATCH] soundwire: Correct ifdef for stub functions Charles Keepax
2026-06-15 15:49 ` Charles Keepax
2026-06-17  9:01   ` Charles Keepax

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