From: Artem Bityutskiy <dedekind1@gmail.com>
To: Vimal Singh <vimal.newwork@gmail.com>
Cc: Linux MTD <linux-mtd@lists.infradead.org>
Subject: Re: [RFC] [PATCH] [MTD-UTILS]: flash_lock: fix length being passed
Date: Tue, 08 Dec 2009 14:19:51 +0200 [thread overview]
Message-ID: <1260274791.19669.48.camel@localhost> (raw)
In-Reply-To: <ce9ab5790912020628n5e91f811haa56b6380a71ab32@mail.gmail.com>
On Wed, 2009-12-02 at 19:58 +0530, Vimal Singh wrote:
> This patch fixes the 'length' calculation.
> Making it:
> + mtdLockInfo.length = (num_sectors - 1) * mtdInfo.erasesize;
> Rather:
> - mtdLockInfo.length = num_sectors * mtdInfo.erasesize;
>
> Say there are 240 blocks present in the device. Then:
> offset starts from: 0x0
> and full size of device: 0x1E00000
>
> doing: 240 * 0x20000 gives -> 0x1E00000
> But last block address should be 0x1DE0000 (which spans for 0x20000
> bytes, adding upto size of 0x1E00000)
>
> Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Pushed, thanks!
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
prev parent reply other threads:[~2009-12-08 12:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-02 14:28 [RFC] [PATCH] [MTD-UTILS]: flash_lock: fix length being passed Vimal Singh
2009-12-02 14:33 ` Vimal Singh
2009-12-04 8:41 ` Artem Bityutskiy
2009-12-07 6:54 ` Vimal Singh
2009-12-08 12:19 ` Artem Bityutskiy [this message]
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=1260274791.19669.48.camel@localhost \
--to=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=vimal.newwork@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.