reproduce: git clone https://github.com/intel/lkp-tests.git ~/lkp-tests # apt-get install sparse # sparse version: v0.6.4-66-g0196afe1 # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=163e76cc6ef43b7a5e9b6e245a6d6667c9d9b4a7 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 163e76cc6ef43b7a5e9b6e245a6d6667c9d9b4a7 # save the config file mkdir build_dir && cp config build_dir/.config ~/lkp-tests/kbuild/make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__ -fmax-errors=unlimited -fmax-warnings=unlimited' O=build_dir ARCH=riscv olddefconfig ~/lkp-tests/kbuild/make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__ -fmax-errors=unlimited -fmax-warnings=unlimited' O=build_dir ARCH=riscv SHELL=/bin/bash arch/riscv/kernel/