Skip to content

Commit 3f4c0ad

Browse files
committed
mtd: nand: Rename the NAND IO iteration helper
Soon a helper for iterating over blocks will be needed (for continuous read purposes). In order to clarify the intend of this helper, let's rename it with the "page" wording inside. While at it, improve the doc and fix a typo. Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Pratyush Yadav <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent b59fdc7 commit 3f4c0ad

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

include/linux/mtd/nand.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -906,19 +906,19 @@ static inline void nanddev_pos_next_page(struct nand_device *nand,
906906
}
907907

908908
/**
909-
* nand_io_iter_init - Initialize a NAND I/O iterator
909+
* nand_io_page_iter_init - Initialize a NAND I/O iterator
910910
* @nand: NAND device
911911
* @offs: absolute offset
912912
* @req: MTD request
913913
* @iter: NAND I/O iterator
914914
*
915915
* Initializes a NAND iterator based on the information passed by the MTD
916-
* layer.
916+
* layer for page jumps.
917917
*/
918-
static inline void nanddev_io_iter_init(struct nand_device *nand,
919-
enum nand_page_io_req_type reqtype,
920-
loff_t offs, struct mtd_oob_ops *req,
921-
struct nand_io_iter *iter)
918+
static inline void nanddev_io_page_iter_init(struct nand_device *nand,
919+
enum nand_page_io_req_type reqtype,
920+
loff_t offs, struct mtd_oob_ops *req,
921+
struct nand_io_iter *iter)
922922
{
923923
struct mtd_info *mtd = nanddev_to_mtd(nand);
924924

@@ -990,10 +990,10 @@ static inline bool nanddev_io_iter_end(struct nand_device *nand,
990990
* @req: MTD I/O request
991991
* @iter: NAND I/O iterator
992992
*
993-
* Should be used for iterate over pages that are contained in an MTD request.
993+
* Should be used for iterating over pages that are contained in an MTD request.
994994
*/
995995
#define nanddev_io_for_each_page(nand, type, start, req, iter) \
996-
for (nanddev_io_iter_init(nand, type, start, req, iter); \
996+
for (nanddev_io_page_iter_init(nand, type, start, req, iter); \
997997
!nanddev_io_iter_end(nand, iter); \
998998
nanddev_io_iter_next_page(nand, iter))
999999

0 commit comments

Comments
 (0)