Skip to content

Commit

Permalink
kbuild: fix W= option checks for extra DTC warnings
Browse files Browse the repository at this point in the history
Kbuild supports 3 levels of extra warnings, and multiple levels can
be combined, like W=12, W=123.  It was added by commit a6de553
("kbuild: Allow to combine multiple W= levels").

From the log of commit 8654cb8 ("dtc: update warning settings
for new bus and node/property name checks"), I assume:

 - unit_address_vs_reg, simple_bus_reg, etc. belong to level 1
 - node_name_chars_strict, property_name_chars_strict belong to level 2

However, the level 1 warnings are displayed by any argument to W=.
On the other hand, the level 2 warnings are displayed by W=2, but
not by W=12, or W=123.

Use $(findstring ...) like scripts/Makefile.extrawarn.

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
  • Loading branch information
masahir0y committed Jan 25, 2018
1 parent 321cb03 commit f759625
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/Makefile.lib
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \
DTC ?= $(objtree)/scripts/dtc/dtc

# Disable noisy checks by default
ifeq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),)
ifeq ($(findstring 1,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
DTC_FLAGS += -Wno-unit_address_vs_reg \
-Wno-simple_bus_reg \
-Wno-unit_address_format \
Expand All @@ -273,7 +273,7 @@ DTC_FLAGS += -Wno-unit_address_vs_reg \
-Wno-pci_device_reg
endif

ifeq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),2)
ifneq ($(findstring 2,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
DTC_FLAGS += -Wnode_name_chars_strict \
-Wproperty_name_chars_strict
endif
Expand Down

0 comments on commit f759625

Please sign in to comment.