---
name: "nand_correct_data"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/nand_correct_data"
---

# nand\_correct\_data(9)

\[NAND Interface\] Detect and correct bit error(s)

## NAME

nand\_correct\_data - \[NAND Interface\] Detect and correct bit error(s)

## SYNOPSIS

**int nand\_correct\_data(struct mtd\_info \*** *mtd***, unsigned char \*** *buf***, unsigned char \*** *read\_ecc***, unsigned char \*** *calc\_ecc***);**

## ARGUMENTS

*mtd*

MTD block structure

*buf*

raw data read from the chip

*read\_ecc*

ECC from the chip

*calc\_ecc*

the ECC calculated from raw data

## DESCRIPTION

Detect and correct a 1 bit error for 256/512 byte block

## AUTHOR

**Thomas Gleixner** \<tglx@linutronix.de\>

Author.

## COPYRIGHT
