Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: vkoul@kernel.org
Cc: pierre-louis.bossart@linux.dev, yung-chuan.liao@linux.intel.com,
	broonie@kernel.org, srinivas.kandagatla@oss.qualcomm.com,
	oder_chiou@realtek.com, jack.yu@realtek.com,
	shumingf@realtek.com, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org, patches@opensource.cirrus.com
Subject: Re: [PATCH] soundwire: Correct ifdef for stub functions
Date: Mon, 15 Jun 2026 16:49:04 +0100	[thread overview]
Message-ID: <ajAe8DX6XnopzEb6@opensource.cirrus.com> (raw)
In-Reply-To: <20260615150523.4006982-1-ckeepax@opensource.cirrus.com>

On Mon, Jun 15, 2026 at 04:05:22PM +0100, Charles Keepax wrote:
> 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.

Feels like maybe I should have noted this can happen say for a
driver that has two control interfaces. For example the rt5682
(in the test robot report) has both an I2C and a SDW. If only the
I2C is selected but the driver calls stubbed functions from
common code. Typically these are gated in some way so they arn't
actually called in the non-soundwire case.

An alternative would be to add a dependency onto the driver to
ensure the two modules are compatible, but this felt like it
would cover more cases.

Thanks,
Charles

  reply	other threads:[~2026-06-15 15:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-15 15:05 [PATCH] soundwire: Correct ifdef for stub functions Charles Keepax
2026-06-15 15:49 ` Charles Keepax [this message]
2026-06-17  9:01   ` Charles Keepax

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=ajAe8DX6XnopzEb6@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=broonie@kernel.org \
    --cc=jack.yu@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=oder_chiou@realtek.com \
    --cc=patches@opensource.cirrus.com \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=shumingf@realtek.com \
    --cc=srinivas.kandagatla@oss.qualcomm.com \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.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