Skip to content

Commit

Permalink
drm/i915: Enable -Wuninitialized
Browse files Browse the repository at this point in the history
-Wunintialized was disabled in commit c562746 ("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: ClangBuiltLinux/linux#220
Link: ClangBuiltLinux/linux#415
Link: ClangBuiltLinux/linux#499
Link: llvm/llvm-project@2e04039
Link: llvm/llvm-project@c667cdc
Fixes: c562746 ("drm/i915: Disable -Wuninitialized")
References: 2ea4a7b ("drm/i915/gt: Avoid uninitialized use of rpcurupei in frequency_show")
References: 2034c21 ("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>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20210216212953.24458-1-nathan@kernel.org
(cherry picked from commit b242318)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
  • Loading branch information
nathanchance authored and ranjan-dutta committed Mar 12, 2021
1 parent 6474e2f commit 10d1ef0
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/Makefile
Expand Up @@ -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

Expand Down

0 comments on commit 10d1ef0

Please sign in to comment.