[MTD] [OneNAND] Use the u_char instead of char in oobbuf
authorSheng Yongjie (Sam <samsheng@trident.com.cn>
Thu, 13 Dec 2007 02:47:33 +0000 (11:47 +0900)
committerKyungmin Park <kyungmin.park@samsung.com>
Tue, 29 Jan 2008 08:13:24 +0000 (17:13 +0900)
In function onenand_verify_oob, local variable oobbuf shall be unsigned char.

In the case of a value is >= 0x80, it's unequal in comparing the value in an unsigned char and signed char.

Signed-off-by: Sheng Yongjie (Sam) <samsheng@trident.com.cn>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drivers/mtd/onenand/onenand_base.c

index 44c327a335e7d574b1e3abffacb042678d5db359..ad052c8233c2cd0ffd0e791be25ef22b0913740c 100644 (file)
@@ -1217,7 +1217,7 @@ int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from,
 static int onenand_verify_oob(struct mtd_info *mtd, const u_char *buf, loff_t to)
 {
        struct onenand_chip *this = mtd->priv;
-       char oobbuf[64];
+       u_char oobbuf[64];
        int status, i;
 
        this->command(mtd, ONENAND_CMD_READOOB, to, mtd->oobsize);