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@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
Lu Baolu 2019-05-25 13:41:34 +08:00 committed by Joerg Roedel
parent 4ec066c7b1
commit 0e31a72665
1 changed files with 7 additions and 7 deletions

View File

@ -2946,7 +2946,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);
@ -3000,16 +3000,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);
@ -4570,7 +4570,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);
}
@ -5528,7 +5528,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;
@ -5541,7 +5541,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;