summaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorQian Cai2019-06-17 15:20:27 +0200
committerJoerg Roedel2019-06-18 17:30:06 +0200
commit42db7c6a404b21dafd3288ffa43136da562490ac (patch)
tree8482cbd10256b4c01a2b6ccafd4ebe0275805d21 /drivers/iommu
parentiommu/vt-d: Consolidate domain_init() to avoid duplication (diff)
downloadkernel-qcow2-linux-42db7c6a404b21dafd3288ffa43136da562490ac.tar.gz
kernel-qcow2-linux-42db7c6a404b21dafd3288ffa43136da562490ac.tar.xz
kernel-qcow2-linux-42db7c6a404b21dafd3288ffa43136da562490ac.zip
iommu/vt-d: Remove an unused variable "length"
The linux-next commit "iommu/vt-d: Duplicate iommu_resv_region objects per device list" [1] left out an unused variable, drivers/iommu/intel-iommu.c: In function 'dmar_parse_one_rmrr': drivers/iommu/intel-iommu.c:4014:9: warning: variable 'length' set but not used [-Wunused-but-set-variable] [1] https://lore.kernel.org/patchwork/patch/1083073/ Signed-off-by: Qian Cai <cai@lca.pw> Reviewed-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/intel-iommu.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 466129e7e50c..1b89c3407251 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -4018,7 +4018,6 @@ int __init dmar_parse_one_rmrr(struct acpi_dmar_header *header, void *arg)
{
struct acpi_dmar_reserved_memory *rmrr;
struct dmar_rmrr_unit *rmrru;
- size_t length;
rmrru = kzalloc(sizeof(*rmrru), GFP_KERNEL);
if (!rmrru)
@@ -4029,8 +4028,6 @@ int __init dmar_parse_one_rmrr(struct acpi_dmar_header *header, void *arg)
rmrru->base_address = rmrr->base_address;
rmrru->end_address = rmrr->end_address;
- length = rmrr->end_address - rmrr->base_address + 1;
-
rmrru->devices = dmar_alloc_dev_scope((void *)(rmrr + 1),
((void *)rmrr) + rmrr->header.length,
&rmrru->devices_cnt);