History

scripts: dtc: only show unique unit address warning for enabled nodes

In some cases an hardware peripheral can be used for two exclusive usages. For example, on STM32MP15 we have the same peripheral for I2S and SPI. We have dedicated driver for each usage and so a dedicated device node in devicetree. To avoid to get useless warnings running "make W=1 dtbs", this patch adds the "-Wunique_unit_address_if_enabled" flag for a make with W=1. In this case we will detect a duplicate address only if both devices are enabled in the devicetree, which is a real error case.

Alexandre Torgue committed 4 years ago

Commit ae5a16c1 parent 33ce4531 file · +8 −4Browse files

Unified · Split

scripts/Makefile.lib+8−4
@@ -334,7 +334,8 @@ quiet_cmd_gzip = GZIP $@ · 333 unmodified lines
334334 # DTC
335335 # ---------------------------------------------------------------------------
336336 DTC ?= $(objtree)/scripts/dtc/dtc
337−DTC_FLAGS += -Wno-interrupt_provider
337+DTC_FLAGS += -Wno-interrupt_provider \
338+ -Wno-unique_unit_address
338339
339340 # Disable noisy checks by default
340341 ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),)
@@ -342,14 +343,17 @@ DTC_FLAGS += -Wno-unit_address_vs_reg \ · 1 unmodified line
342343 -Wno-avoid_unnecessary_addr_size \
343344 -Wno-alias_paths \
344345 -Wno-graph_child_address \
345− -Wno-simple_bus_reg \
346− -Wno-unique_unit_address
346+ -Wno-simple_bus_reg
347+else
348+DTC_FLAGS += \
349+ -Wunique_unit_address_if_enabled
347350 endif
348351
349352 ifneq ($(findstring 2,$(KBUILD_EXTRA_WARN)),)
350353 DTC_FLAGS += -Wnode_name_chars_strict \
351354 -Wproperty_name_chars_strict \
352− -Winterrupt_provider
355+ -Winterrupt_provider \
356+ -Wunique_unit_address
353357 endif
354358
355359 DTC_FLAGS += $(DTC_FLAGS_$(basetarget))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t