linux-mips
[Top] [All Lists]

Re: [PATCH 2/5] MTD: bcm63xxpart: make sure CFE and NVRAM partitions are

To: Guillaume LECERF <glecerf@gmail.com>
Subject: Re: [PATCH 2/5] MTD: bcm63xxpart: make sure CFE and NVRAM partitions are at least 64K
From: Jonas Gorski <jonas.gorski@gmail.com>
Date: Sat, 17 Dec 2011 14:27:38 +0100
Cc: linux-mtd@lists.infradead.org, linux-mips@linux-mips.org, Artem Bityutskiy <Artem.Bityutskiy@intel.com>, David Woodhouse <dwmw2@infradead.org>, Florian Fainelli <florian@openwrt.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=hmKLZn0eq0In1d4XbqEe1muq6l/oGC5i2dQcjUBA/sg=; b=uBhMo1OGmDh/lIKTTMasPpEIiZbkc0g4vJ/Oc/8eonW/ODMxGzOP4gDrPVDLm5tTLp la1wNIlQPug7fg/6TG05uGMmaf0aN3RktOK9W3Y0Wt+uMIi1s7H1MTcdumETyM+qEFd3 9RfS28OFn8t4NvUh7Zrqu+A6MUBarfpbUVLAo=
In-reply-to: <CAJpamw5qTXwMC_HQXN+ehjxDDQ6GXT_-Kcfu8E7P5F2CnLqsZA@mail.gmail.com>
References: <1324126698-9919-1-git-send-email-jonas.gorski@gmail.com> <1324126698-9919-3-git-send-email-jonas.gorski@gmail.com> <CAJpamw5qTXwMC_HQXN+ehjxDDQ6GXT_-Kcfu8E7P5F2CnLqsZA@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
Hi Guillaume,

On 17 December 2011 14:13, Guillaume LECERF <glecerf@gmail.com> wrote:
> Hi Jonas,
>
> 2011/12/17 Jonas Gorski <jonas.gorski@gmail.com>:
>> -       spareaddr = roundup(totallen, master->erasesize) + master->erasesize;
>> -       sparelen = master->size - spareaddr - master->erasesize;
>> +       spareaddr = roundup(totallen, master->erasesize) + cfelen;
>
> spareaddr = roundup(totallen, cfelen) + cfelen ?

The intention is to align the spareaddr to the next eraseblock (cfelen
can be bigger than the erasesize). Maybe writing it as

       spareaddr = roundup(cfelen + totallen, master->erasesize);

would be cleaner.


Jonas

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