iommu/vt-d: Cleanup get_valid_domain_for_dev()
authorLu Baolu <baolu.lu@linux.intel.com>
Sat, 25 May 2019 05:41:33 +0000 (13:41 +0800)
committerJoerg Roedel <jroedel@suse.de>
Tue, 28 May 2019 08:19:12 +0000 (10:19 +0200)
commit4ec066c7b1476e0ca66a7acdb575627a5d1a1ee6
tree3ed736b4e080056c50664822590f251ec2527196
parent8af46c784ecfe8929f66b5eaae987f6874953226
iommu/vt-d: Cleanup get_valid_domain_for_dev()

Previously, get_valid_domain_for_dev() is used to retrieve the
DMA domain which has been attached to the device or allocate one
if no domain has been attached yet. As we have delegated the DMA
domain management to upper layer, this function is used purely to
allocate a private DMA domain if the default domain doesn't work
for ths device. Cleanup the code for readability.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c
include/linux/intel-iommu.h