Skip to content

Commit cf1e515

Browse files
ruanjinjie-engjgunthorpe
authored andcommitted
iommufd/selftest: Make dirty_ops static
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: 266ce58 ("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>
1 parent 950aeef commit cf1e515

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/iommu/iommufd/selftest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ static int mock_domain_read_and_clear_dirty(struct iommu_domain *domain,
273273
return 0;
274274
}
275275

276-
const struct iommu_dirty_ops dirty_ops = {
276+
static const struct iommu_dirty_ops dirty_ops = {
277277
.set_dirty_tracking = mock_domain_set_dirty_tracking,
278278
.read_and_clear_dirty = mock_domain_read_and_clear_dirty,
279279
};

0 commit comments

Comments
 (0)