[openeuler:OLK-6.6 2331/2331] drivers/crypto/ccp/hygon/vpsp.c:64:1: sparse: sparse: symbol 'vpsp_cmd_ctx_table' was not declared. Should it be static?

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: e2c7f21ccac8f595f261a7971f6d6092d442c888 commit: 294caf049d134e08f0e70277ddb6a29698e9d96b [2331/2331] crypto: ccp: Use a workqueue to clean up the vpsp ringbuffer config: x86_64-randconfig-121-20250529 (https://download.01.org/0day-ci/archive/20250529/202505291807.LPmsH7Fj-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250529/202505291807.LPmsH7Fj-lkp@i...) 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/202505291807.LPmsH7Fj-lkp@intel.com/ sparse warnings: (new ones prefixed by >>)
drivers/crypto/ccp/hygon/vpsp.c:64:1: sparse: sparse: symbol 'vpsp_cmd_ctx_table' was not declared. Should it be static? drivers/crypto/ccp/hygon/vpsp.c:65:1: sparse: sparse: symbol 'table_rwlock' was not declared. Should it be static? drivers/crypto/ccp/hygon/vpsp.c:695:1: sparse: sparse: symbol 'vpsp_dev_rwlock' was not declared. Should it be static? drivers/crypto/ccp/hygon/vpsp.c:724:10: sparse: sparse: symbol 'allow_default_vid' was not declared. Should it be static? drivers/crypto/ccp/hygon/vpsp.c:725:6: sparse: sparse: symbol 'vpsp_set_default_vid_permission' was not declared. Should it be static?
vim +/vpsp_cmd_ctx_table +64 drivers/crypto/ccp/hygon/vpsp.c 33 34 /* 35 * The file mainly implements the base execution logic of virtual PSP in kernel mode, 36 * which mainly includes: 37 * (1) Preprocess the guest data in the host kernel 38 * (2) The command that has been converted will interact with the channel of the 39 * psp through the driver and try to obtain the execution result 40 * (3) The executed command data is recovered, and then returned to the VM 41 * 42 * The primary implementation logic of virtual PSP in kernel mode 43 * call trace: 44 * guest command(vmmcall, KVM_HC_PSP_COPY_FORWARD_OP) 45 * | 46 * kvm_pv_psp_copy_op----> | -> kvm_pv_psp_cmd_pre_op 47 * | 48 * | -> vpsp_try_do_cmd/vpsp_try_get_result 49 * | |<=> psp device driver 50 * | 51 * | 52 * |-> kvm_pv_psp_cmd_post_op 53 * 54 * guest command(vmmcall, KVM_HC_PSP_FORWARD_OP) 55 * | 56 * kvm_pv_psp_forward_op-> |-> vpsp_try_do_cmd/vpsp_try_get_result 57 * |<=> psp device driver 58 */ 59 60 /** 61 * used to locate the command context, 62 * when the guest enters the host via vmmcall 63 */
64 DEFINE_HASHTABLE(vpsp_cmd_ctx_table, 11); 65 DEFINE_RWLOCK(table_rwlock); 66 bool vpsp_in_ringbuffer_mode; 67 static struct vpsp_cmd_ctx *vpsp_cmd_ctx_array[CSV_COMMAND_PRIORITY_NUM] 68 [CSV_RING_BUFFER_SIZE / CSV_RING_BUFFER_ESIZE]; 69
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot