Subject: Re: [PATCH net-next v2 1/3] crypto: caam: Make CRYPTO_DEV_FSL_CAAM dependent of COMPILE_TEST

From: Breno Leitao <[email-masked]>
Date: Tue, 2 Jul 2024 10:53:54 -0700

On Mon, Jul 01, 2024 at 01:48:21PM +0800, kernel test robot wrote:

> reproduce:
>         git clone https://github.com/intel/lkp-tests.git ~/lkp-tests
>         # apt-get install sparse
>         # sparse version: v0.6.4-66-g0196afe1
>         # https://github.com/intel-lab-lkp/linux/commit/ca1603af1770827216f5f67a91f6f13fbb05a050
>         git remote add linux-review https://github.com/intel-lab-lkp/linux
>         git fetch --no-tags linux-review Breno-Leitao/crypto-caam-Make-CRYPTO_DEV_FSL_CAAM-dependent-of-COMPILE_TEST/20240630-073726
>         git checkout ca1603af1770827216f5f67a91f6f13fbb05a050
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-13.2.0 ~/lkp-tests/kbuild/make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__ -fmax-errors=unlimited -fmax-warnings=unlimited' O=build_dir ARCH=m68k olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-13.2.0 ~/lkp-tests/kbuild/make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__ -fmax-errors=unlimited -fmax-warnings=unlimited' O=build_dir ARCH=m68k SHELL=/bin/bash

