Fix below sparse warning: CHECK drivers/iommu/amd/iommu.c drivers/iommu/amd/iommu.c:73:24: warning: symbol 'amd_iommu_ops' was not declared. Should it be static?
Also we are going to introduce v2 page table which has different pgsize_bitmaps. Hence remove 'const' qualifier. Signed-off-by: Vasant Hegde <vasant.he...@amd.com> --- drivers/iommu/amd/init.c | 2 +- drivers/iommu/amd/iommu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 8483d98a1775..453afce7d478 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -96,7 +96,7 @@ * out of it. */ -extern const struct iommu_ops amd_iommu_ops; +extern struct iommu_ops amd_iommu_ops; /* * structure describing one IOMMU in the ACPI table. Typically followed by one diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index b558e8c30613..deb546266d42 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -70,7 +70,7 @@ LIST_HEAD(acpihid_map); * Domain for untranslated devices - only allocated * if iommu=pt passed on kernel cmd line. */ -const struct iommu_ops amd_iommu_ops; +struct iommu_ops amd_iommu_ops; static ATOMIC_NOTIFIER_HEAD(ppr_notifier); int amd_iommu_max_glx_val = -1; @@ -2374,7 +2374,7 @@ static int amd_iommu_def_domain_type(struct device *dev) return 0; } -const struct iommu_ops amd_iommu_ops = { +struct iommu_ops amd_iommu_ops = { .capable = amd_iommu_capable, .domain_alloc = amd_iommu_domain_alloc, .probe_device = amd_iommu_probe_device, -- 2.27.0 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu