Commit 40c1a0ae authored by leoliu-oc's avatar leoliu-oc Committed by LeoLiu-oc
Browse files

x86/cpu/zhaoxin: kx-40000: Apply the static modifier to some symbols

zhaoxin inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9RPB1


CVE: NA

-----------------

Fix the sparse warnings:

sparse warnings: (new ones prefixed by >>)
>> arch/x86/kernel/zhaoxin_kh40000.c:35:15: sparse: sparse: symbol
'zhaoxin_patch_code' was not declared. Should it be static?

>> arch/x86/kernel/zhaoxin_kh40000.c:322:26: sparse: sparse: symbol
'kh40000_dma_iommu_ops' was not declared. Should it be static?

Fixes: 4332dbb0 ("Add kh40000_direct_dma_ops for KH-40000 platform")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202405311319.BzJDMWBG-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202405311417.Uc6n3wMh-lkp@intel.com/


Signed-off-by: default avatarleoliu-oc <leoliu-oc@zhaoxin.com>
parent 11557c1a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ enum {

#define ZHAOXIN_PATCH_CODE_DEFAULT	ZHAOXIN_P2CW_NODE_CHECK

unsigned long zhaoxin_patch_code = ZHAOXIN_PATCH_CODE_DEFAULT;
static unsigned long zhaoxin_patch_code = ZHAOXIN_PATCH_CODE_DEFAULT;

static int __init zhaoxin_patch_code_setup(char *str)
{
@@ -322,7 +322,7 @@ static size_t kh40000_iommu_dma_opt_mapping_size(void)
	return iommu_dma_ops->opt_mapping_size();
}

const struct dma_map_ops kh40000_dma_iommu_ops = {
static const struct dma_map_ops kh40000_dma_iommu_ops = {
	.flags			= DMA_F_PCI_P2PDMA_SUPPORTED,
	.alloc			= kh40000_iommu_dma_alloc,
	.free			= kh40000_iommu_dma_free,