All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build warning after merge of the tegra tree
@ 2021-06-03  0:35 Stephen Rothwell
  2021-06-03  2:01 ` Dmitry Osipenko
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2021-06-03  0:35 UTC (permalink / raw)
  To: Colin Cross, Olof Johansson, Thierry Reding
  Cc: Dmitry Osipenko, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 526 bytes --]

Hi all,

After merging the tegra tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

WARNING: unmet direct dependencies detected for TEGRA210_EMC_TABLE
  Depends on [n]: MEMORY [=y] && TEGRA_MC [=y] && ARCH_TEGRA_210_SOC [=n]
  Selected by [m]:
  - TEGRA210_EMC [=m] && MEMORY [=y] && TEGRA_MC [=y] && (ARCH_TEGRA_210_SOC [=n] || COMPILE_TEST [=y])

Probably introduced by commit

  08decdd5b448 ("memory: tegra: Enable compile testing for all drivers")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the tegra tree
  2021-06-03  0:35 linux-next: build warning after merge of the tegra tree Stephen Rothwell
@ 2021-06-03  2:01 ` Dmitry Osipenko
  2021-06-03 12:18   ` Thierry Reding
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Osipenko @ 2021-06-03  2:01 UTC (permalink / raw)
  To: Stephen Rothwell, Colin Cross, Olof Johansson, Thierry Reding
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

03.06.2021 03:35, Stephen Rothwell пишет:
> Hi all,
> 
> After merging the tegra tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> WARNING: unmet direct dependencies detected for TEGRA210_EMC_TABLE
>   Depends on [n]: MEMORY [=y] && TEGRA_MC [=y] && ARCH_TEGRA_210_SOC [=n]
>   Selected by [m]:
>   - TEGRA210_EMC [=m] && MEMORY [=y] && TEGRA_MC [=y] && (ARCH_TEGRA_210_SOC [=n] || COMPILE_TEST [=y])
> 
> Probably introduced by commit
> 
>   08decdd5b448 ("memory: tegra: Enable compile testing for all drivers")
> 

Thank you. This is a new warning to me, apparently this case wasn't previously tested by kernel build bot.

Perhaps this should fix it:

diff --git a/drivers/memory/tegra/Kconfig b/drivers/memory/tegra/Kconfig
index 71bba2345bce..3f2fa7750118 100644
--- a/drivers/memory/tegra/Kconfig
+++ b/drivers/memory/tegra/Kconfig
@@ -47,7 +47,6 @@ config TEGRA124_EMC
 
 config TEGRA210_EMC_TABLE
 	bool
-	depends on ARCH_TEGRA_210_SOC
 
 config TEGRA210_EMC
 	tristate "NVIDIA Tegra210 External Memory Controller driver"


Thierry, please squash this change into the original patch if it looks good to you.

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

* Re: linux-next: build warning after merge of the tegra tree
  2021-06-03  2:01 ` Dmitry Osipenko
@ 2021-06-03 12:18   ` Thierry Reding
  2021-06-03 14:03     ` Dmitry Osipenko
  0 siblings, 1 reply; 10+ messages in thread
From: Thierry Reding @ 2021-06-03 12:18 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: Stephen Rothwell, Colin Cross, Olof Johansson,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1580 bytes --]

On Thu, Jun 03, 2021 at 05:01:48AM +0300, Dmitry Osipenko wrote:
> 03.06.2021 03:35, Stephen Rothwell пишет:
> > Hi all,
> > 
> > After merging the tegra tree, today's linux-next build (x86_64
> > allmodconfig) produced this warning:
> > 
> > WARNING: unmet direct dependencies detected for TEGRA210_EMC_TABLE
> >   Depends on [n]: MEMORY [=y] && TEGRA_MC [=y] && ARCH_TEGRA_210_SOC [=n]
> >   Selected by [m]:
> >   - TEGRA210_EMC [=m] && MEMORY [=y] && TEGRA_MC [=y] && (ARCH_TEGRA_210_SOC [=n] || COMPILE_TEST [=y])
> > 
> > Probably introduced by commit
> > 
> >   08decdd5b448 ("memory: tegra: Enable compile testing for all drivers")
> > 
> 
> Thank you. This is a new warning to me, apparently this case wasn't previously tested by kernel build bot.
> 
> Perhaps this should fix it:
> 
> diff --git a/drivers/memory/tegra/Kconfig b/drivers/memory/tegra/Kconfig
> index 71bba2345bce..3f2fa7750118 100644
> --- a/drivers/memory/tegra/Kconfig
> +++ b/drivers/memory/tegra/Kconfig
> @@ -47,7 +47,6 @@ config TEGRA124_EMC
>  
>  config TEGRA210_EMC_TABLE
>  	bool
> -	depends on ARCH_TEGRA_210_SOC

