linux-mips
[Top] [All Lists]

[PATCH 2/2] kernel/resource: enrich the comment for insert_resource_conf

To: jbarnes@virtuousgeek.org, torvalds@linux-foundation.org
Subject: [PATCH 2/2] kernel/resource: enrich the comment for insert_resource_conflict()
From: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
Date: Thu, 28 Jul 2011 19:28:32 +0800
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, eyal@mips.com, zenon@mips.com, dengcheng.zhu@gmail.com
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=iNWr+VeF3/fCi4ihx2BkN0oSjGrbBHQm99vEIfYTLJE=; b=fWgNZpS3mib5O8fkqP5fJ3uC1CKYhVuvGbKRkYHyVB580LcIhpz7RSRHoKsMa3SsLG YVQtcRZDonVOKDtb1q3pfEM5alM4v1BXheBKFFgiGHN+QPMXrdM5V8sN0xrDV5pifEZs mq7GN0hGgOD7ZG4KUexCutl4AIhFplwJN4EAQ=
In-reply-to: <1311852512-7340-1-git-send-email-dengcheng.zhu@gmail.com>
References: <1311852512-7340-1-git-send-email-dengcheng.zhu@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
It helps people better understand how this function works.

Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
---
 kernel/resource.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/kernel/resource.c b/kernel/resource.c
index 3ff4017..5406ecf 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -617,7 +617,9 @@ static struct resource * __insert_resource(struct resource 
*parent, struct resou
  * happens. If a conflict happens, and the conflicting resources
  * entirely fit within the range of the new resource, then the new
  * resource is inserted and the conflicting resources become children of
- * the new resource.
+ * the new resource. Also, if the new resource entirely fits within the range
+ * of a conflicting resource without overlapping the latter's children, then
+ * the new resource is inserted too and becomes a child of the conflicting one.
  */
 struct resource *insert_resource_conflict(struct resource *parent, struct 
resource *new)
 {
-- 
1.7.1


<Prev in Thread] Current Thread [Next in Thread>