All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] drm/i915: Disable some extra clang warnings
@ 2018-05-01 18:24 Matthias Kaehlcke
  2018-05-01 18:31 ` ✗ Fi.CI.SPARSE: warning for drm/i915: Disable some extra clang warnings (rev3) Patchwork
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Matthias Kaehlcke @ 2018-05-01 18:24 UTC (permalink / raw)
  To: Chris Wilson, Jani Nikula, Rodrigo Vivi, David Airlie
  Cc: intel-gfx, dri-devel, linux-kernel, Guenter Roeck, Matthias Kaehlcke

Commit 39bf4de89ff7 ("drm/i915: Add -Wall -Wextra to our build, set
warnings to full") enabled extra warnings for i915 to spot possible
bugs in new code, and then disabled a subset of these warnings to keep
the current code building without warnings (with gcc). Enabling the
extra warnings also enabled some additional clang-only warnings, as a
result building i915 with clang currently is extremely noisy. For now
also disable the clang warnings sign-compare, sometimes-uninitialized,
unneeded-internal-declaration and initializer-overrides. If desired
they can be re-enabled after the code has been fixed.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in v3:
- don't disable -Wunneeded-internal-declaration , the only occurrence
  can be fixed in the code
- removed 'Fixes' tag, since backporting is not necessary

 drivers/gpu/drm/i915/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 9bee52a949a9..dfe01452c8d1 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -18,6 +18,10 @@ 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, unused-but-set-variable)
+# clang warnings
+subdir-ccflags-y += $(call cc-disable-warning, sign-compare)
+subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized)
+subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
 subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
 
 # Fine grained warnings disable
-- 
2.17.0.441.gb46fe60e1d-goog

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-05-02 15:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-01 18:24 [PATCH v3] drm/i915: Disable some extra clang warnings Matthias Kaehlcke
2018-05-01 18:31 ` ✗ Fi.CI.SPARSE: warning for drm/i915: Disable some extra clang warnings (rev3) Patchwork
2018-05-01 18:47 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-01 19:41 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-05-02  9:46 ` [PATCH v3] drm/i915: Disable some extra clang warnings Chris Wilson
2018-05-02  9:46   ` Chris Wilson
2018-05-02 15:39   ` Chris Wilson
2018-05-02 15:39     ` Chris Wilson
2018-05-02 11:41 ` ✗ Fi.CI.SPARSE: warning for drm/i915: Disable some extra clang warnings (rev3) Patchwork
2018-05-02 11:57 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-02 15:07 ` ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.