kernel/sched/core.c:961:15: error: incompatible pointer to integer conversion passing 'typeof

From: Naresh Kamboju
Date: Wed Apr 03 2024 - 03:40:19 EST


The riscv clang-17 defconfig build failed due to following warnings / errors
on the Linux next-20240402.

Reported-by: Linux Kernel Functional Testing <lkft@xxxxxxxxxx>

riscv:
build:
* clang-17-lkftconfig - Failed
* rv32-clang-17-defconfig - Failed
* clang-17-tinyconfig - Failed
* rv32-clang-17-tinyconfig - Failed
* clang-17-defconfig - Failed
* clang-17-allnoconfig - Failed
* rv32-clang-17-allnoconfig - Failed

Build log:
-------
kernel/sched/core.c:961:15: error: incompatible pointer to integer
conversion passing 'typeof (*((__ai_ptr)))' (aka 'struct wake_q_node
*') to parameter of type 'uintptr_t' (aka 'unsigned long')
[-Wint-conversion]
961 | if (unlikely(cmpxchg_relaxed(&node->next, NULL, WAKE_Q_TAIL)))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Steps to reproduce:
---------
# tuxmake --runtime podman --target-arch riscv --toolchain clang-17
--kconfig defconfig LLVM=1 LLVM_IAS=1

Links:
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240402/testrun/23264917/suite/build/test/clang-17-defconfig/details/
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240402/testrun/23264917/suite/build/test/clang-17-defconfig/log

--
Linaro LKFT
https://lkft.linaro.org