From: Youquan Song <youquan.song@intel.com>
To: David Woodhouse <dwmw2@infradead.org>,
David Woodhouse <David.Woodhouse@intel.com>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
Youquan Song <youquan.song@linux.intel.com>,
Youquan Song <youquan.song@intel.com>,
zhiyuan.zhou@intel.com
Subject: [PATCH 2/3] dmar: Move the confuse comments to proper place
Date: Fri, 13 Dec 2013 00:16:26 -0500 [thread overview]
Message-ID: <1386911787-25375-2-git-send-email-youquan.song@intel.com> (raw)
In-Reply-To: <1386911787-25375-1-git-send-email-youquan.song@intel.com>
the "found=1" should be "there are other device owned by the domain", the
comments is put at wrong place and make the code reviewing confuse, so move it
to the correct place.
Signed-off-by: Youquan Song <youquan.song@intel.com>
---
drivers/iommu/intel-iommu.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 9cd522f..aa821fc 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -3813,10 +3813,6 @@ static void domain_remove_one_dev_info(struct dmar_domain *domain,
continue;
}
- /* if there is no other devices under the same iommu
- * owned by this domain, clear this iommu in iommu_bmp
- * update iommu count and coherency
- */
if (iommu == device_to_iommu(info->segment, info->bus,
info->devfn))
found = 1;
@@ -3824,6 +3820,10 @@ static void domain_remove_one_dev_info(struct dmar_domain *domain,
spin_unlock_irqrestore(&device_domain_lock, flags);
+ /* if there is no other devices under the same iommu
+ * owned by this domain, clear this iommu in iommu_bmp
+ * update iommu count and coherency
+ */
if (found == 0) {
unsigned long tmp_flags;
spin_lock_irqsave(&domain->iommu_lock, tmp_flags);
--
1.7.7.4
next prev parent reply other threads:[~2013-12-12 16:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-13 5:16 [PATCH 1/3] dmar: Fix domain id not update to newly create Youquan Song
2013-12-13 5:16 ` Youquan Song [this message]
2013-12-13 5:16 ` [PATCH 3/3] dmar: reduce loop to find multi-devices owned by IOMMU Youquan Song
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=1386911787-25375-2-git-send-email-youquan.song@intel.com \
--to=youquan.song@intel.com \
--cc=David.Woodhouse@intel.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=youquan.song@linux.intel.com \
--cc=zhiyuan.zhou@intel.com \
/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
all inboxes | Powered by JetHome®