drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c:350:34: error: variable 'wq' is uninitialized when used within its own initialization [-Werror,-Wuninitialized]
DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
^~
./include/linux/wait.h:74:63: note: expanded from macro 'DECLARE_WAIT_QUEUE_HEAD_ONSTACK'
struct wait_queue_head name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name)
~~~~ ^~~~
./include/linux/wait.h:72:33: note: expanded from macro '__WAIT_QUEUE_HEAD_INIT_ONSTACK'
({ init_waitqueue_head(&name); name; })
^~~~
1 error generated.
allyesconfig on x86_64
Ah I see what's going on here.
-Wuninitialized is disabled in scripts/Makefile.extrawarn when W= is not provided to make but drivers/gpu/drm/i915/Makefile calls -Wall after, which re-enables it.
/usr/bin/ccache clang -Wp,-MD,drivers/gpu/drm/i915/.intel_uc.o.d -nostdinc -isystem /home/nathan/toolchains/clang-8.x/lib/clang/8.0.344477/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Qunused-arguments -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -no-integrated-as -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -mno-80387 -mstack-alignment=8 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mretpoline-external-thunk -DRETPOLINE -Wa,arch/x86/kernel/macros.s -D__BPF_TRACING__ -fno-delete-null-pointer-checks -O2 -fstack-protector-strong -Wno-format-invalid-specifier -Wno-gnu -Wno-address-of-packed-member -Wno-tautological-compare -Wno-switch -mno-global-merge -Wno-unused-const-variable -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fno-stack-check -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Wno-constant-conversion -Wno-empty-body -Wno-initializer-overrides -Wno-unused-value -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-uninitialized -Werror -Wall -Wextra -Wno-unused-parameter -Wno-type-limits -Wno-missing-field-initializers -Wno-implicit-fallthrough -Wno-sign-compare -Wno-sometimes-uninitialized -Wno-initializer-overrides -DCONFIG_AS_MOVNTDQA -Idrivers/gpu/drm/i915 -Idrivers/gpu/drm/i915/gvt -fsanitize=kernel-address -mllvm -asan-mapping-offset=0xdffffc0000000000 -mllvm -asan-globals=1 -mllvm -asan-instrumentation-with-call-threshold=0 -mllvm -asan-stack=1 -mllvm -asan-use-after-scope=1 --param asan-instrument-allocas=1 -fsanitize-coverage=trace-pc -fsanitize-coverage=trace-cmp -DKBUILD_BASENAME='"intel_uc"' -DKBUILD_MODNAME='"i915"' -c -o drivers/gpu/drm/i915/.tmp_intel_uc.o drivers/gpu/drm/i915/intel_uc.c
Not sure if the warning should be fixed or hidden again.
Probably hidden again. I think I had sent the i915 folks a patch like this before (about -Wall re-enabling things that were disabled).
Will send it shortly then, thanks!
Patch sent: https://lore.kernel.org/lkml/[email protected]/
@nathanchance can you please send a v2 disabling the warning for the whole subdir?
The patch was so nice, I reviewed it twice! 馃
Merged into mainline: https://git.kernel.org/torvalds/c/c5627461490e4b913e8747d3b06541e5264a50d7