Skip to content

Commit

Permalink
iommu/vt-d: Simplify check in identity_mapping()
Browse files Browse the repository at this point in the history
The function only has one call-site and there it is never called with
dummy or deferred devices. Simplify the check in the function to
account for that.

Fixes: 1ee0186 ("iommu/vt-d: Refactor find_domain() helper")
Cc: [email protected] # v5.5
Reviewed-by: Jerry Snitselaar <[email protected]>
Acked-by: Lu Baolu <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
joergroedel committed Feb 18, 2020
1 parent 96d170f commit 1ddb32d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2916,7 +2916,7 @@ static int identity_mapping(struct device *dev)
struct device_domain_info *info;

info = dev->archdata.iommu;
if (info && info != DUMMY_DEVICE_DOMAIN_INFO && info != DEFER_DEVICE_DOMAIN_INFO)
if (info)
return (info->domain == si_domain);

return 0;
Expand Down

0 comments on commit 1ddb32d

Please sign in to comment.