fixing rightshift in nand_block_bad
PATCH 1/1 fixing rightshift in nand_block_bad
As was discussed in the IRC chat, it's necessary to shift value obtained read_word from right by 8 in case of odd this->badblockpos. The patch from that is inlined below.
Best regards,
Vitaly
Index: drivers/mtd/nand/nand_base.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand_base.c,v retrieving revision 1.150
mtd/nand/nand_base.c +1 -1
@@ -433,7 +433,7 @@ this->cmdfunc (mtd,NAND_CMD_READOOB , this->badblockpos &0xFE , page & this->pagemask); bad =cpu_to_le16 (this->read_word (mtd));if (this->badblockpos &0x1 ) - bad >>=1 ; + bad >>=8 ;if ((bad &0xFF ) !=0xff ) res =1 ; }else {