All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: Report enabled nodes with duplicated address
@ 2021-12-07 14:03 Sam Protsenko
  2021-12-14 16:11 ` Sam Protsenko
  0 siblings, 1 reply; 4+ messages in thread
From: Sam Protsenko @ 2021-12-07 14:03 UTC (permalink / raw)
  To: Rob Herring, Masahiro Yamada, Michal Marek
  Cc: Nick Desaulniers, linux-kbuild, linux-kernel,
	Krzysztof Kozlowski, devicetree, linux-samsung-soc

Duplicated unit address is a normal case, as long as no more than one
node using that address is enabled. Having duplicated addresses is
already allowed by '-Wno-unique_unit_address' in DTC_FLAGS. But two
simultaneously enabled nodes sharing the same address is usually
incorrect. Add '-Wunique_unit_address_if_enabled' flag to report
warnings for such case when doing "make dtbs_check".

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reported-by: Rob Herring <robh@kernel.org>
Suggested-by: Rob Herring <robh@kernel.org>
---
NOTE: After applying this patch, a lot of warnings appear on "make
dtbs_check". I'm not completely sure if it's ok, so feel free to Nack.

 scripts/Makefile.lib | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index ce6142238835..2f00c996d2e3 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -315,7 +315,8 @@ DTC_FLAGS += -Wno-unit_address_vs_reg \
 	-Wno-alias_paths \
 	-Wno-graph_child_address \
 	-Wno-simple_bus_reg \
-	-Wno-unique_unit_address
+	-Wno-unique_unit_address \
+	-Wunique_unit_address_if_enabled
 endif
 
 ifneq ($(findstring 2,$(KBUILD_EXTRA_WARN)),)
-- 
2.30.2


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

* Re: [PATCH] kbuild: Report enabled nodes with duplicated address
  2021-12-07 14:03 [PATCH] kbuild: Report enabled nodes with duplicated address Sam Protsenko
@ 2021-12-14 16:11 ` Sam Protsenko
  2021-12-18  1:02   ` Masahiro Yamada
  2022-02-08 20:02   ` Rob Herring
  0 siblings, 2 replies; 4+ messages in thread
From: Sam Protsenko @ 2021-12-14 16:11 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nick Desaulniers, linux-kbuild, linux-kernel, Michal Marek,
	Krzysztof Kozlowski, devicetree, linux-samsung-soc,
	Masahiro Yamada

On Tue, 7 Dec 2021 at 16:03, Sam Protsenko <semen.protsenko@linaro.org> wrote:
>
> Duplicated unit address is a normal case, as long as no more than one
> node using that address is enabled. Having duplicated addresses is
> already allowed by '-Wno-unique_unit_address' in DTC_FLAGS. But two
> simultaneously enabled nodes sharing the same address is usually
> incorrect. Add '-Wunique_unit_address_if_enabled' flag to report
> warnings for such case when doing "make dtbs_check".
>
> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> Reported-by: Rob Herring <robh@kernel.org>
> Suggested-by: Rob Herring <robh@kernel.org>
> ---
> NOTE: After applying this patch, a lot of warnings appear on "make
> dtbs_check". I'm not completely sure if it's ok, so feel free to Nack.
>

Hi Rob,

Do you think this patch is feasible? You asked me to send it before,
though I now see it leads to a lot of errors being revealed when doing
"make dtbs" and "make dtbs_check". Please let me know if it's Ack or
Nack -- I'm fine with any resolution, just want to know if I should
continue to carry it in my local branch or drop it.

Thanks!

>  scripts/Makefile.lib | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index ce6142238835..2f00c996d2e3 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -315,7 +315,8 @@ DTC_FLAGS += -Wno-unit_address_vs_reg \
>         -Wno-alias_paths \
>         -Wno-graph_child_address \
>         -Wno-simple_bus_reg \
> -       -Wno-unique_unit_address
> +       -Wno-unique_unit_address \
> +       -Wunique_unit_address_if_enabled
>  endif
>
>  ifneq ($(findstring 2,$(KBUILD_EXTRA_WARN)),)
> --
> 2.30.2
>

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

