public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] nand_util: correct YAFFS image write function
@ 2012-01-18  5:55 Liu, Wentao
  2012-01-20  6:17 ` Kassey Lee
  2012-05-18 23:10 ` [U-Boot] " Scott Wood
  0 siblings, 2 replies; 5+ messages in thread
From: Liu, Wentao @ 2012-01-18  5:55 UTC (permalink / raw)
  To: u-boot

In function nand_write_skip_bad(),for YAFFS filesystem part,
write_oob() will return 0 when success, so when rval equals 0,
it should continue to write the next page, and no break.

Signed-off-by: Wentao, Liu <wentao.liu@intel.com>

diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index 60c778e..7ed8b18 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/drivers/mtd/nand/nand_util.c
@@ -564,7 +564,7 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
 				ops.oobbuf = ops.datbuf + pagesize;
 
 				rval = nand->write_oob(nand, offset, &ops);
-				if (!rval)
+				if (rval != 0)
 					break;
 
 				offset += pagesize;
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] nand_util: correct YAFFS image write function
  2012-01-18  5:55 [U-Boot] [PATCH] nand_util: correct YAFFS image write function Liu, Wentao
@ 2012-01-20  6:17 ` Kassey Lee
  2012-01-20 20:46   ` Scott Wood
  2012-05-18 23:10 ` [U-Boot] " Scott Wood
  1 sibling, 1 reply; 5+ messages in thread
From: Kassey Lee @ 2012-01-20  6:17 UTC (permalink / raw)
  To: u-boot

hi, Lei, Scott:
     I think this is correct,
     do you have some comments ?

thanks!

BR.
Kassey


2012/1/18 Liu, Wentao <wentao.liu@intel.com>:
> In function nand_write_skip_bad(),for YAFFS filesystem part,
> write_oob() will return 0 when success, so when rval equals 0,
> it should continue to write the next page, and no break.
>
> Signed-off-by: Wentao, Liu <wentao.liu@intel.com>
>
> diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
> index 60c778e..7ed8b18 100644
> --- a/drivers/mtd/nand/nand_util.c
> +++ b/drivers/mtd/nand/nand_util.c
> @@ -564,7 +564,7 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ops.oobbuf = ops.datbuf + pagesize;
>
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?rval = nand->write_oob(nand, offset, &ops);
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (!rval)
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (rval != 0)
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?break;
>
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?offset += pagesize;
> --
> 1.7.4.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot



--
Best regards
Kassey

Intel Mobile Communication ?Xi'an, China PRC

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] nand_util: correct YAFFS image write function
  2012-01-20  6:17 ` Kassey Lee
@ 2012-01-20 20:46   ` Scott Wood
  2012-01-24  9:40     ` Lei Wen
  0 siblings, 1 reply; 5+ messages in thread
From: Scott Wood @ 2012-01-20 20:46 UTC (permalink / raw)
  To: u-boot

On 01/20/2012 12:17 AM, Kassey Lee wrote:
> hi, Lei, Scott:
>      I think this is correct,
>      do you have some comments ?

Looks right.

-Scott

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] nand_util: correct YAFFS image write function
  2012-01-20 20:46   ` Scott Wood
@ 2012-01-24  9:40     ` Lei Wen
  0 siblings, 0 replies; 5+ messages in thread
From: Lei Wen @ 2012-01-24  9:40 UTC (permalink / raw)
  To: u-boot

On Sat, Jan 21, 2012 at 4:46 AM, Scott Wood <scottwood@freescale.com> wrote:
> On 01/20/2012 12:17 AM, Kassey Lee wrote:
>> hi, Lei, Scott:
>> ? ? ?I think this is correct,
>> ? ? ?do you have some comments ?
>
> Looks right.
>
> -Scott


Also looks fine to me.
Acked-by: Lei Wen <leiwen@marvell.com>

Best regards,
Lei

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] nand_util: correct YAFFS image write function
  2012-01-18  5:55 [U-Boot] [PATCH] nand_util: correct YAFFS image write function Liu, Wentao
  2012-01-20  6:17 ` Kassey Lee
@ 2012-05-18 23:10 ` Scott Wood
  1 sibling, 0 replies; 5+ messages in thread
From: Scott Wood @ 2012-05-18 23:10 UTC (permalink / raw)
  To: u-boot

On Tue, Jan 17, 2012 at 07:55:02PM -0000, Liu wrote:
> In function nand_write_skip_bad(),for YAFFS filesystem part,
> write_oob() will return 0 when success, so when rval equals 0,
> it should continue to write the next page, and no break.
> 
> Signed-off-by: Wentao, Liu <wentao.liu@intel.com>
> Acked-by: Lei Wen <leiwen@marvell.com>

Applied to u-boot-nand-flash (sorry about the delay)

-Scott

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-18 23:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-18  5:55 [U-Boot] [PATCH] nand_util: correct YAFFS image write function Liu, Wentao
2012-01-20  6:17 ` Kassey Lee
2012-01-20 20:46   ` Scott Wood
2012-01-24  9:40     ` Lei Wen
2012-05-18 23:10 ` [U-Boot] " Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox