summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-05-15 16:07:33 +0900
committerTom Rini <trini@konsulko.com>2017-05-15 13:00:27 -0400
commit50749d2ac30dd7af94d8c9ed64276f92d9d396f5 (patch)
tree228512dfbafc28f9ea3bd2206393839c3b28fe1a
parenteec342ab184fe2c0e0b244956b9bf92588863499 (diff)
kbuild: update DTC warning settings for bus and node/property name checks
Recent commits of DTC introduced new warnings checking PCI and simple buses, unit address formatting, and stricter node and property name checking. Disable the new DTC warnings by default. As before, warnings are enabled with W=*. The strict node and property name checks are a bit subjective, so they are only enabled for W=2. (This policy reflects the commit 8654cb8d0371 of Linux.) Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r--scripts/Makefile.extrawarn14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 7b2cffce520..90dc149df3d 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -58,9 +58,23 @@ endif
KBUILD_CFLAGS += $(warning)
+dtc-warning-2 += $(call dtc-option,-Wnode_name_chars_strict)
+dtc-warning-2 += $(call dtc-option,-Wproperty_name_chars_strict)
+
+dtc-warning := $(dtc-warning-$(findstring 1, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
+dtc-warning += $(dtc-warning-$(findstring 2, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
+dtc-warning += $(dtc-warning-$(findstring 3, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
+
+DTC_FLAGS += $(dtc-warning)
+
else
# Disable noisy checks by default
DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg)
+DTC_FLAGS += $(call dtc-option,-Wno-simple_bus_reg)
+DTC_FLAGS += $(call dtc-option,-Wno-unit_address_format)
+DTC_FLAGS += $(call dtc-option,-Wno-pci_bridge)
+DTC_FLAGS += $(call dtc-option,-Wno-pci_device_bus_num)
+DTC_FLAGS += $(call dtc-option,-Wno-pci_device_reg)
endif