mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] soc/tegra: fix unmet dependency on DMADEVICES for TEGRA20_APB_DMA
@ 2021-10-29 20:59 Julian Braha
  2021-10-29 22:07 ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Julian Braha @ 2021-10-29 20:59 UTC (permalink / raw)
  To: thierry.reding, jonathanh, digetx, arnd, ulf.hansson
  Cc: linux-tegra, linux-kernel, fazilyildiran

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.

Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
 drivers/soc/tegra/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/tegra/Kconfig b/drivers/soc/tegra/Kconfig
index 8b53ed1cc67e..ee7f631933c2 100644
--- a/drivers/soc/tegra/Kconfig
+++ b/drivers/soc/tegra/Kconfig
@@ -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
-- 
2.30.2


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

* Re: [PATCH] soc/tegra: fix unmet dependency on DMADEVICES for TEGRA20_APB_DMA
  2021-10-29 20:59 [PATCH] soc/tegra: fix unmet dependency on DMADEVICES for TEGRA20_APB_DMA Julian Braha
@ 2021-10-29 22:07 ` Arnd Bergmann
  2021-10-29 22:21   ` Dmitry Osipenko
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2021-10-29 22:07 UTC (permalink / raw)
  To: Julian Braha
  Cc: Thierry Reding, Jonathan Hunter, Dmitry Osipenko, Arnd Bergmann,
	Ulf Hansson, open list:TEGRA ARCHITECTURE SUPPORT,
	Linux Kernel Mailing List, fazilyildiran

On Fri, Oct 29, 2021 at 10:59 PM Julian Braha <julianbraha@gmail.com> wrote:
>
>  drivers/soc/tegra/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soc/tegra/Kconfig b/drivers/soc/tegra/Kconfig
> index 8b53ed1cc67e..ee7f631933c2 100644
> --- a/drivers/soc/tegra/Kconfig
> +++ b/drivers/soc/tegra/Kconfig
> @@ -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

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

* Re: [PATCH] soc/tegra: fix unmet dependency on DMADEVICES for TEGRA20_APB_DMA
  2021-10-29 22:07 ` Arnd Bergmann
@ 2021-10-29 22:21   ` Dmitry Osipenko
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Osipenko @ 2021-10-29 22:21 UTC (permalink / raw)
  To: Arnd Bergmann, Julian Braha
  Cc: Thierry Reding, Jonathan Hunter, Ulf Hansson,
	open list:TEGRA ARCHITECTURE SUPPORT, Linux Kernel Mailing List,
	fazilyildiran

30.10.2021 01:07, Arnd Bergmann пишет:
> On Fri, Oct 29, 2021 at 10:59 PM Julian Braha <julianbraha@gmail.com> wrote:
>>
>>  drivers/soc/tegra/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/soc/tegra/Kconfig b/drivers/soc/tegra/Kconfig
>> index 8b53ed1cc67e..ee7f631933c2 100644
>> --- a/drivers/soc/tegra/Kconfig
>> +++ b/drivers/soc/tegra/Kconfig
>> @@ -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.

There was a patch that did it already [1], not sure what happened to it.

[1] https://lore.kernel.org/all/20200923003421.4561-1-digetx@gmail.com/

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

end of thread, other threads:[~2021-10-29 22:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 20:59 [PATCH] soc/tegra: fix unmet dependency on DMADEVICES for TEGRA20_APB_DMA Julian Braha
2021-10-29 22:07 ` Arnd Bergmann
2021-10-29 22:21   ` Dmitry Osipenko

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®