From patchwork Mon Mar 28 19:58:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 812 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:46:05 -0000 Delivered-To: patches@linaro.org Received: by 10.42.161.68 with SMTP id s4cs125315icx; Mon, 28 Mar 2011 12:59:01 -0700 (PDT) Received: by 10.52.177.9 with SMTP id cm9mr6234456vdc.244.1301342340856; Mon, 28 Mar 2011 12:59:00 -0700 (PDT) Received: from mail-px0-f172.google.com (mail-px0-f172.google.com [209.85.212.172]) by mx.google.com with ESMTPS id k33si3484412vbl.83.2011.03.28.12.58.59 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Mar 2011 12:58:59 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of grant.likely@secretlab.ca) client-ip=209.85.212.172; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of grant.likely@secretlab.ca) smtp.mail=grant.likely@secretlab.ca Received: by pxi6 with SMTP id 6so2608750pxi.17 for ; Mon, 28 Mar 2011 12:58:58 -0700 (PDT) Received: by 10.142.139.3 with SMTP id m3mr3814623wfd.266.1301342338335; Mon, 28 Mar 2011 12:58:58 -0700 (PDT) Received: from localhost (S01060002b3d79728.cg.shawcable.net [70.72.87.49]) by mx.google.com with ESMTPS id d35sm6252254wfj.21.2011.03.28.12.58.56 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Mar 2011 12:58:57 -0700 (PDT) Sender: Grant Likely Received: from [127.0.1.1] (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id DC63C181712; Mon, 28 Mar 2011 13:58:55 -0600 (MDT) Subject: [PATCH 4/6] Fix off-by-one error in passing initrd end address via device tree To: u-boot@lists.denx.de, John Rigby , linaro-kernel@lists.linaro.org, wd@denx.de, vanbaren@cideas.com From: Grant Likely Cc: devicetree-discuss@lists.ozlabs.org, patches@linaro.org Date: Mon, 28 Mar 2011 13:58:55 -0600 Message-ID: <20110328195854.10235.46139.stgit@ponder> In-Reply-To: <20110328195231.10235.36716.stgit@ponder> References: <20110328195231.10235.36716.stgit@ponder> User-Agent: StGit/0.15 MIME-Version: 1.0 From: Grant Likely The initrd_end variable contains the address immediately *after* the initrd blob, not the last address containing data. This patch fixes an inadvertent off-by-one when setting up the initrd reserved map. Signed-off-by: Grant Likely --- common/fdt_support.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index 6c98e5b..1b5f9c8 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -183,7 +183,7 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end, int force) } } - err = fdt_add_mem_rsv(fdt, initrd_start, initrd_end - initrd_start + 1); + err = fdt_add_mem_rsv(fdt, initrd_start, initrd_end - initrd_start); if (err < 0) { printf("fdt_initrd: %s\n", fdt_strerror(err)); return err;