From: David Woodhouse Date: Sun, 9 Mar 2014 20:52:37 +0000 (-0700) Subject: iommu/vt-d: Simplify iommu check in domain_remove_one_dev_info() X-Git-Tag: v3.15-rc1~70^2^6~23 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8bbc4410129c0919e5943012489427c5e050a63e;p=karo-tx-linux.git iommu/vt-d: Simplify iommu check in domain_remove_one_dev_info() Now we store the iommu in the device_domain_info, we don't need to do a lookup. Signed-off-by: David Woodhouse --- diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 8303f256fe84..dc322d0238a0 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -4056,8 +4056,7 @@ static void domain_remove_one_dev_info(struct dmar_domain *domain, * owned by this domain, clear this iommu in iommu_bmp * update iommu count and coherency */ - if (iommu == device_to_iommu(info->segment, info->bus, - info->devfn)) + if (info->iommu == iommu) found = 1; }