soc/tegra: fix unmet dependency on DMADEVICES for TEGRA20_APB_DMA
PATCH 1/1 soc/tegra: fix unmet dependency on DMADEVICES for TEGRA20_APB_DMA
When SOC_TEGRA_FUSE is selected, and DMADEVICES is not selected, Kbuild gives the following warning:
WARNING: unmet direct dependencies detected for TEGRA20_APB_DMA
Depends on [n]: DMADEVICES [=n] && (ARCH_TEGRA [=y] || COMPILE_TEST [=y]) Selected by [y]:
- SOC_TEGRA_FUSE [=y] && ARCH_TEGRA [=y] && ARCH_TEGRA_2x_SOC [=y]
This is because SOC_TEGRA_FUSE selects TEGRA20_APB_DMA without selecting or depending on DMADEVICES, despite TEGRA20_APB_DMA depending on SOC_TEGRA_FUSE.
This unmet dependency bug was found by Kismet, a static analysis tool for Kconfig. Please advise if this is not the appropriate solution.
--- drivers/soc/tegra/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/tegra/Kconfig +1 -1
@@ -136,7 +136,7 @@ config SOC_TEGRA_FUSE def_bool y depends on ARCH_TEGRA select SOC_BUS - select TEGRA20_APB_DMA if ARCH_TEGRA_2x_SOC + select TEGRA20_APB_DMA if DMADEVICES && ARCH_TEGRA_2x_SOC config SOC_TEGRA_FLOWCTRL bool
Signature · 1 line
2.30.2
Quoted 9 lines · Julian Braha
drivers/soc/tegra/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/soc/tegra/Kconfig +0
-0
drivers/soc/tegra/Kconfig config SOC_TEGRA_FUSE · line 140
Quoted 6 lines
drivers/soc/tegra/Kconfig +1
-1@@ -136,7 +136,7 @@ config SOC_TEGRA_FUSE def_bool y depends on ARCH_TEGRA select SOC_BUS - select TEGRA20_APB_DMA if ARCH_TEGRA_2x_SOC + select TEGRA20_APB_DMA if DMADEVICES && ARCH_TEGRA_2x_SOC
Is this actually a compile-time dependency? If the fuse driver merely uses DMA and assumes that the TEGRA20_APB_DMA driver is the one providing this functionality, the 'select' should be removed here.
Arnd
30.10.2021 01:07, Arnd Bergmann пишет:
Quoted 5 lines · Julian Braha
Quoted 4 lines
drivers/soc/tegra/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
drivers/soc/tegra/Kconfig config SOC_TEGRA_FUSE · line 140
Quoted 11 lines
drivers/soc/tegra/Kconfig +1
-1@@ -136,7 +136,7 @@ config SOC_TEGRA_FUSE def_bool y depends on ARCH_TEGRA select SOC_BUS - select TEGRA20_APB_DMA if ARCH_TEGRA_2x_SOC + select TEGRA20_APB_DMA if DMADEVICES && ARCH_TEGRA_2x_SOCIs this actually a compile-time dependency? If the fuse driver merely uses DMA and assumes that the
TEGRA20_APB_DMAdriver is the one providing this functionality, the 'select' should be removed here.
There was a patch that did it already [1], not sure what happened to it.