From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 1/4] nand: Extend nand_(read|write)_skip_bad with *actual and limit parameters
Date: Mon, 4 Mar 2013 13:15:58 -0600 [thread overview]
Message-ID: <1362424558.16575.1@snotra> (raw)
In-Reply-To: <51335851.70009@ti.com> (from trini@ti.com on Sun Mar 3 08:04:01 2013)
On 03/03/2013 08:04:01 AM, Tom Rini wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 03/01/2013 09:59 PM, Scott Wood wrote:
> > On 03/01/2013 09:57:40 AM, Tom Rini wrote:
> >> On Thu, Feb 28, 2013 at 07:37:51PM -0600, Scott Wood wrote:
> >>>> + * @param lim maximum size that length may be in
> >>>> order to not + * exceed the buffer
> >>>
> >>> s/that length may be/that actual may be/
> >>
> >> No? We check that the requested length to something will fit
> >> even if the caller doesn't care to know what actual is.
> >
> > What I mean is that we're not saying "if (length > lim) error".
> > We compute the actual, and if the actual exceeds "lim", then
> > there's an error.
>
> OK, I see your point. My hang-up is that actual may be NULL.
That's just the pointer to store the actual length in, which is just an
implementation detail of how we return additional values. We still
compute the actual length. I'd hope it would be obvious that we're not
talking about the pointer here.
> So, "maximum size that length may be once bad blocks are accounted
> for in
> order to not exceed the buffer" ?
I think it would be better to not have to describe the concept twice.
-Scott
next prev parent reply other threads:[~2013-03-04 19:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 19:09 [U-Boot] [PATCH v3 0/4] Add NAND support to DFU, enable for am335x_evm Tom Rini
2013-02-28 19:09 ` [U-Boot] [PATCH v3 1/4] nand: Extend nand_(read|write)_skip_bad with *actual and limit parameters Tom Rini
2013-03-01 1:37 ` Scott Wood
2013-03-01 15:57 ` Tom Rini
2013-03-01 16:07 ` Tom Rini
2013-03-02 2:59 ` Scott Wood
2013-03-03 14:04 ` Tom Rini
2013-03-04 19:15 ` Scott Wood [this message]
2013-02-28 19:09 ` [U-Boot] [PATCH v3 2/4] dfu: NAND specific routines for DFU operation Tom Rini
2013-02-28 19:09 ` [U-Boot] [PATCH v3 3/4] am335x_evm: Add CONFIG_CMD_MTDPARTS and relevant defaults Tom Rini
2013-02-28 19:09 ` [U-Boot] [PATCH v3 4/4] am335x_evm: Enable DFU for NAND and MMC, provide example alt_info for both Tom Rini
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=1362424558.16575.1@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