Why not just add a || COMPILE_TEST like we do for TEGRA210_EMC? Because
TEGRA210_EMC being pulled in under COMPILE_TEST (and then pulling in
TEGRA210_EMC_TABLE which is missing the alternative path) seems to be
the root cause for this.

Thierry

>  
>  config TEGRA210_EMC
>  	tristate "NVIDIA Tegra210 External Memory Controller driver"
> 
> 
> Thierry, please squash this change into the original patch if it looks good to you.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: linux-next: build warning after merge of the tegra tree
  2021-06-03 12:18   ` Thierry Reding
@ 2021-06-03 14:03     ` Dmitry Osipenko
  2021-06-03 14:35       ` Thierry Reding
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Osipenko @ 2021-06-03 14:03 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Stephen Rothwell, Colin Cross, Olof Johansson,
	Linux Kernel Mailing List, Linux Next Mailing List

03.06.2021 15:18, Thierry Reding пишет:
> On Thu, Jun 03, 2021 at 05:01:48AM +0300, Dmitry Osipenko wrote:
>> 03.06.2021 03:35, Stephen Rothwell пишет:
>>> Hi all,
>>>
>>> After merging the tegra tree, today's linux-next build (x86_64
>>> allmodconfig) produced this warning:
>>>
>>> WARNING: unmet direct dependencies detected for TEGRA210_EMC_TABLE
>>>   Depends on [n]: MEMORY [=y] && TEGRA_MC [=y] && ARCH_TEGRA_210_SOC [=n]
>>>   Selected by [m]:
>>>   - TEGRA210_EMC [=m] && MEMORY [=y] && TEGRA_MC [=y] && (ARCH_TEGRA_210_SOC [=n] || COMPILE_TEST [=y])
>>>
>>> Probably introduced by commit
>>>
>>>   08decdd5b448 ("memory: tegra: Enable compile testing for all drivers")
>>>
>>
>> Thank you. This is a new warning to me, apparently this case wasn't previously tested by kernel build bot.
>>
>> Perhaps this should fix it:
>>
>> diff --git a/drivers/memory/tegra/Kconfig b/drivers/memory/tegra/Kconfig
>> index 71bba2345bce..3f2fa7750118 100644
>> --- a/drivers/memory/tegra/Kconfig
>> +++ b/drivers/memory/tegra/Kconfig
>> @@ -47,7 +47,6 @@ config TEGRA124_EMC
>>  
>>  config TEGRA210_EMC_TABLE
>>  	bool
>> -	depends on ARCH_TEGRA_210_SOC
> 
> Why not just add a || COMPILE_TEST like we do for TEGRA210_EMC? Because
> TEGRA210_EMC being pulled in under COMPILE_TEST (and then pulling in
> TEGRA210_EMC_TABLE which is missing the alternative path) seems to be
> the root cause for this.

The anonymous Kconfig entry is unavailable by default, it can be only
selected by other entry, IIUC. In our case the TEGRA210_EMC_TABLE is
selected by TEGRA210_EMC, hence additional dependencies aren't needed
for TEGRA210_EMC_TABLE.

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

* Re: linux-next: build warning after merge of the tegra tree
  2021-06-03 14:03     ` Dmitry Osipenko
@ 2021-06-03 14:35       ` Thierry Reding
  2021-06-03 14:37         ` Dmitry Osipenko
  0 siblings, 1 reply; 10+ messages in thread
From: Thierry Reding @ 2021-06-03 14:35 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: Stephen Rothwell, Colin Cross, Olof Johansson,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2799 bytes --]

