mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] ASoC: fsl: fix missing GENERIC_BITREVERSE and REGMAP_MMIO dependencies
@ 2026-11-04 13:49 Jude Gyimah
  2026-11-04 13:49 ` [PATCH 1/3] ASoC: fsl_aud2htx: select missing dependencies Jude Gyimah
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jude Gyimah @ 2026-11-04 13:49 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai
  Cc: chancel.liu, linux-sound, linux-kernel, Jude Gyimah

Each of these drivers can be built into vmlinux while the code
providing a symbol it calls is a module, which fails to link.  The
same shape in 3 drivers, so they are here as one series.

Affected: fsl_aud2htx, fsl_xcvr, lpc3xxx-i2s.

The fix is a select rather than a depends on: the providers have no
prompt of their own and are only ever enabled by a select, so a
depends on would leave these drivers unselectable.

Each was reproduced on v7.3, x86_64, by a vmlinux link that failed on
the named symbol, and each links once the select is added.

Found with kreach, a static check that compares what Kconfig allows
against the symbols the compiled objects actually reference.

The checker is at https://github.com/JGyimah/kreach, and the
reproducer configuration for each finding is published with it
under results/.

Jude Gyimah (3):
  ASoC: fsl_aud2htx: select missing dependencies
  ASoC: fsl: lpc3xxx-i2s: select REGMAP_MMIO
  ASoC: fsl_xcvr: select BITREVERSE

 sound/soc/fsl/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.43.0


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

* [PATCH 1/3] ASoC: fsl_aud2htx: select missing dependencies
  2026-11-04 13:49 [PATCH 0/3] ASoC: fsl: fix missing GENERIC_BITREVERSE and REGMAP_MMIO dependencies Jude Gyimah
@ 2026-11-04 13:49 ` Jude Gyimah
  2026-11-04 13:49 ` [PATCH 2/3] ASoC: fsl: lpc3xxx-i2s: select REGMAP_MMIO Jude Gyimah
  2026-11-04 13:50 ` [PATCH 3/3] ASoC: fsl_xcvr: select BITREVERSE Jude Gyimah
  2 siblings, 0 replies; 4+ messages in thread
From: Jude Gyimah @ 2026-11-04 13:49 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai
  Cc: chancel.liu, linux-sound, linux-kernel, Jude Gyimah

This driver is short two selects, not one: its configuration fails to
link on a symbol from each.

fsl_aud2htx calls __devm_regmap_init_mmio_clk, which
drivers/base/regmap/regmap-mmio.c provides under REGMAP_MMIO.
fsl_aud2htx calls devm_snd_dmaengine_pcm_register, which
sound/soc/soc-generic-dmaengine-pcm.c provides under
SND_SOC_GENERIC_DMAENGINE_PCM.

  fsl_aud2htx.c:(.text+0x30c): undefined reference to
    `__devm_regmap_init_mmio_clk'

The driver can be built into vmlinux while REGMAP_MMIO is a module, in
which case the symbol is not there at link time.

Select rather than depend on: REGMAP_MMIO has no prompt of its own and is
only ever enabled by a select, so a depends on would leave
SND_SOC_FSL_AUD2HTX unselectable.

Reproduced on v7.3, x86_64, with CONFIG_SND_SOC_FSL_AUD2HTX=y and
CONFIG_REGMAP_MMIO=m.

Found with kreach, a static check that compares what Kconfig allows
against the symbols the compiled objects actually reference.

Fixes: 8a24c834c053 ("ASoC: fsl_aud2htx: Add aud2htx module driver")
Signed-off-by: Jude Gyimah <jude.gyimah87@gmail.com>
---
 sound/soc/fsl/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index 04940879dfd8..e8924ed652ba 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -116,6 +116,8 @@ config SND_SOC_FSL_XCVR
 config SND_SOC_FSL_AUD2HTX
 	tristate "AUDIO TO HDMI TX module support"
 	depends on ARCH_MXC || COMPILE_TEST
+	select REGMAP_MMIO
+	select SND_SOC_GENERIC_DMAENGINE_PCM
 	select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n
 	help
 	  Say Y if you want to add AUDIO TO HDMI TX support for NXP.
-- 
2.43.0


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

* [PATCH 2/3] ASoC: fsl: lpc3xxx-i2s: select REGMAP_MMIO
  2026-11-04 13:49 [PATCH 0/3] ASoC: fsl: fix missing GENERIC_BITREVERSE and REGMAP_MMIO dependencies Jude Gyimah
  2026-11-04 13:49 ` [PATCH 1/3] ASoC: fsl_aud2htx: select missing dependencies Jude Gyimah
@ 2026-11-04 13:49 ` Jude Gyimah
  2026-11-04 13:50 ` [PATCH 3/3] ASoC: fsl_xcvr: select BITREVERSE Jude Gyimah
  2 siblings, 0 replies; 4+ messages in thread
