mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 15:41:58 +00:00
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 d3ed71e5cc
("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>
This commit is contained in:
parent
42db7c6a40
commit
af88ec3962
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user