linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	linux-mtd@lists.infradead.org
Subject: Re: [PATCH 2/2] mtd: nand: check the return code of 'read_oob/read_oob_raw'
Date: Fri, 11 May 2012 14:48:11 +0300	[thread overview]
Message-ID: <1336736891.2625.49.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <20120509131334.2d0b7160@pixies.home.jungo.com>

[-- Attachment #1: Type: text/plain, Size: 642 bytes --]

On Wed, 2012-05-09 at 13:13 +0300, Shmulik Ladkani wrote:

> @@ -1826,9 +1827,12 @@ static int nand_do_read_oob(struct mtd_info *mtd, loff_t from,
>  
>  	while (1) {
>  		if (ops->mode == MTD_OPS_RAW)
> -			chip->ecc.read_oob_raw(mtd, chip, page);
> +			ret = chip->ecc.read_oob_raw(mtd, chip, page);
>  		else
> -			chip->ecc.read_oob(mtd, chip, page);
> +			ret = chip->ecc.read_oob(mtd, chip, page);
> +
> +		if (ret < 0)
> +			break;

For page reading the convention is that we keep reading and try to read
everything anyway, I guess it is reasonable thing to do for OOB as well?

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-05-11 11:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09 10:06 [PATCH 1/2] mtd: nand: remove 'sndcmd' parameter of 'read_oob/read_oob_raw' Shmulik Ladkani
2012-05-09 10:13 ` [PATCH 2/2] mtd: nand: check the return code " Shmulik Ladkani
2012-05-11 11:48   ` Artem Bityutskiy [this message]
2012-05-11 12:54     ` Shmulik Ladkani
2012-05-11 13:34       ` Artem Bityutskiy
2012-05-11 13:45   ` Artem Bityutskiy
2012-05-11 12:03 ` [PATCH 1/2] mtd: nand: remove 'sndcmd' parameter " Artem Bityutskiy
2012-05-11 13: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=1336736891.2625.49.camel@sauron.fi.intel.com \
    --to=dedekind1@gmail.com \
    --cc=computersforpeace@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 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).