aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorQian Cai <cai@lca.pw>2019-06-03 10:05:19 -0400
committerJoerg Roedel <jroedel@suse.de>2019-06-18 17:31:46 +0200
commitaf88ec3962010e3ac96bcfe5476c9bd68b42477f (patch)
tree92e7fd06f7838d5434b95a6d5d3fc5f55d469515 /drivers/iommu
parentiommu/vt-d: Remove an unused variable "length" (diff)
downloadlinux-dev-af88ec3962010e3ac96bcfe5476c9bd68b42477f.tar.xz
linux-dev-af88ec3962010e3ac96bcfe5476c9bd68b42477f.zip
iommu/vt-d: Silence a variable set but not used
The commit "iommu/vt-d: Probe DMA-capable ACPI name space devices" introduced a compilation warning due to the "iommu" variable in for_each_active_iommu() but never used the for each element, i.e, "drhd->iommu". drivers/iommu/intel-iommu.c: In function 'probe_acpi_namespace_devices': drivers/iommu/intel-iommu.c:4639:22: warning: variable 'iommu' set but not used [-Wunused-but-set-variable] struct intel_iommu *iommu; Silence the warning the same way as in the commit d3ed71e5cc50 ("drivers/iommu/intel-iommu.c: fix variable 'iommu' set but not used") Signed-off-by: Qian Cai <cai@lca.pw> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/intel-iommu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 1b89c3407251..ca0a1d5d2983 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -4587,7 +4587,8 @@ static int __init platform_optin_force_iommu(void)
static int __init probe_acpi_namespace_devices(void)
{
struct dmar_drhd_unit *drhd;
- struct intel_iommu *iommu;
+ /* To avoid a -Wunused-but-set-variable warning. */
+ struct intel_iommu *iommu __maybe_unused;
struct device *dev;
int i, ret = 0;