Linux-HyperV List
 help / color / mirror / Atom feed
From: Yu Zhang <zhangyu1@linux.microsoft.com>
To: joro@8bytes.org
Cc: iommu@lists.linux.dev, linux-hyperv@vger.kernel.org,
	linux-kernel@vger.kernel.org, lkp@intel.com,
	oe-kbuild-all@lists.linux.dev, joerg.roedel@amd.com,
	jgg@nvidia.com, will@kernel.org, robin.murphy@arm.com,
	mhklinux@outlook.com, wei.liu@kernel.org,
	jacob.pan@linux.microsoft.com,
	easwar.hariharan@linux.microsoft.com
Subject: [PATCH 2/2] iommu/hyperv: Make hv_iommu_device static
Date: Thu, 15 Oct 2026 16:23:51 +0800	[thread overview]
Message-ID: <20261015082351.184252-3-zhangyu1@linux.microsoft.com> (raw)
In-Reply-To: <20261015082351.184252-1-zhangyu1@linux.microsoft.com>

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 <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202610092126.TuSXnTYR-lkp@intel.com/
Signed-off-by: Yu Zhang <zhangyu1@linux.microsoft.com>
---
 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


  parent reply	other threads:[~2026-10-15  8:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15  8:23 [PATCH 0/2] iommu/hyperv: Fix guest IOMMU build issues Yu Zhang
2026-10-15  8:23 ` [PATCH 1/2] iommu/hyperv: Add missing PCI dependency for the guest IOMMU driver Yu Zhang
2026-10-15  8:23 ` Yu Zhang [this message]
2026-10-15 12:36 ` [PATCH 0/2] iommu/hyperv: Fix guest IOMMU build issues Jason Gunthorpe
2026-10-15 15:29 ` Jacob Pan
2026-10-15 15:52 ` Jörg Rödel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261015082351.184252-3-zhangyu1@linux.microsoft.com \
    --to=zhangyu1@linux.microsoft.com \
    --cc=easwar.hariharan@linux.microsoft.com \
    --cc=iommu@lists.linux.dev \
    --cc=jacob.pan@linux.microsoft.com \
    --cc=jgg@nvidia.com \
    --cc=joerg.roedel@amd.com \
    --cc=joro@8bytes.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mhklinux@outlook.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robin.murphy@arm.com \
    --cc=wei.liu@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox