Skip to contentSkip to conversation

nand_util: correct YAFFS image write function

PATCH In review Liu 4 participants 5 messages Jan 18, 2012 – May 18, 2012

Subsystems (2)
lore
Share & tools
lore

Liu

#0 lore raw

PATCH 1/1 nand_util: correct YAFFS image write function

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.

drivers/mtd/nand/nand_util.c +1 -1
index 60c778e..7ed8b18 100644
@@ -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;
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 nand_util: correct YAFFS image write function

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

thanks!

BR.
Kassey

2012/1/18 Liu, Wentao <[email protected]>:

Quoted 22 lines

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.

drivers/mtd/nand/nand_util.c +1 -2
index 60c778e..7ed8b18 100644
@@ -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

Quoted 4 lines

_______________________________________________
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

#2 lore raw

PATCH 1/1 nand_util: correct YAFFS image write function

Quoted 3 lines · Kassey Lee

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

Looks right.

-Scott

#3 lore raw

PATCH 1/1 nand_util: correct YAFFS image write function

Quoted 8 lines · Scott Wood
Quoted 3 lines · Kassey Lee

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

Looks right.

-Scott

Also looks fine to me.

Best regards,
Lei