Skip to contentSkip to conversation

staging: ralink-gdma: fix kconfig dependency bug for DMA_RALINK

PATCH New Necip Fazil Yildiran 1 participant 1 message Nov 4, 2020 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: ralink-gdma: fix kconfig dependency bug for DMA_RALINK

When DMA_RALINK is enabled and DMADEVICES is disabled, it results in the following Kbuild warnings:

WARNING: unmet direct dependencies detected for DMA_ENGINE
Depends on [n]: DMADEVICES [=n]
Selected by [y]:
- DMA_RALINK [=y] && STAGING [=y] && RALINK [=y] && !SOC_RT288X [=n]

WARNING: unmet direct dependencies detected for DMA_VIRTUAL_CHANNELS
Depends on [n]: DMADEVICES [=n]
Selected by [y]:
- DMA_RALINK [=y] && STAGING [=y] && RALINK [=y] && !SOC_RT288X [=n]

The reason is that DMA_RALINK selects DMA_ENGINE and DMA_VIRTUAL_CHANNELS without depending on or selecting DMADEVICES while DMA_ENGINE and DMA_VIRTUAL_CHANNELS are subordinate to DMADEVICES. This can also fail building the kernel as demonstrated in a bug report.

Honor the kconfig dependency to remove unmet direct dependency warnings and avoid any potential build failures.

---
 drivers/staging/ralink-gdma/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/ralink-gdma/Kconfig +1 -0
index 54e8029e6b1a..0017376234e2 100644
@@ -2,6 +2,7 @@
 config DMA_RALINK
 	tristate "RALINK DMA support"
 	depends on RALINK && !SOC_RT288X
+	depends on DMADEVICES
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 
Signature · 1 line
2.25.1