On Thu, 21 Feb 2019 11:01:58 +0100 Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote: > /** > - * nand_bch_correct_data - [NAND Interface] Detect and correct bit error(s) > - * @chip: NAND chip object > - * @buf: raw data read from the chip > - * @read_ecc: ECC from the chip > - * @calc_ecc: the ECC calculated from raw data > + * ecc_sw_bch_correct - Detect, correct and report bit error(s) > * > - * Detect and correct bit errors for a data byte block > + * @nand: NAND device > + * @buf: Raw data read from the chip > + * @read_ecc: ECC bytes from the chip > + * @calc_ecc: ECC calculated from the raw data > + * > + * Detect and correct bit errors for a data block. > */ > -int nand_bch_correct_data(struct nand_chip *chip, unsigned char *buf, > - unsigned char *read_ecc, unsigned char *calc_ecc) > +int ecc_sw_bch_correct(struct nand_device *nand, unsigned char *buf, > + unsigned char *read_ecc, unsigned char *calc_ecc) I'd keep the nand_ prefix, as ECC is employed in other places in the kernel and here the API is clearly tied to the nand_device object. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/