* Re: [PATCH] kbuild: Report enabled nodes with duplicated address
  2021-12-14 16:11 ` Sam Protsenko
@ 2021-12-18  1:02   ` Masahiro Yamada
  2022-02-08 20:02   ` Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2021-12-18  1:02 UTC (permalink / raw)
  To: Sam Protsenko
  Cc: Rob Herring, Nick Desaulniers, Linux Kbuild mailing list,
	Linux Kernel Mailing List, Michal Marek, Krzysztof Kozlowski,
	DTML, linux-samsung-soc

On Wed, Dec 15, 2021 at 1:11 AM Sam Protsenko
<semen.protsenko@linaro.org> wrote:
>
> On Tue, 7 Dec 2021 at 16:03, Sam Protsenko <semen.protsenko@linaro.org> wrote:
> >
> > Duplicated unit address is a normal case, as long as no more than one
> > node using that address is enabled. Having duplicated addresses is
> > already allowed by '-Wno-unique_unit_address' in DTC_FLAGS. But two
> > simultaneously enabled nodes sharing the same address is usually
> > incorrect. Add '-Wunique_unit_address_if_enabled' flag to report
> > warnings for such case when doing "make dtbs_check".
> >
> > Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> > Reported-by: Rob Herring <robh@kernel.org>
> > Suggested-by: Rob Herring <robh@kernel.org>
> > ---
> > NOTE: After applying this patch, a lot of warnings appear on "make
> > dtbs_check". I'm not completely sure if it's ok, so feel free to Nack.
> >
>
> Hi Rob,
>
> Do you think this patch is feasible? You asked me to send it before,
> though I now see it leads to a lot of errors being revealed when doing
> "make dtbs" and "make dtbs_check". Please let me know if it's Ack or
> Nack -- I'm fine with any resolution, just want to know if I should
> continue to carry it in my local branch or drop it.
>
> Thanks!


This is up to Rob.
I do not mind either way.

>
> >  scripts/Makefile.lib | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> > index ce6142238835..2f00c996d2e3 100644
> > --- a/scripts/Makefile.lib
> > +++ b/scripts/Makefile.lib
> > @@ -315,7 +315,8 @@ DTC_FLAGS += -Wno-unit_address_vs_reg \
> >         -Wno-alias_paths \
> >         -Wno-graph_child_address \
> >         -Wno-simple_bus_reg \
> > -       -Wno-unique_unit_address
> > +       -Wno-unique_unit_address \
> > +       -Wunique_unit_address_if_enabled
> >  endif
> >
> >  ifneq ($(findstring 2,$(KBUILD_EXTRA_WARN)),)
> > --
> > 2.30.2
> >



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] kbuild: Report enabled nodes with duplicated address
  2021-12-14 16:11 ` Sam Protsenko
  2021-12-18  1:02   ` Masahiro Yamada
@ 2022-02-08 20:02   ` Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2022-02-08 20:02 UTC (permalink / raw)
  To: Sam Protsenko
  Cc: Nick Desaulniers, Linux Kbuild mailing list, linux-kernel,
	Michal Marek, Krzysztof Kozlowski, devicetree, linux-samsung-soc,
	Masahiro Yamada

On Tue, Dec 14, 2021 at 10:11 AM Sam Protsenko
<semen.protsenko@linaro.org> wrote:
>
> On Tue, 7 Dec 2021 at 16:03, Sam Protsenko <semen.protsenko@linaro.org> wrote:
> >
> > Duplicated unit address is a normal case, as long as no more than one
> > node using that address is enabled. Having duplicated addresses is
> > already allowed by '-Wno-unique_unit_address' in DTC_FLAGS. But two
> > simultaneously enabled nodes sharing the same address is usually
> > incorrect. Add '-Wunique_unit_address_if_enabled' flag to report
> > warnings for such case when doing "make dtbs_check".
> >
> > Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> > Reported-by: Rob Herring <robh@kernel.org>
> > Suggested-by: Rob Herring <robh@kernel.org>
> > ---
> > NOTE: After applying this patch, a lot of warnings appear on "make
> > dtbs_check". I'm not completely sure if it's ok, so feel free to Nack.
> >
>
> Hi Rob,
>
> Do you think this patch is feasible? You asked me to send it before,
> though I now see it leads to a lot of errors being revealed when doing
> "make dtbs" and "make dtbs_check". Please let me know if it's Ack or
> Nack -- I'm fine with any resolution, just want to know if I should
> continue to carry it in my local branch or drop it.

Sorry, I'd missed this. Anyway, since there are lots of warnings, we
can't apply this.

Rob

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

end of thread, other threads:[~2022-02-08 22:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 14:03 [PATCH] kbuild: Report enabled nodes with duplicated address Sam Protsenko
2021-12-14 16:11 ` Sam Protsenko
2021-12-18  1:02   ` Masahiro Yamada
2022-02-08 20:02   ` Rob Herring

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.