linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Baruch Siach <baruch@tkos.co.il>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH 1/2] nanddump: verify that start address is page aligned
Date: Sat, 16 Oct 2010 22:08:47 +0300	[thread overview]
Message-ID: <1287256127.1781.32.camel@brekeke> (raw)
In-Reply-To: <50168b5d486e28a9d7f7685537710e05242c4f12.1286871735.git.baruch@tkos.co.il>

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@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 (Битюцкий Артём)

  parent reply	other threads:[~2010-10-16 19:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12  8:23 [PATCH 1/2] nanddump: verify that start address is page aligned Baruch Siach
2010-10-12  8:23 ` [PATCH 2/2] nanddump: always check the first erase block Baruch Siach
2010-10-16 19:11   ` Artem Bityutskiy
2010-10-16 19:08 ` Artem Bityutskiy [this message]
2010-10-18  7:23   ` [PATCH] nanddump: warn when the start address is not page aligned Baruch Siach
2010-10-18 10:31     ` Artem Bityutskiy

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=1287256127.1781.32.camel@brekeke \
    --to=dedekind1@gmail.com \
    --cc=baruch@tkos.co.il \
    --cc=linux-mtd@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).