On Thu, Jun 03, 2021 at 05:03:38PM +0300, Dmitry Osipenko wrote:
> 03.06.2021 15:18, Thierry Reding пишет:
> > On Thu, Jun 03, 2021 at 05:01:48AM +0300, Dmitry Osipenko wrote:
> >> 03.06.2021 03:35, Stephen Rothwell пишет:
> >>> Hi all,
> >>>
> >>> After merging the tegra tree, today's linux-next build (x86_64
> >>> allmodconfig) produced this warning:
> >>>
> >>> WARNING: unmet direct dependencies detected for TEGRA210_EMC_TABLE
> >>>   Depends on [n]: MEMORY [=y] && TEGRA_MC [=y] && ARCH_TEGRA_210_SOC [=n]
> >>>   Selected by [m]:
> >>>   - TEGRA210_EMC [=m] && MEMORY [=y] && TEGRA_MC [=y] && (ARCH_TEGRA_210_SOC [=n] || COMPILE_TEST [=y])
> >>>
> >>> Probably introduced by commit
> >>>
> >>>   08decdd5b448 ("memory: tegra: Enable compile testing for all drivers")
> >>>
> >>
> >> Thank you. This is a new warning to me, apparently this case wasn't previously tested by kernel build bot.
> >>
> >> Perhaps this should fix it:
> >>
> >> diff --git a/drivers/memory/tegra/Kconfig b/drivers/memory/tegra/Kconfig
> >> index 71bba2345bce..3f2fa7750118 100644
> >> --- a/drivers/memory/tegra/Kconfig
> >> +++ b/drivers/memory/tegra/Kconfig
> >> @@ -47,7 +47,6 @@ config TEGRA124_EMC
> >>  
> >>  config TEGRA210_EMC_TABLE
> >>  	bool
> >> -	depends on ARCH_TEGRA_210_SOC
> > 
> > Why not just add a || COMPILE_TEST like we do for TEGRA210_EMC? Because
> > TEGRA210_EMC being pulled in under COMPILE_TEST (and then pulling in
> > TEGRA210_EMC_TABLE which is missing the alternative path) seems to be
> > the root cause for this.
> 
> The anonymous Kconfig entry is unavailable by default, it can be only
> selected by other entry, IIUC. In our case the TEGRA210_EMC_TABLE is
> selected by TEGRA210_EMC, hence additional dependencies aren't needed
> for TEGRA210_EMC_TABLE.

The code guarded by TEGRA210_EMC_TABLE makes use of some symbols that
are only available if ARCH_TEGRA_210_SOC is also defined. If we don't
list the dependencies via Kconfig this could lead to a problem where
somebody selected TEGRA210_EMC_TABLE without having a dependency on
ARCH_TEGRA_210_SOC, which would then lead to a build error.

If we do represent the dependency in Kconfig, we'll get a warning like
the above during the configuration step and the offending Kconfig option
will end up disabled, and avoid the build failure.

Granted, this could be caught during patch review, and yes, there's not
technically a need to encode this using Kconfig dependencies, but at the
same time there's also no reason not to use the safeguards we have at
our disposal to avoid this in a more automated way.

I'd prefer to stick with the explicit dependency in Kconfig, so I've
updated the patch to match the dependencies to that of TEGRA210_EMC.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: linux-next: build warning after merge of the tegra tree
  2021-06-03 14:35       ` Thierry Reding
@ 2021-06-03 14:37         ` Dmitry Osipenko
  0 siblings, 0 replies; 10+ messages in thread
From: Dmitry Osipenko @ 2021-06-03 14:37 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Stephen Rothwell, Colin Cross, Olof Johansson,
	Linux Kernel Mailing List, Linux Next Mailing List

