Re: [RFC PATCH 09/27] mtd: nand: ecc: Turn the software BCH implementation generic
From: Miquel Raynal <miquel.raynal@bootlin.com>
Date: 2019-02-21 12:54:09
Hi Boris, Boris Brezillon [off-list ref] wrote on Thu, 21 Feb 2019 13:26:52 +0100:
On Thu, 21 Feb 2019 11:01:58 +0100 Miquel Raynal [off-list ref] wrote:quoted
/** - * 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.
I had a looong internal conflict about it. It's longer with nand_ but you are right it is tied to the NAND core, so I'll do the change. Thanks, Miquèl _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel