All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	linux-mtd@lists.infradead.org, dedekind1@gmail.com
Subject: Re: [PATCH] mtd: nand: Use the mirror BBT descriptor when reading its version
Date: Sun, 10 Jun 2012 19:02:30 +0200	[thread overview]
Message-ID: <4FD4D326.1010205@linutronix.de> (raw)
In-Reply-To: <20120610135812.01dce4e7@pixies.home.jungo.com>

On 06/10/2012 12:58 PM, Shmulik Ladkani wrote:
> The code responsible for reading the version of the mirror bbt was
> incorrectly using the descriptor of the main bbt.
>
> Pass the mirror bbt descriptor to 'scan_read_raw' when reading the
> version of the mirror bbt.
>
> Signed-off-by: Shmulik Ladkani<shmulik.ladkani@gmail.com>
> ---
> - Spotted while reviewing BBT code.
> - Introduced by 7cba7b1 [mtd: nand: add support for BBT without OOB].
> - Looks like a typo.
> - Not runtime tested.
> - Sebastian, care to take a look and Ack?

Looks good.

Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

> diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
> index 30d1319..c126469 100644
> --- a/drivers/mtd/nand/nand_bbt.c
> +++ b/drivers/mtd/nand/nand_bbt.c
> @@ -390,7 +390,7 @@ static int read_abs_bbts(struct mtd_info *mtd, uint8_t *buf,
>   	/* Read the mirror version, if available */
>   	if (md&&  (md->options&  NAND_BBT_VERSION)) {
>   		scan_read_raw(mtd, buf, (loff_t)md->pages[0]<<  this->page_shift,
> -			      mtd->writesize, td);
> +			      mtd->writesize, md);
>   		md->version[0] = buf[bbt_get_ver_offs(mtd, md)];
>   		pr_info("Bad block table at page %d, version 0x%02X\n",
>   			 md->pages[0], md->version[0]);

Sebastian

  reply	other threads:[~2012-06-10 17:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-10 10:58 [PATCH] mtd: nand: Use the mirror BBT descriptor when reading its version Shmulik Ladkani
2012-06-10 17:02 ` Sebastian Andrzej Siewior [this message]
2012-06-11  5:59 ` Brian Norris
2012-06-12 10:42   ` Artem Bityutskiy
2012-06-13  0:42     ` Brian Norris
2012-06-18 11:12       ` Artem Bityutskiy
2012-06-18 17:59         ` Robert Jarzmik
2012-06-18 20:28           ` Artem Bityutskiy
2012-06-19  1:51             ` Mike Dunn
2012-06-24 18:52             ` Robert Jarzmik
2012-06-25 19:40               ` Mike Dunn
2012-06-26 15:41               ` Artem Bityutskiy
2012-06-19  1:40         ` Mike Dunn
2012-06-18 11:32 ` 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=4FD4D326.1010205@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=shmulik.ladkani@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.