[U-Boot] [PATCH v3 1/4] nand: Extend nand_(read|write)_skip_bad with *actual and limit parameters

Tom Rini trini at ti.com
Fri Mar 1 17:07:54 CET 2013


On Fri, Mar 01, 2013 at 10:57:40AM -0500, Tom Rini wrote:
> On Thu, Feb 28, 2013 at 07:37:51PM -0600, Scott Wood wrote:
> > On 02/28/2013 01:09:05 PM, Tom Rini wrote:
[snip]
> > >@@ -526,16 +543,28 @@ int nand_write_skip_bad(nand_info_t *nand,
> > >loff_t offset, size_t *length,
> > > 	if ((offset & (nand->writesize - 1)) != 0) {
> > > 		printf("Attempt to write non page-aligned data\n");
> > > 		*length = 0;
> > >+		if (actual)
> > >+			*actual = 0;
> > > 		return -EINVAL;
> > > 	}
> > 
> > Again, what about the returns in the WITH_YAFFS_OOB section?  Or if
> > we document that "actual" is undefined for error returns we can not
> > worry about this.
> 
> OK.  Currently we don't set length to 0 on WITH_YAFFS_OOB errors, but we
> ought to.  And we can deal with actual the same way.

OK, I'm going to do a follow-up patch to deal with length, and that
CONFIG_CMD_NAND_YAFFS is broken as well.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130301/f3615cfb/attachment.pgp>


More information about the U-Boot mailing list