linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Enable -Wuninitialized
@ 2021-02-16 21:29 Nathan Chancellor
  2021-02-17 13:56 ` Chris Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2021-02-16 21:29 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi
  Cc: Nick Desaulniers, intel-gfx, dri-devel, linux-kernel,
	clang-built-linux, Nathan Chancellor, Arnd Bergmann

-Wunintialized was disabled in commit c5627461490e ("drm/i915: Disable
-Wuninitialized") because there were two warnings that were false
positives. The first was due to DECLARE_WAIT_QUEUE_HEAD_ONSTACK, which
was fixed in LLVM 9.0.0. The second was in busywait_stop, which was
fixed in LLVM 10.0.0 (issue 415). The kernel's minimum version for LLVM
is 10.0.1 so this warning can be safely enabled, where it has already
caught a couple bugs.

Link: https://github.com/ClangBuiltLinux/linux/issues/220
Link: https://github.com/ClangBuiltLinux/linux/issues/415
Link: https://github.com/ClangBuiltLinux/linux/issues/499
Link: https://github.com/llvm/llvm-project/commit/2e040398f8d691cc378c1abb098824ff49f3f28f
Link: https://github.com/llvm/llvm-project/commit/c667cdc850c2aa821ffeedbc08c24bc985c59edd
Fixes: c5627461490e ("drm/i915: Disable -Wuninitialized")
References: 2ea4a7ba9bf6 ("drm/i915/gt: Avoid uninitialized use of rpcurupei in frequency_show")
References: 2034c2129bc4 ("drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 drivers/gpu/drm/i915/Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 6d9e81ea67f4..60b60204004f 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -21,7 +21,6 @@ subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
 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-y += $(call cc-disable-warning, uninitialized)
 subdir-ccflags-y += $(call cc-disable-warning, frame-address)
 subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
 

base-commit: f40ddce88593482919761f74910f42f4b84c004b
-- 
2.30.1


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

* Re: [PATCH] drm/i915: Enable -Wuninitialized
  2021-02-16 21:29 [PATCH] drm/i915: Enable -Wuninitialized Nathan Chancellor
@ 2021-02-17 13:56 ` Chris Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Wilson @ 2021-02-17 13:56 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Nathan Chancellor, Rodrigo Vivi
  Cc: Arnd Bergmann, intel-gfx, Nick Desaulniers, linux-kernel,
	dri-devel, Nathan Chancellor, clang-built-linux

Quoting Nathan Chancellor (2021-02-16 21:29:54)
> -Wunintialized was disabled in commit c5627461490e ("drm/i915: Disable
> -Wuninitialized") because there were two warnings that were false
> positives. The first was due to DECLARE_WAIT_QUEUE_HEAD_ONSTACK, which
> was fixed in LLVM 9.0.0. The second was in busywait_stop, which was
> fixed in LLVM 10.0.0 (issue 415). The kernel's minimum version for LLVM
> is 10.0.1 so this warning can be safely enabled, where it has already
> caught a couple bugs.
> 
> Link: https://github.com/ClangBuiltLinux/linux/issues/220
> Link: https://github.com/ClangBuiltLinux/linux/issues/415
> Link: https://github.com/ClangBuiltLinux/linux/issues/499
> Link: https://github.com/llvm/llvm-project/commit/2e040398f8d691cc378c1abb098824ff49f3f28f
> Link: https://github.com/llvm/llvm-project/commit/c667cdc850c2aa821ffeedbc08c24bc985c59edd
> Fixes: c5627461490e ("drm/i915: Disable -Wuninitialized")
> References: 2ea4a7ba9bf6 ("drm/i915/gt: Avoid uninitialized use of rpcurupei in frequency_show")
> References: 2034c2129bc4 ("drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state")
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

make CC=clang-11 now compiles cleanly for me as well,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

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

end of thread, other threads:[~2021-02-17 14:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-16 21:29 [PATCH] drm/i915: Enable -Wuninitialized Nathan Chancellor
2021-02-17 13:56 ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).