Thanks, this seems a valid error, but, I am unfortunately not able to
reproduce it:

	#  COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-13.2.0 ~/lkp-tests/kbuild/make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__-fmax-errors=unlimited -fmax-warnings=unlimited' O=build_dir ARCH=m68k SHELL=/bin/bash
	Compiler will be installed in /home/leit/0day
	PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/bin/:/home/leit/.cargo/bin:/usr/share/Modules/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/usr/facebook/ops/scripts:/usr/facebook/scripts:/usr/facebook/ops/scripts:/usr/facebook/scripts:/usr/facebook/scripts:/usr/facebook/scripts/db:/usr/facebook/ops/scripts:/usr/facebook/scripts:/usr/facebook/scripts:/usr/facebook/scripts/db:/usr/local/sbin:/usr/sbin:/sbin:/var/www/scripts/bin:/home/leit/.yarn/bin:/home/leit/bin:/usr/facebook/ops/scripts:/usr/facebook/scripts:/usr/lib/cargo/bin:/home/leit/bin:/home/leit/.local/bin:/home/leit/bin:~/Devel/virtme:/home/leit/bin/virtme:/home/leit/bin/twtf:/home/leit/Devel/git-fuzzy/bin:/home/leit/bin/kernel:/home/leit/bin/git:/home/leit/bin/iterm:/usr/facebook/ops/scripts:/usr/facebook/scripts:/usr/local/sbin:/usr/sbin:/sbin:/var/www/scripts/bin:/home/leit/.yarn/bin
	make --keep-going CROSS_COMPILE=/home/leit/0day/gcc-13.2.0-nolibc/m68k-linux/bin/m68k-linux- --jobs=332 KCFLAGS= -Wtautological-compare -Wno-error=return-type -Wreturn-type -Wcast-function-type -funsigned-char -Wundef -fstrict-flex-arrays=3 -Wformat-overflow -Wformat-truncation -Wrestrict -Wenum-conversion C=1 CF=-fdiagnostic-prefix -D__CHECK_ENDIAN__-fmax-errors=unlimited -fmax-warnings=unlimited O=build_dir ARCH=m68k SHELL=/bin/bash
	make[1]: Entering directory '/home/leit/Devel/upstream/build_dir'
	  GEN     Makefile
	  CALL    ../scripts/checksyscalls.sh
	  CC      drivers/crypto/caam/error.o
	  CC      drivers/crypto/caam/ctrl.o
	  CC      drivers/crypto/caam/debugfs.o
	  CC      drivers/crypto/caam/jr.o
	  CC      drivers/crypto/caam/key_gen.o
	  CC      drivers/crypto/caam/caamalg.o
	  CC      drivers/crypto/caam/caamrng.o
	  CC      drivers/crypto/caam/caampkc.o
	  CC      drivers/crypto/caam/pkc_desc.o
	  CC      drivers/crypto/caam/caamalg_desc.o
	  CHECK   ../drivers/crypto/caam/debugfs.c
	command-line: note: in included file:
	builtin:1:25: sparse: warning: no whitespace before object-like macro body
	  CHECK   ../drivers/crypto/caam/error.c
	command-line: note: in included file:
	builtin:1:25: sparse: warning: no whitespace before object-like macro body
	  CHECK   ../drivers/crypto/caam/key_gen.c
	command-line: note: in included file:
	builtin:1:25: sparse: warning: no whitespace before object-like macro body
	  CHECK   ../drivers/crypto/caam/caamrng.c
	command-line: note: in included file:
	builtin:1:25: sparse: warning: no whitespace before object-like macro body
	  CHECK   ../drivers/crypto/caam/jr.c
	  CHECK   ../drivers/crypto/caam/pkc_desc.c
	command-line: note: in included file:
	builtin:1:25: sparse: warning: no whitespace before object-like macro body
	command-line: note: in included file:
	builtin:1:25: sparse: warning: no whitespace before object-like macro body
	  CHECK   ../drivers/crypto/caam/ctrl.c
	command-line: note: in included file:
	builtin:1:25: sparse: warning: no whitespace before object-like macro body
	  CHECK   ../drivers/crypto/caam/caampkc.c
	command-line: note: in included file:
	builtin:1:25: sparse: warning: no whitespace before object-like macro body
	  CHECK   ../drivers/crypto/caam/caamalg_desc.c
	command-line: note: in included file:
	builtin:1:25: sparse: warning: no whitespace before object-like macro body
	  CHECK   ../drivers/crypto/caam/caamalg.c
	command-line: note: in included file:
	builtin:1:25: sparse: warning: no whitespace before object-like macro body
	  AR      drivers/crypto/caam/built-in.a
	  AR      drivers/crypto/built-in.a
	  AR      drivers/built-in.a
	  AR      built-in.a
	  AR      vmlinux.a
	  LD      vmlinux.o
	  OBJCOPY modules.builtin.modinfo
	  GEN     modules.builtin
	  MODPOST vmlinux.symvers
	  UPD     include/generated/utsversion.h
	  CC      init/version-timestamp.o
	  CHECK   ../init/version-timestamp.c
	command-line: note: in included file:
	builtin:1:25: sparse: warning: no whitespace before object-like macro body
	  LD      .tmp_vmlinux.kallsyms1
	  NM      .tmp_vmlinux.kallsyms1.syms
	  KSYMS   .tmp_vmlinux.kallsyms1.S
	  AS      .tmp_vmlinux.kallsyms1.o
	  LD      .tmp_vmlinux.kallsyms2
	  NM      .tmp_vmlinux.kallsyms2.syms
	  KSYMS   .tmp_vmlinux.kallsyms2.S
	  AS      .tmp_vmlinux.kallsyms2.o
	  LD      vmlinux
	  NM      System.map
	cp vmlinux vmlinux.tmp
	/home/leit/0day/gcc-13.2.0-nolibc/m68k-linux/bin/m68k-linux-strip vmlinux.tmp
	gzip -9c vmlinux.tmp >vmlinux.gz
	rm vmlinux.tmp
	make[1]: Leaving directory '/home/leit/Devel/upstream/build_dir'

# The repo I am building:

	# git show --oneline
	ca1603af1770 (HEAD) crypto: caam: Make CRYPTO_DEV_FSL_CAAM dependent of COMPILE_TEST
	diff --git a/drivers/crypto/caam/Kconfig b/drivers/crypto/caam/Kconfig
	index c631f99e415f..05210a0edb8a 100644
	--- a/drivers/crypto/caam/Kconfig
	+++ b/drivers/crypto/caam/Kconfig
	@@ -10,7 +10,7 @@ config CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC

	 config CRYPTO_DEV_FSL_CAAM
		tristate "Freescale CAAM-Multicore platform driver backend"
	-       depends on FSL_SOC || ARCH_MXC || ARCH_LAYERSCAPE
	+       depends on FSL_SOC || ARCH_MXC || ARCH_LAYERSCAPE || COMPILE_TEST
		select SOC_BUS
		select CRYPTO_DEV_FSL_CAAM_COMMON
		imply FSL_MC_BUS

My version of tools:

	# sparse --version
	v0.6.4-66-g0196afe1

	# cd ~/lkp-tests; git show --stat
	commit 22f5cf2c860a5604f182f966b1f105ce1c0becb7 (HEAD -> master, origin/master, origin/HEAD)