[PATCH 2/2] mtd: mtdconcat: Remove concat_{read|write}_oob

Zhihao Cheng chengzhihao1 at huawei.com
Fri Aug 6 19:59:32 PDT 2021


在 2021/8/7 3:26, Miquel Raynal 写道:
Hi Miquel,
>>   static int concat_erase(struct mtd_info *mtd, struct erase_info *instr)
>>   {
>>   	struct mtd_concat *concat = CONCAT(mtd);
>> @@ -684,10 +580,6 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[],	/* subdevices to c
>>   	subdev_master = mtd_get_master(subdev[0]);
>>   	if (subdev_master->_writev)
>>   		concat->mtd._writev = concat_writev;
>> -	if (subdev_master->_read_oob)
>> -		concat->mtd._read_oob = concat_read_oob;
>> -	if (subdev_master->_write_oob)
>> -		concat->mtd._write_oob = concat_write_oob;
> Actually I am not sure _read|write_oob() is the right callback to
> remove.
>
> Richard, what is your input on this? Shall we remove _read|write()
> instead? I don't remember the exact rationale behind these two helpers.

Oh, I guess I made a mistake. It looks like that reserving _{read|write}_oob is a better method in my limited knowledge to nand driver. For example, nand_do_read_oob() behaves different from nand_do_read_ops(), and calling which function is decided by mtd_oob_ops.databuf.
Callback _read_oobs() can support both functions, but callback _read() don't support nand_do_read_oob(). So mtd_read_oobs() covers mtd_read()?
Is my understand right?




More information about the linux-mtd mailing list