Following clang-17 build failures noticed on Linux next-20230810
Build log: ------- make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- 'HOSTCC=sccache clang' 'CC=sccache clang' LLVM=1 LLVM_IAS=1 drivers/video/backlight/lp855x_bl.c:252:11: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] 252 | else if (lp->mode == REGISTER_BASED) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/video/backlight/lp855x_bl.c:256:9: note: uninitialized use occurs here 256 | return ret; | ^~~ drivers/video/backlight/lp855x_bl.c:252:7: note: remove the 'if' if its condition is always true 252 | else if (lp->mode == REGISTER_BASED) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 253 | ret = lp855x_write_byte(lp, lp->cfg->reg_brightness, drivers/video/backlight/lp855x_bl.c:244:9: note: initialize the variable 'ret' to silence this warning 244 | int ret; | ^ | = 0 1 warning generated. fs/btrfs/extent_io.c:232:16: warning: variable 'pages_processed' set but not used [-Wunused-but-set-variable] 232 | unsigned long pages_processed = 0; | ^ 1 warning generated. drivers/gpu/drm/nouveau/nouveau_exec.c:114:4: error: cannot jump from this indirect goto statement to one of its possible targets 114 | drm_exec_retry_on_contention(exec); | ^ include/drm/drm_exec.h:96:4: note: expanded from macro 'drm_exec_retry_on_contention' 96 | goto *__drm_exec_retry_ptr; \ | ^ drivers/gpu/drm/nouveau/nouveau_exec.c:106:2: note: possible target of indirect goto statement 106 | drm_exec_until_all_locked(exec) { | ^ include/drm/drm_exec.h:79:33: note: expanded from macro 'drm_exec_until_all_locked' 79 | __label__ __drm_exec_retry; \ | ^ drivers/gpu/drm/nouveau/nouveau_exec.c:106:2: note: jump enters a statement expression include/drm/drm_exec.h:78:35: note: expanded from macro 'drm_exec_until_all_locked' 78 | for (void *__drm_exec_retry_ptr; ({ \ | ^ 1 error generated. make[7]: *** [scripts/Makefile.build:243: drivers/gpu/drm/nouveau/nouveau_exec.o] Error 1 drivers/gpu/drm/nouveau/nouveau_uvmm.c:1305:5: error: cannot jump from this indirect goto statement to one of its possible targets 1305 | drm_exec_retry_on_contention(exec); | ^ include/drm/drm_exec.h:96:4: note: expanded from macro 'drm_exec_retry_on_contention' 96 | goto *__drm_exec_retry_ptr; \ | ^ drivers/gpu/drm/nouveau/nouveau_uvmm.c:1291:2: note: possible target of indirect goto statement 1291 | drm_exec_until_all_locked(exec) { | ^ include/drm/drm_exec.h:79:33: note: expanded from macro 'drm_exec_until_all_locked' 79 | __label__ __drm_exec_retry; \ | ^ drivers/gpu/drm/nouveau/nouveau_uvmm.c:1291:2: note: jump enters a statement expression include/drm/drm_exec.h:78:35: note: expanded from macro 'drm_exec_until_all_locked' 78 | for (void *__drm_exec_retry_ptr; ({ \ | ^ 1 error generated. make[7]: *** [scripts/Makefile.build:243: drivers/gpu/drm/nouveau/nouveau_uvmm.o] Error 1
Reported-by: Linux Kernel Functional Testing lkft@linaro.org
Links: - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230809/tes... - https://storage.tuxsuite.com/public/linaro/lkft/builds/2TjhxEjDSquzvxYvC8eD8...
Steps to reproduce: tuxmake --runtime podman --target-arch arm64 --toolchain clang-17 --kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2TjhxEjDSquzvxYvC8eD8... LLVM=1 LLVM_IAS=1 https://storage.tuxsuite.com/public/linaro/lkft/builds/2TjhxEjDSquzvxYvC8eD8...
-- Linaro LKFT https://lkft.linaro.org
Hi Naresh,
On Thu, Aug 10, 2023 at 02:11:41PM +0530, Naresh Kamboju wrote:
drivers/gpu/drm/nouveau/nouveau_exec.c:114:4: error: cannot jump from this indirect goto statement to one of its possible targets 114 | drm_exec_retry_on_contention(exec); | ^ include/drm/drm_exec.h:96:4: note: expanded from macro 'drm_exec_retry_on_contention' 96 | goto *__drm_exec_retry_ptr; \ | ^ drivers/gpu/drm/nouveau/nouveau_exec.c:106:2: note: possible target of indirect goto statement 106 | drm_exec_until_all_locked(exec) { | ^ include/drm/drm_exec.h:79:33: note: expanded from macro 'drm_exec_until_all_locked' 79 | __label__ __drm_exec_retry; \ | ^ drivers/gpu/drm/nouveau/nouveau_exec.c:106:2: note: jump enters a statement expression include/drm/drm_exec.h:78:35: note: expanded from macro 'drm_exec_until_all_locked' 78 | for (void *__drm_exec_retry_ptr; ({ \ | ^ 1 error generated.
Thanks for the report. This is now fixed in drm-misc-next, so it should be resolved in the next -next:
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=616bceae250d0bab7ab2cbc...
Cheers, Nathan