ASoC: rockchip: fix missing REGMAP_MMIO dependencies
Subsystems (3)
cover ASoC: rockchip: fix missing 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 5 drivers, so they are here as one series.
Affected: rockchip_i2s, rockchip_i2s_tdm, rockchip_pdm, rockchip_sai, rockchip_spdif.
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 (5):
ASoC: rockchip_i2s: select REGMAP_MMIO
ASoC: rockchip_i2s_tdm: select REGMAP_MMIO
ASoC: rockchip_pdm: select REGMAP_MMIO
ASoC: rockchip_sai: select REGMAP_MMIO
ASoC: rockchip_spdif: select REGMAP_MMIO
sound/soc/rockchip/Kconfig | 5 +++++ 1 file changed, 5 insertions(+)
Signature · 1 line
2.43.0
PATCH 1/5 ASoC: rockchip_i2s: select REGMAP_MMIO
rockchip_i2s calls __devm_regmap_init_mmio_clk, which drivers/base/regmap/regmap-mmio.c provides under REGMAP_MMIO.
rockchip_i2s.c:(.text+0x418): 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_ROCKCHIP_I2S unselectable.
Reproduced on v7.3, x86_64, with CONFIG_SND_SOC_ROCKCHIP_I2S=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/rockchip/Kconfig | 1 + 1 file changed, 1 insertion(+)
sound/soc/rockchip/Kconfig +1 -0
@@ -5,6 +5,7 @@ menu "Rockchip" config SND_SOC_ROCKCHIP_I2S tristate "Rockchip I2S Device Driver" + select REGMAP_MMIO select SND_SOC_GENERIC_DMAENGINE_PCM help Say Y or M if you want to add support for I2S driver for
Signature · 1 line
2.43.0
PATCH 2/5 ASoC: rockchip_i2s_tdm: select REGMAP_MMIO
In reply to Jude Gyimahrockchip_i2s_tdm calls __devm_regmap_init_mmio_clk, which drivers/base/regmap/regmap-mmio.c provides under REGMAP_MMIO.
rockchip_i2s_tdm.c:1304:(.text+0x14b1b6): 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_ROCKCHIP_I2S_TDM unselectable.
Reproduced on v7.3, x86_64, with CONFIG_SND_SOC_ROCKCHIP_I2S_TDM=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/rockchip/Kconfig | 1 + 1 file changed, 1 insertion(+)
sound/soc/rockchip/Kconfig +1 -0
@@ -14,6 +14,7 @@ config SND_SOC_ROCKCHIP_I2S config SND_SOC_ROCKCHIP_I2S_TDM tristate "Rockchip I2S/TDM Device Driver" + select REGMAP_MMIO select SND_SOC_GENERIC_DMAENGINE_PCM help Say Y or M if you want to add support for the I2S/TDM driver for
Signature · 1 line
2.43.0
PATCH 3/5 ASoC: rockchip_pdm: select REGMAP_MMIO
In reply to Jude Gyimahrockchip_pdm calls __devm_regmap_init_mmio_clk, which drivers/base/regmap/regmap-mmio.c provides under REGMAP_MMIO.
rockchip_pdm.c:(.text+0xef4): 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_ROCKCHIP_PDM unselectable.
Reproduced on v7.3, x86_64, with CONFIG_SND_SOC_ROCKCHIP_PDM=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/rockchip/Kconfig | 1 + 1 file changed, 1 insertion(+)
sound/soc/rockchip/Kconfig +1 -0
@@ -25,6 +25,7 @@ config SND_SOC_ROCKCHIP_I2S_TDM config SND_SOC_ROCKCHIP_PDM tristate "Rockchip PDM Controller Driver" + select REGMAP_MMIO select SND_SOC_GENERIC_DMAENGINE_PCM select RATIONAL help
Signature · 1 line
2.43.0
PATCH 4/5 ASoC: rockchip_sai: select REGMAP_MMIO
In reply to Jude Gyimahrockchip_sai calls __devm_regmap_init_mmio_clk, which drivers/base/regmap/regmap-mmio.c provides under REGMAP_MMIO.
rockchip_sai.c:1424:(.text+0x153060): 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_ROCKCHIP_SAI unselectable.
Reproduced on v7.3, x86_64, with CONFIG_SND_SOC_ROCKCHIP_SAI=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/rockchip/Kconfig | 1 + 1 file changed, 1 insertion(+)
sound/soc/rockchip/Kconfig +1 -0
@@ -35,6 +35,7 @@ config SND_SOC_ROCKCHIP_PDM config SND_SOC_ROCKCHIP_SAI tristate "Rockchip SAI Controller Driver" + select REGMAP_MMIO select SND_SOC_GENERIC_DMAENGINE_PCM help Say Y or M if you want to add support for the Rockchip Serial Audio
Signature · 1 line
2.43.0
PATCH 5/5 ASoC: rockchip_spdif: select REGMAP_MMIO
In reply to Jude Gyimahrockchip_spdif calls __devm_regmap_init_mmio_clk, which drivers/base/regmap/regmap-mmio.c provides under REGMAP_MMIO.
rockchip_spdif.c:(.text+0xf67): 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_ROCKCHIP_SPDIF unselectable.
Reproduced on v7.3, x86_64, with CONFIG_SND_SOC_ROCKCHIP_SPDIF=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/rockchip/Kconfig | 1 + 1 file changed, 1 insertion(+)
sound/soc/rockchip/Kconfig +1 -0
@@ -45,6 +45,7 @@ config SND_SOC_ROCKCHIP_SAI config SND_SOC_ROCKCHIP_SPDIF tristate "Rockchip SPDIF Device Driver" + select REGMAP_MMIO select SND_PCM_IEC958 select SND_SOC_GENERIC_DMAENGINE_PCM help
Signature · 1 line
2.43.0
Mark Brown
maintainerQuoted 10 lines · Jude Gyimah
ASoC: rockchip: fix missing
REGMAP_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 5 drivers, so they are here as one series.
Affected:
rockchip_i2s,rockchip_i2s_tdm,rockchip_pdm,rockchip_sai,rockchip_spdif.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4
Thanks!
[1/5] ASoC: rockchip_i2s: select REGMAP_MMIO
https://git.kernel.org/broonie/sound/c/1c57404bf9ba [2/5] ASoC: rockchip_i2s_tdm: select REGMAP_MMIO https://git.kernel.org/broonie/sound/c/b8284f2b73f8 [3/5] ASoC: rockchip_pdm: select REGMAP_MMIO https://git.kernel.org/broonie/sound/c/420c7918a61b [4/5] ASoC: rockchip_sai: select REGMAP_MMIO https://git.kernel.org/broonie/sound/c/829904994e7a [5/5] ASoC: rockchip_spdif: select REGMAP_MMIO https://git.kernel.org/broonie/sound/c/67a7e2073909
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