iommufd/selftest: set varaiable mock_iommu_device storage-class-specifier to static
PATCH 1/1 iommufd/selftest: set varaiable mock_iommu_device storage-class-specifier to static
smatch reports drivers/iommu/iommufd/selftest.c:295:21: warning: symbol
'mock_iommu_device' was not declared. Should it be static?
This variable is only used in one file so it should be static.
Signed-off-by Tom Rix <[email protected]>
--- drivers/iommu/iommufd/selftest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/iommufd/selftest.c +1 -1
@@ -292,7 +292,7 @@ static const struct iommu_ops mock_ops = { }, }; -struct iommu_device mock_iommu_device = { +static struct iommu_device mock_iommu_device = { .ops = &mock_ops, };
Signature · 1 line
2.27.0
Quoted 9 lines · Tom Rix
smatch reports
drivers/iommu/iommufd/selftest.c:295:21: warning: symbol
'mock_iommu_device' was not declared. Should it be static?This variable is only used in one file so it should be static.
Signed-off-by Tom Rix <[email protected]>--- drivers/iommu/iommufd/selftest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, I applied this
Jason