Found ecc verify bug in nand.c

Thomas Gleixner tglx at linutronix.de
Sat Aug 17 04:16:31 EDT 2002


On Fri, 2002-08-16 at 23:13, Ken Offer wrote:
> This is a compare to see if the ecc has changed.  Unfortunately, 
> data_buf is UNSIGNED char and ecc_code is SIGNED char.  When 
> compiling under gcc 2.95.3 on a powerpc system, the code ends up 
> comparing two identical bytes and fails because one is 
> sign-extended (example: comparing 0xc3 becomes "0xc3 == 
> 0xffffffc3").  I don't know if this makes a difference with the 
> x86 compiler, but it does under powerpc.
It's a problem on other arch's too. It did not happen to me, because I
don't use the NAND_WRITE_VERIFY paranoia check :)
Thanks, fixed in CVS

-- 
Thomas 
____________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx at linutronix.de





More information about the linux-mtd mailing list