mtd: Simplify erase handling
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | mtd: Initialize ->fail_addr early in mtd_erase()drivers/ | +2 | 2 replies | |
| 2/5 | mtd: Get rid of unused fields in struct erase_infoinclude/ | +0 | 1 reply | |
| 3/5 | mtd: Stop assuming mtd_erase() is asynchronousdrivers/ drivers/ drivers/ +16 more | +52 | 1 reply | |
| 4/5 | mtd: Unconditionally update ->fail_addr and ->addr in part_erase()drivers/ drivers/ drivers/ +15 more | +6 | 1 reply | |
| 5/5 | mtd: Stop updating erase_info->state and calling mtd_erase_callback()drivers/ drivers/ drivers/ +27 more | +20 | 5 replies |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Richard Weinberger | Miquel Raynal | Bert Kenward |
|---|---|---|---|
| 1/5 | R-b | ||
| 2/5 | R-b | ||
| 3/5 | R-b | ||
| 4/5 | R-b | ||
| 5/5 | R-b | R-b | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 0/5] mtd: Simplify erase handling
Hello,
This series aims at simplifying erase handling both in MTD drivers and MTD users code.
Historically, the erase operation has been designed to be asynchronous, which, in theory, is a good thing since erasing a block usually takes longer that reading/writing to a flash. In practice, all drivers are implementing ->_erase() in a synchronous manner. Moreover, both drivers and users are inconsistently updating/checking the erase_info fields.
In order to simplify things, let's assume ->_erase() is and will always be synchronous. This also make error code checking more consistent and allows us to get rid of a few hundred lines of code.
Regards,
Boris
Boris Brezillon (5):
mtd: Initialize ->fail_addr early in mtd_erase()
mtd: Get rid of unused fields in struct erase_info
mtd: Stop assuming mtd_erase() is asynchronous
mtd: Unconditionally update ->fail_addr and ->addr in part_erase()
mtd: Stop updating erase_info->state and calling mtd_erase_callback()
drivers/mtd/chips/cfi_cmdset_0001.c | 16 +----- drivers/mtd/chips/cfi_cmdset_0002.c | 26 ++------- drivers/mtd/chips/cfi_cmdset_0020.c | 3 -- drivers/mtd/chips/map_ram.c | 2 - drivers/mtd/devices/bcm47xxsflash.c | 12 +---- drivers/mtd/devices/block2mtd.c | 7 +-- drivers/mtd/devices/docg3.c | 16 +----- drivers/mtd/devices/lart.c | 4 -- drivers/mtd/devices/mtd_dataflash.c | 4 -- drivers/mtd/devices/mtdram.c | 2 - drivers/mtd/devices/phram.c | 2 - drivers/mtd/devices/pmc551.c | 2 - drivers/mtd/devices/powernv_flash.c | 11 +--- drivers/mtd/devices/slram.c | 2 - drivers/mtd/devices/spear_smi.c | 3 -- drivers/mtd/devices/sst25l.c | 3 -- drivers/mtd/devices/st_spi_fsm.c | 4 -- drivers/mtd/ftl.c | 52 +++--------------- drivers/mtd/inftlmount.c | 8 ++- drivers/mtd/lpddr/lpddr2_nvm.c | 10 +--- drivers/mtd/lpddr/lpddr_cmds.c | 2 - drivers/mtd/mtdblock.c | 21 -------- drivers/mtd/mtdchar.c | 34 +----------- drivers/mtd/mtdconcat.c | 48 +---------------- drivers/mtd/mtdcore.c | 17 +++--- drivers/mtd/mtdoops.c | 20 ------- drivers/mtd/mtdpart.c | 23 ++------ drivers/mtd/mtdswap.c | 34 ------------ drivers/mtd/nand/nand_base.c | 16 ++---- drivers/mtd/nand/nand_bbt.c | 1 - drivers/mtd/nftlmount.c | 5 +- drivers/mtd/onenand/onenand_base.c | 17 ------ drivers/mtd/rfd_ftl.c | 93 ++++++++++---------------------- drivers/mtd/sm_ftl.c | 19 ------- drivers/mtd/sm_ftl.h | 4 -- drivers/mtd/spi-nor/spi-nor.c | 3 -- drivers/mtd/tests/mtd_test.c | 5 -- drivers/mtd/tests/speedtest.c | 7 --- drivers/mtd/ubi/gluebi.c | 3 -- drivers/mtd/ubi/io.c | 36 ------------- drivers/net/ethernet/sfc/falcon/mtd.c | 11 +--- drivers/net/ethernet/sfc/mtd.c | 11 +--- drivers/staging/goldfish/goldfish_nand.c | 3 -- fs/jffs2/erase.c | 37 ++----------- include/linux/mtd/mtd.h | 19 +------ 45 files changed, 79 insertions(+), 599 deletions(-)
Signature · 1 line
2.14.1