Skip to content

mtd: simplify mtd_device_parse_register code

Rafał Miłecki linux-mtd 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 2 repliesIn review
  2. v32 patches 0 repliesSuperseded
  3. v22 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches4 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mtd: move code adding master MTD out of mtd_add_device_partitionsdrivers/mtd/mtdcore.c+13 -120 replies
2/2mtd: get rid of the mtd_add_device_partitions()drivers/mtd/mtdcore.c+12 -310 replies

Reviews trailers per patch

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

Read the v4 thread

Cover letter [PATCH V4 0/2] mtd: simplify mtd_device_parse_register code

From: Rafał Miłecki <[email protected]>

Even though I have some experience with MTD subsystem every time I was starting working on it I had to do some quick research on the code flow. I think there is some place for cleanup and optimization that would simplify overall code and allow new developers to start working on it more easily.

In these patches I meant to slightly simplify mtd_device_parse_register function. I think we could reduce amount of add/register/del functions and this is the first step for that.

Ideally I think mtdcore.c shouldn't handle parsing but just use a single function from mtdpart.c.

Patch 1/2 modifies code to make sure parsing code is not mixed with MTD master code. This should allow moving parsing parts to the mtdpart.c in the future.

Patch 2/2 simplifies code and makes sure parsing is handled at 1 place only.

Even though this cleanup isn't complete I think it already has some value and could be accepted (if there won't be objections) on its own. It's also quite small which should allow reviewing it easily.

Rafał Miłecki (2):
mtd: move code adding master MTD out of mtd_add_device_partitions
mtd: get rid of the mtd_add_device_partitions function

 drivers/mtd/mtdcore.c | 58 ++++++++++++++++++---------------------------------
 1 file changed, 20 insertions(+), 38 deletions(-)
Signature · 1 line
2.11.0