Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932432AbbFKNsL (ORCPT ); Thu, 11 Jun 2015 09:48:11 -0400 Received: from 8bytes.org ([81.169.241.247]:39749 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752356AbbFKNrw (ORCPT ); Thu, 11 Jun 2015 09:47:52 -0400 From: Joerg Roedel To: iommu@lists.linux-foundation.org Cc: David Woodhouse , zhen-hual@hp.com, bhe@redhat.com, linux-kernel@vger.kernel.org, Joerg Roedel Subject: [PATCH 1/4] iommu/vt-d: Remove iommu_attach_domain_with_id() Date: Thu, 11 Jun 2015 15:47:40 +0200 Message-Id: <1434030463-942-2-git-send-email-joro@8bytes.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1434030463-942-1-git-send-email-joro@8bytes.org> References: <1434030463-942-1-git-send-email-joro@8bytes.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1725 Lines: 56 From: Joerg Roedel We don't re-use domain-ids from the old kernel, so this function is not needed anymore. Remove it. Signed-off-by: Joerg Roedel --- drivers/iommu/intel-iommu.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 58abddb..b0fd5f2 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -1648,16 +1648,6 @@ static int iommu_attach_domain(struct dmar_domain *domain, return num; } -static int iommu_attach_domain_with_id(struct dmar_domain *domain, - struct intel_iommu *iommu, - int domain_number) -{ - if (domain_number >= 0) - return domain_number; - - return iommu_attach_domain(domain, iommu); -} - static int iommu_attach_vm_domain(struct dmar_domain *domain, struct intel_iommu *iommu) { @@ -2326,7 +2316,6 @@ static struct dmar_domain *get_domain_for_dev(struct device *dev, int gaw) u16 dma_alias; unsigned long flags; u8 bus, devfn; - int did = -1; /* Default to "no domain_id supplied" */ domain = find_domain(dev); if (domain) @@ -2361,7 +2350,7 @@ static struct dmar_domain *get_domain_for_dev(struct device *dev, int gaw) if (!domain) return NULL; - domain->id = iommu_attach_domain_with_id(domain, iommu, did); + domain->id = iommu_attach_domain(domain, iommu); if (domain->id < 0) { free_domain_mem(domain); return NULL; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/