]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iommu/amd: Set variable amd_dirty_ops to static
authorKunwu Chan <chentao@kylinos.cn>
Mon, 20 Nov 2023 09:53:42 +0000 (17:53 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 27 Nov 2023 09:59:23 +0000 (10:59 +0100)
Fix the followng warning:
drivers/iommu/amd/iommu.c:67:30: warning: symbol
 'amd_dirty_ops' was not declared. Should it be static?

This variable is only used in its defining file, so it should be static.

Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20231120095342.1102999-1-chentao@kylinos.cn
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/iommu.c

index fcc987f5d4edc3ae87335fceed57eb26d7ba9b00..9f7064360828337af4a38692ab343fd12dd1ee6d 100644 (file)
@@ -64,7 +64,7 @@ LIST_HEAD(hpet_map);
 LIST_HEAD(acpihid_map);
 
 const struct iommu_ops amd_iommu_ops;
-const struct iommu_dirty_ops amd_dirty_ops;
+static const struct iommu_dirty_ops amd_dirty_ops;
 
 int amd_iommu_max_glx_val = -1;
 
@@ -2635,7 +2635,7 @@ static bool amd_iommu_enforce_cache_coherency(struct iommu_domain *domain)
        return true;
 }
 
-const struct iommu_dirty_ops amd_dirty_ops = {
+static const struct iommu_dirty_ops amd_dirty_ops = {
        .set_dirty_tracking = amd_iommu_set_dirty_tracking,
        .read_and_clear_dirty = amd_iommu_read_and_clear_dirty,
 };