ASoC: fsl: fix missing GENERIC_BITREVERSE and REGMAP_MMIO dependencies
cover ASoC: fsl: fix missing GENERIC_BITREVERSE and REGMAP_MMIO dependencies
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(+)
Signature · 1 line
2.43.0
PATCH 1/3 ASoC: fsl_aud2htx: select missing dependencies
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.
--- sound/soc/fsl/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
sound/soc/fsl/Kconfig +2 -0
@@ -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.
Signature · 1 line
2.43.0
PATCH 2/3 ASoC: fsl: lpc3xxx-i2s: select REGMAP_MMIO
In reply to Jude Gyimahlpc3xxx-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.
--- sound/soc/fsl/Kconfig | 1 + 1 file changed, 1 insertion(+)
sound/soc/fsl/Kconfig +1 -0
@@ -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.
Signature · 1 line
2.43.0
PATCH 3/3 ASoC: fsl_xcvr: select BITREVERSE
In reply to Jude GyimahSND_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.
--- sound/soc/fsl/Kconfig | 1 + 1 file changed, 1 insertion(+)
sound/soc/fsl/Kconfig +1 -0
@@ -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
Signature · 1 line
2.43.0
Mark Brown
maintainerQuoted 9 lines · Jude Gyimah
ASoC: fsl: fix missing
GENERIC_BITREVERSEandREGMAP_MMIOdependenciesEach 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.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.5
Thanks!
[1/3] ASoC: fsl_aud2htx: select missing dependencies
https://git.kernel.org/broonie/sound/c/c29a99ab4b11 [2/3] ASoC: fsl: lpc3xxx-i2s: select REGMAP_MMIO https://git.kernel.org/broonie/sound/c/b5c35242c515 [3/3] ASoC: fsl_xcvr: select BITREVERSE https://git.kernel.org/broonie/sound/c/99c9016f6bbd
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark