Make hv_iommu_device static to give it internal linkage. This
pointer is only used within hv-iommu-guest.c, but previously
has external linkage without a prior declaration. This causes
sparse to warn that the symbol was not declared.
Fixes: 2690d4156b51 ("iommu/hyperv: Add para-virtualized IOMMU support for
Hyper-V guest")
Reported-by: kernel test robot <[email protected]>
Closes:
https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Yu Zhang <[email protected]>
---
drivers/iommu/hyperv/hv-iommu-guest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/hyperv/hv-iommu-guest.c
b/drivers/iommu/hyperv/hv-iommu-guest.c
index fe06bd970621..876a22f21f1e 100644
--- a/drivers/iommu/hyperv/hv-iommu-guest.c
+++ b/drivers/iommu/hyperv/hv-iommu-guest.c
@@ -22,7 +22,7 @@
#include "iommu.h"
#include "../iommu-pages.h"
-struct hv_iommu_dev *hv_iommu_device;
+static struct hv_iommu_dev *hv_iommu_device;
/*
* Identity and blocking domains are static singletons: identity is a 1:1
--
2.52.0