From patchwork Thu Jul 28 11:28:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deng-Cheng Zhu X-Patchwork-Id: 1015302 X-Patchwork-Delegate: bhelgaas@google.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6SBTOx7005092 for ; Thu, 28 Jul 2011 11:29:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755513Ab1G1L2u (ORCPT ); Thu, 28 Jul 2011 07:28:50 -0400 Received: from mail-yi0-f46.google.com ([209.85.218.46]:57115 "EHLO mail-yi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755502Ab1G1L2s (ORCPT ); Thu, 28 Jul 2011 07:28:48 -0400 Received: by mail-yi0-f46.google.com with SMTP id 27so1703601yia.19 for ; Thu, 28 Jul 2011 04:28:48 -0700 (PDT) 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= Received: by 10.91.163.20 with SMTP id q20mr596046ago.169.1311852528065; Thu, 28 Jul 2011 04:28:48 -0700 (PDT) Received: from localhost.localdomain ([210.13.118.102]) by mx.google.com with ESMTPS id p6sm678491ank.28.2011.07.28.04.28.44 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Jul 2011 04:28:47 -0700 (PDT) From: Deng-Cheng Zhu To: jbarnes@virtuousgeek.org, torvalds@linux-foundation.org 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 Subject: [PATCH 2/2] kernel/resource: enrich the comment for insert_resource_conflict() Date: Thu, 28 Jul 2011 19:28:32 +0800 Message-Id: <1311852512-7340-3-git-send-email-dengcheng.zhu@gmail.com> X-Mailer: git-send-email 1.7.1 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-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 28 Jul 2011 11:29:24 +0000 (UTC) It helps people better understand how this function works. Signed-off-by: Deng-Cheng Zhu --- 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) {