Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1318760ybi; Fri, 24 May 2019 22:51:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPNFz1W67SXLI3Pb0chSGvfZLHBac2PMaPUiBtTdWypiYVFlYX8stalDDKo/+WgH6gY7eU X-Received: by 2002:a17:902:b601:: with SMTP id b1mr62702747pls.117.1558763464490; Fri, 24 May 2019 22:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558763464; cv=none; d=google.com; s=arc-20160816; b=eHt8hEvGRM07ul5yiXaXNJmjs9prGJ8ch79U2LJiWx51R9Mhqb2lc23Rx5iZWmlTVx +CnH9TptxXL7S4iVocFrNeNj6NfUwlcwr1qcYSPF1LOTXKqe06LqjdphqJyBx9z+Twg1 H544CJvCgt/3GincgNrpWAjqk/aLJjCg4DMDh5d+GzGtv+bZK0ty2DnqZpsvj9CLnfYi IQ0HbfAeOdob5enyr+X9VrxgamOeNaPz502DlVtcY7B4TWKe8hfGsH5vVuTT8kV4BZzV jaE0goJ9+cdONB2/PZE9n6kXwGPYE2sgva4dW2pupna2gu/knxrChbOn0A0BAF/vGjhG qH6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=HjsZsR87pVLXGyie7L3zVZnofWEAmkrItNE2mJB7dc0=; b=WoFULbYe9P4RKacl9P4soVdJr7lnj4aK14A7XSk7zS4UFr7VgnrfxXeKBcH4vBXxUt z6+mY92Jg6PQeBk5r1WSv9/Kg72ntWoBzapT/PSZ4dZ2tvJt3XfY6Pdc5XZzUOnrrFxY ZgIhdTHlssCYT7AER5gPKTz3YEqlb2fYi/Z7CYxRg4WkSEhn7jyAsXNVOb+uQ4wpwoIC E2WsFkCZY5Y9U55/AWrGRzl2YdnOJvx6j+fZal+sc+O+xYnErlP4VFK6bCJgRB0edBFk FCErbkbjg1Xn0gPDXrMMpi/2WtVNpEdbi0ysSaPvtzalJ8AqzIuVb8D5aKlPNz/PqogC SVsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id az4si6870502plb.291.2019.05.24.22.50.49; Fri, 24 May 2019 22:51:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726095AbfEYFtS (ORCPT + 99 others); Sat, 25 May 2019 01:49:18 -0400 Received: from mga05.intel.com ([192.55.52.43]:46780 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726965AbfEYFtN (ORCPT ); Sat, 25 May 2019 01:49:13 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 May 2019 22:49:12 -0700 X-ExtLoop1: 1 Received: from allen-box.sh.intel.com ([10.239.159.136]) by fmsmga006.fm.intel.com with ESMTP; 24 May 2019 22:49:10 -0700 From: Lu Baolu To: David Woodhouse , Joerg Roedel Cc: ashok.raj@intel.com, jacob.jun.pan@intel.com, kevin.tian@intel.com, jamessewart@arista.com, tmurphy@arista.com, dima@arista.com, sai.praneeth.prakhya@intel.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Lu Baolu Subject: [PATCH v4 13/15] iommu/vt-d: Remove startup parameter from device_def_domain_type() Date: Sat, 25 May 2019 13:41:34 +0800 Message-Id: <20190525054136.27810-14-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190525054136.27810-1-baolu.lu@linux.intel.com> References: <20190525054136.27810-1-baolu.lu@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It isn't used anywhere. Remove it to make code concise. Signed-off-by: Lu Baolu --- drivers/iommu/intel-iommu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 59cd8b7e793f..ba425db8cfc6 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -2974,7 +2974,7 @@ static bool device_is_rmrr_locked(struct device *dev) * - IOMMU_DOMAIN_IDENTITY: device requires an identical mapping domain * - 0: both identity and dynamic domains work for this device */ -static int device_def_domain_type(struct device *dev, int startup) +static int device_def_domain_type(struct device *dev) { if (dev_is_pci(dev)) { struct pci_dev *pdev = to_pci_dev(dev); @@ -3028,16 +3028,16 @@ static int device_def_domain_type(struct device *dev, int startup) IOMMU_DOMAIN_IDENTITY : 0; } -static inline int iommu_should_identity_map(struct device *dev, int startup) +static inline int iommu_should_identity_map(struct device *dev) { - return device_def_domain_type(dev, startup) == IOMMU_DOMAIN_IDENTITY; + return device_def_domain_type(dev) == IOMMU_DOMAIN_IDENTITY; } static int __init dev_prepare_static_identity_mapping(struct device *dev, int hw) { int ret; - if (!iommu_should_identity_map(dev, 1)) + if (!iommu_should_identity_map(dev)) return 0; ret = domain_add_dev_info(si_domain, dev); @@ -4590,7 +4590,7 @@ static int device_notifier(struct notifier_block *nb, dmar_remove_one_dev_info(dev); } else if (action == BUS_NOTIFY_ADD_DEVICE) { - if (iommu_should_identity_map(dev, 1)) + if (iommu_should_identity_map(dev)) domain_add_dev_info(si_domain, dev); } @@ -5551,7 +5551,7 @@ static int intel_iommu_add_device(struct device *dev) domain = iommu_get_domain_for_dev(dev); dmar_domain = to_dmar_domain(domain); if (domain->type == IOMMU_DOMAIN_DMA) { - if (device_def_domain_type(dev, 1) == IOMMU_DOMAIN_IDENTITY) { + if (device_def_domain_type(dev) == IOMMU_DOMAIN_IDENTITY) { ret = iommu_request_dm_for_dev(dev); if (ret) { dmar_domain->flags |= DOMAIN_FLAG_LOSE_CHILDREN; @@ -5564,7 +5564,7 @@ static int intel_iommu_add_device(struct device *dev) return -ENODEV; } } else { - if (device_def_domain_type(dev, 1) == IOMMU_DOMAIN_DMA) { + if (device_def_domain_type(dev) == IOMMU_DOMAIN_DMA) { ret = iommu_request_dma_domain_for_dev(dev); if (ret) { dmar_domain->flags |= DOMAIN_FLAG_LOSE_CHILDREN; -- 2.17.1