iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] remove duplicate checking code
@ 2014-05-16  7:39 Vaughan Cao
       [not found] ` <1400225980-12797-1-git-send-email-vaughan.cao-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Vaughan Cao @ 2014-05-16  7:39 UTC (permalink / raw)
  To: joro; +Cc: iommu, linux-kernel, vaughan.cao

amd_iommu_rlookup_table[devid] != NULL is already guaranteed by check_device
called before, it's fine to attach device at this point.

Signed-off-by: Vaughan Cao <vaughan.cao@oracle.com>
---
 drivers/iommu/amd_iommu.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index c949520..252851a 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3514,12 +3514,6 @@ int __init amd_iommu_init_passthrough(void)
 		dev_data = get_dev_data(&dev->dev);
 		dev_data->passthrough = true;
 
-		devid = get_device_id(&dev->dev);
-
-		iommu = amd_iommu_rlookup_table[devid];
-		if (!iommu)
-			continue;
-
 		attach_device(&dev->dev, pt_domain);
 	}
 
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-05-30 18:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-16  7:39 [PATCH] remove duplicate checking code Vaughan Cao
     [not found] ` <1400225980-12797-1-git-send-email-vaughan.cao-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-05-26  9:39   ` Joerg Roedel
     [not found]     ` <20140526093959.GH17056-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-05-29 13:45       ` Paul Bolle
2014-05-30 18:21         ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).