[PATCH 1/2] nanddump: verify that start address is page aligned
Artem Bityutskiy
dedekind1 at gmail.com
Sat Oct 16 15:08:47 EDT 2010
On Tue, 2010-10-12 at 10:23 +0200, Baruch Siach wrote:
> Make nanddump consistent with nandwrite, which does not accept non page aligned
> start addresses. Thus, non page aligned dumps are useless.
>
> Signed-off-by: Baruch Siach <baruch at tkos.co.il>
> ---
> nanddump.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/nanddump.c b/nanddump.c
> index 0fdf736..d6d1352 100644
> --- a/nanddump.c
> +++ b/nanddump.c
> @@ -377,6 +377,12 @@ int main(int argc, char * const argv[])
> }
>
> /* Initialize start/end addresses and block size */
> + if (start_addr & (meminfo.writesize - 1)) {
> + fprintf(stderr, "The start address is not page-aligned !\n"
> + "The pagesize of this NAND Flash is 0x%x.\n",
> + meminfo.writesize);
> + goto closeall;
> + }
I'm fine with this change in general, but theoretically we may have a
user who relies on this. Could you please instead print a warning but
preserve the old behavior. Then in after the next release we can make
remove the warning and turn it into an error, just like this patch do.
This will potentially be user-friendly.
Add a new record to the feature-removal-schedule.txt file. I'll then
turn the warning into an error at some point.
Thanks!
--
Best Regards,
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd
mailing list