Message ID | 20240628161450.2541367-2-leitao@debian.org (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Herbert Xu |
Headers | show |
Series | crypto: caam: Unembed net_dev | expand |
Hi Breno,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Breno-Leitao/crypto-caam-Make-CRYPTO_DEV_FSL_CAAM-dependent-of-COMPILE_TEST/20240630-073726
base: net-next/main
patch link: https://lore.kernel.org/r/20240628161450.2541367-2-leitao%40debian.org
patch subject: [PATCH net-next v2 1/3] crypto: caam: Make CRYPTO_DEV_FSL_CAAM dependent of COMPILE_TEST
config: m68k-randconfig-r131-20240701
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce:
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407011309.cpTuOGdg-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/crypto/caam/ctrl.c:83:34: warning: 'imx8m_machine_match' defined but not used [-Wunused-const-variable=]
83 | static const struct of_device_id imx8m_machine_match[] = {
| ^~~~~~~~~~~~~~~~~~~
vim +/imx8m_machine_match +83 drivers/crypto/caam/ctrl.c
281922a1d4f59b Kim Phillips 2012-06-22 82
271e3830377ab5 Pankaj Gupta 2023-05-12 @83 static const struct of_device_id imx8m_machine_match[] = {
271e3830377ab5 Pankaj Gupta 2023-05-12 84 { .compatible = "fsl,imx8mm", },
271e3830377ab5 Pankaj Gupta 2023-05-12 85 { .compatible = "fsl,imx8mn", },
271e3830377ab5 Pankaj Gupta 2023-05-12 86 { .compatible = "fsl,imx8mp", },
271e3830377ab5 Pankaj Gupta 2023-05-12 87 { .compatible = "fsl,imx8mq", },
271e3830377ab5 Pankaj Gupta 2023-05-12 88 { .compatible = "fsl,imx8ulp", },
271e3830377ab5 Pankaj Gupta 2023-05-12 89 { }
271e3830377ab5 Pankaj Gupta 2023-05-12 90 };
271e3830377ab5 Pankaj Gupta 2023-05-12 91
On Mon, 1 Jul 2024 13:48:21 +0800 kernel test robot wrote: > >> drivers/crypto/caam/ctrl.c:83:34: warning: 'imx8m_machine_match' defined but not used [-Wunused-const-variable=] > 83 | static const struct of_device_id imx8m_machine_match[] = { > | Reading 5762c20593b6b95 it seems like hiding the references in intentional. You gotta wrap this array in an ifdef for non-OF builds it seems.
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)
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
As most of the drivers that depend on ARCH_LAYERSCAPE, make CRYPTO_DEV_FSL_CAAM depend on COMPILE_TEST for compilation and testing. # grep -r depends.\*ARCH_LAYERSCAPE.\*COMPILE_TEST | wc -l 29 Signed-off-by: Breno Leitao <leitao@debian.org> --- drivers/crypto/caam/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)