iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Vaughan Cao <vaughan.cao@oracle.com>
To: joro@8bytes.org
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	vaughan.cao@oracle.com
Subject: [PATCH] remove duplicate checking code
Date: Fri, 16 May 2014 15:39:40 +0800	[thread overview]
Message-ID: <1400225980-12797-1-git-send-email-vaughan.cao@oracle.com> (raw)

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

             reply	other threads:[~2014-05-16  7:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16  7:39 Vaughan Cao [this message]
     [not found] ` <1400225980-12797-1-git-send-email-vaughan.cao-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-05-26  9:39   ` [PATCH] remove duplicate checking code 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1400225980-12797-1-git-send-email-vaughan.cao@oracle.com \
    --to=vaughan.cao@oracle.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).