diff mbox series

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

Message ID 20240628161450.2541367-2-leitao@debian.org
State Superseded
Headers show
Series crypto: caam: Unembed net_dev | expand

Commit Message

Breno Leitao June 28, 2024, 4:14 p.m. UTC
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(-)

Comments

kernel test robot July 1, 2024, 5:48 a.m. UTC | #1
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
Jakub Kicinski July 1, 2024, 8:55 p.m. UTC | #2
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.
diff mbox series

Patch

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