mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] iommufd/selftest: set varaiable mock_iommu_device storage-class-specifier to static
@ 2023-04-04  0:23 Tom Rix
  2023-04-04 11:57 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-04-04  0:23 UTC (permalink / raw)
  To: jgg, kevin.tian, joro, will, robin.murphy; +Cc: iommu, linux-kernel, 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 <trix@redhat.com>
---
 drivers/iommu/iommufd/selftest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/iommufd/selftest.c b/drivers/iommu/iommufd/selftest.c
index 2deda489a934..9d43334e4faf 100644
--- a/drivers/iommu/iommufd/selftest.c
+++ b/drivers/iommu/iommufd/selftest.c
@@ -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,
 };
 
-- 
2.27.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-04 11:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-04  0:23 [PATCH] iommufd/selftest: set varaiable mock_iommu_device storage-class-specifier to static Tom Rix
2023-04-04 11:57 ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®