---
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(unsigned char \*** *buf***, unsigned char \*** *read\_ecc***, unsigned char \*** *calc\_ecc***, unsigned int** *eccsize***);**

## ARGUMENTS

*buf*

raw data read from the chip

*read\_ecc*

ECC from the chip

*calc\_ecc*

the ECC calculated from raw data

*eccsize*

data bytes per ECC step (256 or 512)

## DESCRIPTION

Detect and correct a 1 bit error for eccsize byte block

## AUTHOR

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

Author.

## COPYRIGHT
