Skip to contentSkip to conversation

mtd: remove stale comment in mtd_oob_ops structure

PATCH In review Miquel Raynal 2 participants 2 messages Jul 14, 2018 – Jul 26, 2018 Memory technology devices (MTD)

lore
Share & tools
lore

Miquel Raynal

author maintainer
#0 lore raw

PATCH 1/1 mtd: remove stale comment in mtd_oob_ops structure

A comment in the kernel doc of the mtd_oob_ops structure tells that it is not possible to write more than one page with OOB. This was probably true at some time in the past but today it is entirely wrong.

As one can see for instance in the nand_do_write_ops() helper available in the NAND core, this implementation called by mtd->_write_oob() simply loops over the pages until everything has been written.

---
 include/linux/mtd/mtd.h | 4 ----
 1 file changed, 4 deletions(-)
include/linux/mtd/mtd.h +0 -4
index 0c41140465..823e535b82 100644
@@ -75,10 +75,6 @@ struct mtd_erase_region_info {
  *		mode = MTD_OPS_PLACE_OOB or MTD_OPS_RAW)
  * @datbuf:	data buffer - if NULL only oob data are read/written
  * @oobbuf:	oob data buffer
- *
- * Note, it is allowed to read more than one OOB area at one go, but not write.
- * The interface assumes that the OOB write requests program only one page's
- * OOB area.
  */
 struct mtd_oob_ops {
 	unsigned int	mode;
Signature · 1 line
2.14.1
#1 lore raw
Quoted 9 lines · Miquel Raynal

A comment in the kernel doc of the mtd_oob_ops structure tells that it is not possible to write more than one page with OOB. This was probably true at some time in the past but today it is entirely wrong.

As one can see for instance in the nand_do_write_ops() helper available in the NAND core, this implementation called by mtd->_write_oob() simply loops over the pages until everything has been written.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180726/9b82745a/attachment.sig>