Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: qat - move adf_cfg_services

The file adf_cfg_services.h cannot be included in header files since it
instantiates the structure adf_cfg_services. Move that structure to its
own file and export the symbol.

This does not introduce any functional change.

Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Damian Muszynski <damian.muszynski@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Giovanni Cabiddu and committed by
Herbert Xu
03c76e8e 71fed09b

+24 -13
+1 -1
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c
··· 4 4 #include <adf_accel_devices.h> 5 5 #include <adf_admin.h> 6 6 #include <adf_cfg.h> 7 + #include <adf_cfg_services.h> 7 8 #include <adf_clock.h> 8 9 #include <adf_common_drv.h> 9 10 #include <adf_gen4_dc.h> ··· 14 13 #include "adf_gen4_ras.h" 15 14 #include <adf_gen4_timer.h> 16 15 #include "adf_4xxx_hw_data.h" 17 - #include "adf_cfg_services.h" 18 16 #include "icp_qat_hw.h" 19 17 20 18 #define ADF_AE_GROUP_0 GENMASK(3, 0)
+1
drivers/crypto/intel/qat/qat_common/Makefile
··· 4 4 intel_qat-objs := adf_cfg.o \ 5 5 adf_isr.o \ 6 6 adf_ctl_drv.o \ 7 + adf_cfg_services.o \ 7 8 adf_dev_mgr.o \ 8 9 adf_init.o \ 9 10 adf_accel_engine.o \
+20
drivers/crypto/intel/qat/qat_common/adf_cfg_services.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* Copyright(c) 2023 Intel Corporation */ 3 + 4 + #include <linux/export.h> 5 + #include "adf_cfg_services.h" 6 + #include "adf_cfg_strings.h" 7 + 8 + const char *const adf_cfg_services[] = { 9 + [SVC_CY] = ADF_CFG_CY, 10 + [SVC_CY2] = ADF_CFG_ASYM_SYM, 11 + [SVC_DC] = ADF_CFG_DC, 12 + [SVC_DCC] = ADF_CFG_DCC, 13 + [SVC_SYM] = ADF_CFG_SYM, 14 + [SVC_ASYM] = ADF_CFG_ASYM, 15 + [SVC_DC_ASYM] = ADF_CFG_DC_ASYM, 16 + [SVC_ASYM_DC] = ADF_CFG_ASYM_DC, 17 + [SVC_DC_SYM] = ADF_CFG_DC_SYM, 18 + [SVC_SYM_DC] = ADF_CFG_SYM_DC, 19 + }; 20 + EXPORT_SYMBOL_GPL(adf_cfg_services);
+2 -12
drivers/crypto/intel/qat/qat_common/adf_cfg_services.h
··· 16 16 SVC_ASYM_DC, 17 17 SVC_DC_SYM, 18 18 SVC_SYM_DC, 19 + SVC_COUNT 19 20 }; 20 21 21 - static const char *const adf_cfg_services[] = { 22 - [SVC_CY] = ADF_CFG_CY, 23 - [SVC_CY2] = ADF_CFG_ASYM_SYM, 24 - [SVC_DC] = ADF_CFG_DC, 25 - [SVC_DCC] = ADF_CFG_DCC, 26 - [SVC_SYM] = ADF_CFG_SYM, 27 - [SVC_ASYM] = ADF_CFG_ASYM, 28 - [SVC_DC_ASYM] = ADF_CFG_DC_ASYM, 29 - [SVC_ASYM_DC] = ADF_CFG_ASYM_DC, 30 - [SVC_DC_SYM] = ADF_CFG_DC_SYM, 31 - [SVC_SYM_DC] = ADF_CFG_SYM_DC, 32 - }; 22 + extern const char *const adf_cfg_services[SVC_COUNT]; 33 23 34 24 #endif