lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 25 May 2019 13:41:34 +0800 From: Lu Baolu <baolu.lu@...ux.intel.com> To: David Woodhouse <dwmw2@...radead.org>, Joerg Roedel <joro@...tes.org> Cc: ashok.raj@...el.com, jacob.jun.pan@...el.com, kevin.tian@...el.com, jamessewart@...sta.com, tmurphy@...sta.com, dima@...sta.com, sai.praneeth.prakhya@...el.com, iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org, Lu Baolu <baolu.lu@...ux.intel.com> Subject: [PATCH v4 13/15] iommu/vt-d: Remove startup parameter from device_def_domain_type() It isn't used anywhere. Remove it to make code concise. Signed-off-by: Lu Baolu <baolu.lu@...ux.intel.com> --- 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
Powered by blists - more mailing lists