public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] [nand] Implement nand_extent_skip_bad
Date: Tue, 11 Dec 2012 11:13:55 -0600	[thread overview]
Message-ID: <1355246035.13481.2@snotra> (raw)
In-Reply-To: <A6D3AA67-02A5-4334-BFD8-A941D3AEBA9E@antoniou-consulting.com> (from panto@antoniou-consulting.com on Tue Dec 11 03:40:53 2012)

On 12/11/2012 03:40:53 AM, Pantelis Antoniou wrote:
> Hi Scott,
> 
> On Dec 11, 2012, at 12:53 AM, Scott Wood wrote:
> 
> >> +/**
> >> + * nand_extent_skip_bad:
> >> + *
> >> + * Find the extent of a chunk, return the offset where it ends
> >> + * Blocks that are marked bad are skipped and the next block is  
> examined
> >> + * instead as long as the extend is short enough to fit even  
> after skipping the
> >> + * bad blocks.
> >> + *
> >> + * @param nand NAND device
> >> + * @param offset offset in flash
> >> + * @param length extend length
> >> + * @return next offset in case of success (loff_t)-1 on error
> >> + */
> >
> > Would it be better to return this information from existing  
> read/write functions -- either instead of or in addition to exporting  
> this functionality?
> >
> 
> Yes it would. However that would require modifying all callers, which  
> would be a hard sell when there's only one user of it.

There aren't that many callers, and it's all common code (so no issue  
with testing on obscure hardware).

> > This seems duplicative of check_skip_len().
> >
> 
> It is. check_skip_len doesn't return the information I need. I could  
> modify check_skip_len with
> an extra parameter if that's going to be OK with you.

Yes, please modify check_skip_len() instead.

-Scott

  reply	other threads:[~2012-12-11 17:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-10 15:24 [U-Boot] [PATCH] [nand] Implement nand_extent_skip_bad Pantelis Antoniou
2012-12-10 22:53 ` Scott Wood
2012-12-11  9:40   ` Pantelis Antoniou
2012-12-11 17:13     ` Scott Wood [this message]
2012-12-11 17:16       ` Pantelis Antoniou

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=1355246035.13481.2@snotra \
    --to=scottwood@freescale.com \
    --cc=u-boot@lists.denx.de \
    /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