03.06.2021 17:35, Thierry Reding пишет:
> On Thu, Jun 03, 2021 at 05:03:38PM +0300, Dmitry Osipenko wrote:
>> 03.06.2021 15:18, Thierry Reding пишет:
>>> On Thu, Jun 03, 2021 at 05:01:48AM +0300, Dmitry Osipenko wrote:
>>>> 03.06.2021 03:35, Stephen Rothwell пишет:
>>>>> Hi all,
>>>>>
>>>>> After merging the tegra tree, today's linux-next build (x86_64
>>>>> allmodconfig) produced this warning:
>>>>>
>>>>> WARNING: unmet direct dependencies detected for TEGRA210_EMC_TABLE
>>>>>   Depends on [n]: MEMORY [=y] && TEGRA_MC [=y] && ARCH_TEGRA_210_SOC [=n]
>>>>>   Selected by [m]:
>>>>>   - TEGRA210_EMC [=m] && MEMORY [=y] && TEGRA_MC [=y] && (ARCH_TEGRA_210_SOC [=n] || COMPILE_TEST [=y])
>>>>>
>>>>> Probably introduced by commit
>>>>>
>>>>>   08decdd5b448 ("memory: tegra: Enable compile testing for all drivers")
>>>>>
>>>>
>>>> Thank you. This is a new warning to me, apparently this case wasn't previously tested by kernel build bot.
>>>>
>>>> Perhaps this should fix it:
>>>>
>>>> diff --git a/drivers/memory/tegra/Kconfig b/drivers/memory/tegra/Kconfig
>>>> index 71bba2345bce..3f2fa7750118 100644
>>>> --- a/drivers/memory/tegra/Kconfig
>>>> +++ b/drivers/memory/tegra/Kconfig
>>>> @@ -47,7 +47,6 @@ config TEGRA124_EMC
>>>>  
>>>>  config TEGRA210_EMC_TABLE
>>>>  	bool
>>>> -	depends on ARCH_TEGRA_210_SOC
>>>
>>> Why not just add a || COMPILE_TEST like we do for TEGRA210_EMC? Because
>>> TEGRA210_EMC being pulled in under COMPILE_TEST (and then pulling in
>>> TEGRA210_EMC_TABLE which is missing the alternative path) seems to be
>>> the root cause for this.
>>
>> The anonymous Kconfig entry is unavailable by default, it can be only
>> selected by other entry, IIUC. In our case the TEGRA210_EMC_TABLE is
>> selected by TEGRA210_EMC, hence additional dependencies aren't needed
>> for TEGRA210_EMC_TABLE.
> 
> The code guarded by TEGRA210_EMC_TABLE makes use of some symbols that
> are only available if ARCH_TEGRA_210_SOC is also defined. If we don't
> list the dependencies via Kconfig this could lead to a problem where
> somebody selected TEGRA210_EMC_TABLE without having a dependency on
> ARCH_TEGRA_210_SOC, which would then lead to a build error.
> 
> If we do represent the dependency in Kconfig, we'll get a warning like
> the above during the configuration step and the offending Kconfig option
> will end up disabled, and avoid the build failure.
> 
> Granted, this could be caught during patch review, and yes, there's not
> technically a need to encode this using Kconfig dependencies, but at the
> same time there's also no reason not to use the safeguards we have at
> our disposal to avoid this in a more automated way.
> 
> I'd prefer to stick with the explicit dependency in Kconfig, so I've
> updated the patch to match the dependencies to that of TEGRA210_EMC.

I don't mind if you prefer this explicit approach more. Thank you for
the fix.

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

* linux-next: build warning after merge of the tegra tree
@ 2023-07-21  3:07 Stephen Rothwell
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2023-07-21  3:07 UTC (permalink / raw)
  To: Colin Cross, Olof Johansson, Thierry Reding
  Cc: Mohan Kumar, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 833 bytes --]

Hi all,

After merging the tegra tree, today's linux-next build (arm64 defconfig)
produced this warning:

arch/arm64/boot/dts/nvidia/tegra234-p3701.dtsi:57.27-60.10: Warning (graph_endpoint): /bus@0/aconnect@2900000/ahub@2900800/i2s@2901100/ports/port@1/endpoint: graph connection to node '/bus@0/i2c@31e0000/audio-codec@1c/port/endpoint' is not bidirectional
  also defined at arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi:14.30-17.10
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi:56.26-59.8: Warning (graph_endpoint): /bus@0/i2c@31e0000/audio-codec@1c/port/endpoint: graph connection to node '/bus@0/aconnect@2900000/ahub@2900800/i2s@2901000/ports/port@1/endpoint' is not bidirectional

