riscv: sbi.h:150:1: error: no return statement in function returning non-void [-Werror=return-type]

Naresh Kamboju naresh.kamboju at linaro.org
Mon Feb 22 12:47:46 EST 2021


Following riscv tiny and allnoconfig build failed on linux next 20210222 tag
  - riscv (tinyconfig) with gcc-8, gcc-9 and gcc-10
  - riscv (allnoconfig) with gcc-8, gcc-9 and gcc-10

make --silent --keep-going --jobs=8
O=/home/tuxbuild/.cache/tuxmake/builds/1/tmp ARCH=riscv
CROSS_COMPILE=riscv64-linux-gnu- 'CC=sccache riscv64-linux-gnu-gcc'
'HOSTCC=sccache gcc'
In file included from arch/riscv/kernel/setup.c:29:
arch/riscv/include/asm/sbi.h: In function 'sbi_remote_fence_i':
arch/riscv/include/asm/sbi.h:150:1: error: no return statement in
function returning non-void [-Werror=return-type]
  150 | static inline int sbi_remote_fence_i(const unsigned long *hart_mask) {}
      | ^~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:287: arch/riscv/kernel/setup.o] Error 1

Reported-by: Naresh Kamboju <naresh.kamboju at linaro.org>

step to reproduce:
------------------
# TuxMake is a command line tool and Python library that provides
# portable and repeatable Linux kernel builds across a variety of
# architectures, toolchains, kernel configurations, and make targets.
#
# TuxMake supports the concept of runtimes.
# See https://docs.tuxmake.org/runtimes/, for that to work it requires
# that you install podman or docker on your system.
#
# To install tuxmake on your system globally:
# sudo pip3 install -U tuxmake
#
# See https://docs.tuxmake.org/ for complete documentation.


tuxmake --runtime podman --target-arch riscv --toolchain gcc-9
--kconfig tinyconfig

build log,
https://builds.tuxbuild.com/1opbLmoztDBhgUOMidDILjVsQys/

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



More information about the linux-riscv mailing list