Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42db7c6a authored by Qian Cai's avatar Qian Cai Committed by Joerg Roedel
Browse files

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: default avatarQian Cai <cai@lca.pw>
Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 123b2ffc
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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);