Introduced by commit

  89b143fbba40 ("arm64: tegra: Add audio support for IGX Orin")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the tegra tree
  2022-06-26 23:15 Stephen Rothwell
@ 2022-06-27 11:53 ` Jon Hunter
  0 siblings, 0 replies; 10+ messages in thread
From: Jon Hunter @ 2022-06-27 11:53 UTC (permalink / raw)
  To: Stephen Rothwell, Colin Cross, Olof Johansson, Thierry Reding
  Cc: Bitan Biswas, Linux Kernel Mailing List, Linux Next Mailing List

Hi Stephen,

On 27/06/2022 00:15, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the tegra tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
> 
> In file included from drivers/soc/tegra/fuse/fuse-tegra.c:7:
> include/linux/device.h:136:33: warning: 'dev_attr_production' defined but not used [-Wunused-variable]
>    136 |         struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
>        |                                 ^~~~~~~~~
> drivers/soc/tegra/fuse/fuse-tegra.c:441:8: note: in expansion of macro 'DEVICE_ATTR_RO'
>    441 | static DEVICE_ATTR_RO(production);
>        |        ^~~~~~~~~~~~~~
> 
> Introduced by commit
> 
>    2258fe488a20 ("soc/tegra: fuse: Expose Tegra production status")
>


Thanks for reporting. I have sent an updated patch to fix this [0].

Cheers
Jon

[0] 
https://lore.kernel.org/linux-tegra/20220627114119.110825-1-jonathanh@nvidia.com/T/#u

-- 
nvpublic

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

* linux-next: build warning after merge of the tegra tree
@ 2022-06-26 23:15 Stephen Rothwell
  2022-06-27 11:53 ` Jon Hunter
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2022-06-26 23:15 UTC (permalink / raw)
  To: Colin Cross, Olof Johansson, Thierry Reding
  Cc: Bitan Biswas, Jon Hunter, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

Hi all,

After merging the tegra tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

In file included from drivers/soc/tegra/fuse/fuse-tegra.c:7:
include/linux/device.h:136:33: warning: 'dev_attr_production' defined but not used [-Wunused-variable]
  136 |         struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
      |                                 ^~~~~~~~~
drivers/soc/tegra/fuse/fuse-tegra.c:441:8: note: in expansion of macro 'DEVICE_ATTR_RO'
  441 | static DEVICE_ATTR_RO(production);
      |        ^~~~~~~~~~~~~~

Introduced by commit

  2258fe488a20 ("soc/tegra: fuse: Expose Tegra production status")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the tegra tree
@ 2015-05-07  4:06 Stephen Rothwell
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2015-05-07  4:06 UTC (permalink / raw)
  To: Stephen Warren, Colin Cross, Olof Johansson, Thierry Reding
  Cc: linux-next, linux-kernel, Mikko Perttunen, Tomeu Vizoso

[-- Attachment #1: Type: text/plain, Size: 512 bytes --]

Hi all,

After merging the tegra tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

drivers/clk/tegra/clk-emc.c: In function 'tegra_clk_register_emc':
drivers/clk/tegra/clk-emc.c:519:20: warning: assignment discards 'const' qualifier from pointer target type
  init.parent_names = emc_parent_clk_names;
                    ^

Introduced by commit dc9fdb640b9f ("clk: tegra: Add EMC clock driver").

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2023-07-21  3:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03  0:35 linux-next: build warning after merge of the tegra tree Stephen Rothwell
2021-06-03  2:01 ` Dmitry Osipenko
2021-06-03 12:18   ` Thierry Reding
2021-06-03 14:03     ` Dmitry Osipenko
2021-06-03 14:35       ` Thierry Reding
2021-06-03 14:37         ` Dmitry Osipenko
  -- strict thread matches above, loose matches on Subject: below --
2023-07-21  3:07 Stephen Rothwell
2022-06-26 23:15 Stephen Rothwell
2022-06-27 11:53 ` Jon Hunter
2015-05-07  4:06 Stephen Rothwell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.