mtd: nand: omap_gpmc: Fix update of read_ecc in oob
We need to flip only one bit not assign. Signed-off-by: Marek Belisko <marek.belisko@gmail.com> Acked-by: Pekon Gupta <pekon@ti.com>
This commit is contained in:
@@ -403,7 +403,7 @@ static int omap_correct_data_bch(struct mtd_info *mtd, uint8_t *dat,
|
|||||||
dat[byte_pos] ^= 1 << bit_pos;
|
dat[byte_pos] ^= 1 << bit_pos;
|
||||||
printf("nand: bit-flip corrected @data=%d\n", byte_pos);
|
printf("nand: bit-flip corrected @data=%d\n", byte_pos);
|
||||||
} else if (byte_pos < error_max) {
|
} else if (byte_pos < error_max) {
|
||||||
read_ecc[byte_pos - SECTOR_BYTES] = 1 << bit_pos;
|
read_ecc[byte_pos - SECTOR_BYTES] ^= 1 << bit_pos;
|
||||||
printf("nand: bit-flip corrected @oob=%d\n", byte_pos -
|
printf("nand: bit-flip corrected @oob=%d\n", byte_pos -
|
||||||
SECTOR_BYTES);
|
SECTOR_BYTES);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user