[PATCH 29/35] drm/i915: Ignore frequent clang warnings

Chris Wilson chris at chris-wilson.co.uk
Sat Dec 9 00:45:24 UTC 2017


In order to reduce the flood of common errors reported by clang, add
them to the exclusion list in the Makefile. The plan is to taken them
slowly, most of the -Wsign-compare fixes should be trivial, and may even
find a bug or two!

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
---
 drivers/gpu/drm/i915/Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 61d083ad2e33..431f20e388a5 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -17,11 +17,16 @@ subdir-ccflags-y += $(call cc-disable-warning, unused-parameter)
 subdir-ccflags-y += $(call cc-disable-warning, type-limits)
 subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)
 subdir-ccflags-y += $(call cc-disable-warning, implicit-fallthrough)
+subdir-ccflags-y += $(call cc-disable-warning, sign-compare)
+subdir-ccflags-y += $(call cc-disable-warning, ignored-attributes)
 subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
 
 # Fine grained warnings disable
-CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init)
-CFLAGS_intel_fbdev.o = $(call cc-disable-warning, override-init)
+allow_init_inheritance := \
+	$(call cc-disable-warning, override-init) \
+	$(call cc-disable-warning, initializer-overrides)
+CFLAGS_i915_pci.o = $(allow_init_inheritance)
+CFLAGS_intel_fbdev.o = $(allow_init_inheritance)
 
 subdir-ccflags-y += \
 	$(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
-- 
2.15.1



More information about the Intel-gfx-trybot mailing list