Skip to contentSkip to conversation

kbuild: Report enabled nodes with duplicated address

PATCH In review Sam Protsenko 3 participants 4 messages Dec 7, 2021 – Feb 8, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: Report enabled nodes with duplicated address

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".

---
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(-)
scripts/Makefile.lib +2 -1
index ce6142238835..2f00c996d2e3 100644
@@ -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)),)
Signature · 1 line
2.30.2
#1 lore raw
Quoted 8 lines · Sam Protsenko

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".

Quoted 7 lines

---
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!

Quoted 20 lines
 scripts/Makefile.lib | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/Makefile.lib +2 -2
index ce6142238835..2f00c996d2e3 100644
@@ -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

#2 lore raw
Quoted 20 lines · Sam Protsenko
Quoted 8 lines · Sam Protsenko

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".

Quoted 7 lines

---
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,

Quoted 7 lines

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.

Quoted 21 lines
Quoted 21 lines
 scripts/Makefile.lib | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/Makefile.lib +2 -2
index ce6142238835..2f00c996d2e3 100644
@@ -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

Signature · 2 lines
Best Regards
Masahiro Yamada
#3 lore raw
In reply to Sam Protsenko
Quoted 18 lines · Sam Protsenko
Quoted 8 lines · Sam Protsenko

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".

Quoted 7 lines

---
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.

Quoted 7 lines

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