Skip to content

Commit

Permalink
[MTD] [OneNAND] Use the u_char instead of char in oobbuf
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sheng Yongjie (Sam authored and Kyungmin Park committed Jan 29, 2008
1 parent b2581be commit 978cb38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/onenand/onenand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 978cb38

Please sign in to comment.