Skip to content

mtd: get rid of direct mtd->func use

Artem Bityutskiy linux-fsdevel linux-mtd 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17mtd: introduce mtd_has_oob helperdrivers/mtd/mtdchar.c drivers/mtd/sm_ftl.c include/linux/mtd/mtd.h+8 -30 replies
2/17mtd: do use mtd->point directlyfs/jffs2/erase.c fs/jffs2/readinode.c fs/jffs2/scan.c +1 more+15 -162 replies
3/17mtd: do not use mtd->get_unmapped_area directlydrivers/mtd/mtdchar.c drivers/mtd/mtdconcat.c include/linux/mtd/mtd.h+14 -200 replies
4/17romfs: do not use mtd->get_unmapped_area directlyfs/romfs/mmap-nommu.c+13 -150 replies
5/17mtd: mtdoops: do not use mtd->panic_write directlydrivers/mtd/mtdoops.c include/linux/mtd/mtd.h+10 -90 replies
6/17mtd: do not use mtd->read_oob directlydrivers/mtd/mtdchar.c include/linux/mtd/mtd.h+6 -70 replies
7/17mtd: do not use mtd->get_*_prot_info directlydrivers/mtd/mtdchar.c include/linux/mtd/mtd.h+7 -50 replies
8/17mtd: do not use mtd->read_*_prot_reg directlydrivers/mtd/mtdchar.c include/linux/mtd/mtd.h+14 -80 replies
9/17mtd: mtd->write_user_prot_reg directlydrivers/mtd/mtdchar.c include/linux/mtd/mtd.h+2 -40 replies
10/17mtd: do not use mtd->lock_user_prot_reg directlydrivers/mtd/mtdchar.c include/linux/mtd/mtd.h+2 -20 replies
11/17mtd: harmonize mtd_writev usagedrivers/mtd/devices/block2mtd.c drivers/mtd/mtdcore.c fs/jffs2/writev.c +1 more+27 -230 replies
12/17mtd: do not use mtd->sync directlydrivers/mtd/ftl.c drivers/mtd/mtdblock.c drivers/mtd/mtdchar.c +6 more+11 -210 replies
13/17mtd: do not use mtd->lock, unlock and is_locked directlydrivers/mtd/maps/scb2_flash.c drivers/mtd/mtdchar.c drivers/mtd/mtdconcat.c +2 more+19 -290 replies
14/17mtd: do not use mtd->suspend and mtd->resume directlydrivers/mtd/maps/physmap.c drivers/mtd/maps/rbtx4939-flash.c drivers/mtd/mtdcore.c +1 more+9 -110 replies
15/17mtd: introduce mtd_can_have_bb helperdrivers/mtd/mtdchar.c drivers/mtd/mtdconcat.c drivers/mtd/mtdoops.c +9 more+21 -200 replies
16/17logfs: do not use 'mtd->block_isbad' directlyfs/logfs/dev_mtd.c+2 -20 replies
17/17mtd: do not use mtd->block_markbad directlydrivers/mtd/mtdchar.c drivers/mtd/mtdconcat.c drivers/mtd/mtdoops.c +3 more+6 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/17] mtd: get rid of direct mtd->func use

Hi,

this patch-set goes on top of the "MTD API rework" patches which I sent recently:

http://lists.infradead.org/pipermail/linux-mtd/2011-December/039031.html

This patch-set further removes direct mtd function pointers accesses like:

if (mtd->block_isbad)
blah

This is a part of the big MTD API re-work we have started. The next steps will be:

1. Rename all the function pointers to make sure we catch all direct uses:
(s/mtd->func/mtd->_func/g)
2. Move common input parameters check from implementations to the wrapper function to get rid of duplication.

Artem.