From: Jude Gyimah @ 2026-11-04 13:49 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai
  Cc: chancel.liu, linux-sound, linux-kernel, Jude Gyimah

lpc3xxx-i2s calls __devm_regmap_init_mmio_clk, which
drivers/base/regmap/regmap-mmio.c provides under REGMAP_MMIO.

  lpc3xxx-i2s.c:320:(.text+0x13b8f6): undefined reference to
    `__devm_regmap_init_mmio_clk'

The driver can be built into vmlinux while REGMAP_MMIO is a module, in
which case the symbol is not there at link time.

Select rather than depend on: REGMAP_MMIO has no prompt of its own and is
only ever enabled by a select, so a depends on would leave
SND_SOC_FSL_LPC3XXX unselectable.

Reproduced on v7.3, x86_64, with CONFIG_SND_SOC_FSL_LPC3XXX=y and
CONFIG_REGMAP_MMIO=m.

Found with kreach, a static check that compares what Kconfig allows
against the symbols the compiled objects actually reference.

Fixes: 0959de657a10 ("ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs")
Signed-off-by: Jude Gyimah <jude.gyimah87@gmail.com>
---
 sound/soc/fsl/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index e8924ed652ba..2f58a1a51afd 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -140,6 +140,7 @@ config SND_SOC_FSL_RPMSG
 config SND_SOC_FSL_LPC3XXX
 	tristate "SoC Audio for NXP LPC32XX CPUs"
 	depends on ARCH_LPC32XX || COMPILE_TEST
+	select REGMAP_MMIO
 	select SND_SOC_GENERIC_DMAENGINE_PCM
 	help
 	  Say Y or M if you want to add support for the LPC3XXX I2S interface.
-- 
2.43.0


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

* [PATCH 3/3] ASoC: fsl_xcvr: select BITREVERSE
  2026-11-04 13:49 [PATCH 0/3] ASoC: fsl: fix missing GENERIC_BITREVERSE and REGMAP_MMIO dependencies Jude Gyimah
  2026-11-04 13:49 ` [PATCH 1/3] ASoC: fsl_aud2htx: select missing dependencies Jude Gyimah
  2026-11-04 13:49 ` [PATCH 2/3] ASoC: fsl: lpc3xxx-i2s: select REGMAP_MMIO Jude Gyimah
@ 2026-11-04 13:50 ` Jude Gyimah
  2 siblings, 0 replies; 4+ messages in thread
From: Jude Gyimah @ 2026-11-04 13:50 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai
  Cc: chancel.liu, linux-sound, linux-kernel, Jude Gyimah

SND_SOC_FSL_SPDIF, a few stanzas up in the same file, already selects
BITREVERSE for the same reason.  SND_SOC_FSL_XCVR is missing it.

fsl_xcvr calls byte_rev_table, which lib/bitrev.c provides under
BITREVERSE.

  fsl_xcvr.c:(.text+0x1634): undefined reference to `byte_rev_table'

The driver can be built into vmlinux while GENERIC_BITREVERSE is a module,
in which case the symbol is not there at link time.

Select rather than depend on: BITREVERSE has no prompt of its own and is
only ever enabled by a select, so a depends on would leave
SND_SOC_FSL_XCVR unselectable.

BITREVERSE is the symbol to select rather than GENERIC_BITREVERSE: it
selects GENERIC_BITREVERSE only where the architecture has no native
implementation, so this stays correct on the architectures that do.

Reproduced on v7.3, x86_64, with CONFIG_SND_SOC_FSL_XCVR=y and
CONFIG_GENERIC_BITREVERSE=m.

Found with kreach, a static check that compares what Kconfig allows
against the symbols the compiled objects actually reference.

Fixes: 28564486866f ("ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver")
Signed-off-by: Jude Gyimah <jude.gyimah87@gmail.com>
---
 sound/soc/fsl/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index 2f58a1a51afd..21b0509da76d 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -104,6 +104,7 @@ config SND_SOC_FSL_EASRC
 
 config SND_SOC_FSL_XCVR
 	tristate "NXP Audio Transceiver (XCVR) module support"
+	select BITREVERSE
 	select REGMAP_MMIO
 	select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n
 	select SND_SOC_GENERIC_DMAENGINE_PCM
-- 
2.43.0


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

end of thread, other threads:[~2026-11-04 13:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 13:49 [PATCH 0/3] ASoC: fsl: fix missing GENERIC_BITREVERSE and REGMAP_MMIO dependencies Jude Gyimah
2026-11-04 13:49 ` [PATCH 1/3] ASoC: fsl_aud2htx: select missing dependencies Jude Gyimah
2026-11-04 13:49 ` [PATCH 2/3] ASoC: fsl: lpc3xxx-i2s: select REGMAP_MMIO Jude Gyimah
2026-11-04 13:50 ` [PATCH 3/3] ASoC: fsl_xcvr: select BITREVERSE Jude Gyimah

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®