]> www.infradead.org Git - linux.git/commitdiff
iommufd/selftest: Make dirty_ops static
authorJinjie Ruan <ruanjinjie@huawei.com>
Mon, 19 Aug 2024 12:00:07 +0000 (20:00 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 19 Aug 2024 12:26:41 +0000 (09:26 -0300)
The sparse tool complains as follows:

drivers/iommu/iommufd/selftest.c:277:30: warning:
symbol 'dirty_ops' was not declared. Should it be static?

This symbol is not used outside of selftest.c, so marks it static.

Fixes: 266ce58989ba ("iommufd/selftest: Test IOMMU_HWPT_ALLOC_DIRTY_TRACKING")
Link: https://patch.msgid.link/r/20240819120007.3884868-1-ruanjinjie@huawei.com
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/selftest.c

index f95e32e2913330d201c0ab6eb792625a538b1797..222cfc11ebfd00bdefdebed0e7eb967a6f42fe9a 100644 (file)
@@ -273,7 +273,7 @@ static int mock_domain_read_and_clear_dirty(struct iommu_domain *domain,
        return 0;
 }
 
-const struct iommu_dirty_ops dirty_ops = {
+static const struct iommu_dirty_ops dirty_ops = {
        .set_dirty_tracking = mock_domain_set_dirty_tracking,
        .read_and_clear_dirty = mock_domain_read_and_clear_dirty,
 };