/* Read ECC information from a spare area using the given scheme.  */
void nand_flash_spare_scheme_read_ecc(const struct nand_flash_spare_scheme *scheme, const uint8_t *spare, uint8_t *ecc)
/* Read ECC information from a spare area using the given scheme.  */
void nand_flash_spare_scheme_read_ecc(const struct nand_flash_spare_scheme *scheme, const uint8_t *spare, uint8_t *ecc)
{
	uint32_t i;
	for (i = 0; i < scheme->ecc_byte_number; i++) {
		ecc[i] = spare[scheme->ecc_bytes_positions[i]];
	}
}