linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] mtd: partitions: support cleanup callback for parsers
@ 2015-12-04 23:25 Brian Norris
  2015-12-04 23:25 ` [PATCH v2 1/6] mtd: ofpart: assign return argument exactly once Brian Norris
                   ` (6 more replies)
  0 siblings, 7 replies; 23+ messages in thread
From: Brian Norris @ 2015-12-04 23:25 UTC (permalink / raw)
  To: linux-mtd; +Cc: Brian Norris, Boris Brezillon, Linus Walleij, Simon Arlott

Hi,

Here's v2, which should address the comments made on v1.

Currently, we assume that all of the resources used by partition parsers can be
cleaned up with a single kfree(), but that can be burdensome to work around.
This series (particularly, patch 6) supports a cleanup() callback for parsers.

v1 -> v2:
 * add "mtd_partitions" struct to hold info about the array of parsed partitions
 * const-ify some arguments, which requires some small refactoring of the
   existing partitions parsers
 * remove the kmemdup() in mtd_device_parse_register()
 * provide default cleanup routine for parsers that don't have one (all
   parsers, ATM)
 * put more common logic in mtd_part_parser_cleanup(), to avoid making the
   caller worry about some of the reference counting
 * (hopefully) less convoluted error handling in mtd_device_parse_register()

Brian

Brian Norris (6):
  mtd: ofpart: assign return argument exactly once
  mtd: partitions: make parsers return 'const' partition arrays
  mtd: partitions: rename MTD parser get/put
  mtd: partitions: remove kmemdup()
  mtd: partitions: pass around 'mtd_partitions' wrapper struct
  mtd: partitions: support a cleanup callback for parsers

 drivers/mtd/afs.c              |  2 +-
 drivers/mtd/ar7part.c          |  2 +-
 drivers/mtd/bcm47xxpart.c      |  2 +-
 drivers/mtd/bcm63xxpart.c      |  2 +-
 drivers/mtd/cmdlinepart.c      |  2 +-
 drivers/mtd/mtdcore.c          | 39 +++++++++++++++-------------
 drivers/mtd/mtdcore.h          |  7 ++++-
 drivers/mtd/mtdpart.c          | 59 +++++++++++++++++++++++++++++++++---------
 drivers/mtd/ofpart.c           | 39 +++++++++++++++-------------
 drivers/mtd/redboot.c          |  2 +-
 include/linux/mtd/partitions.h | 10 ++++++-
 11 files changed, 110 insertions(+), 56 deletions(-)

-- 
2.6.0.rc2.230.g3dd15c0

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2015-12-09 23:01 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-04 23:25 [PATCH v2 0/6] mtd: partitions: support cleanup callback for parsers Brian Norris
2015-12-04 23:25 ` [PATCH v2 1/6] mtd: ofpart: assign return argument exactly once Brian Norris
2015-12-04 23:57   ` Boris Brezillon
2015-12-04 23:25 ` [PATCH v2 2/6] mtd: partitions: make parsers return 'const' partition arrays Brian Norris
2015-12-04 23:58   ` Boris Brezillon
2015-12-04 23:25 ` [PATCH v2 3/6] mtd: partitions: rename MTD parser get/put Brian Norris
2015-12-05  0:00   ` Boris Brezillon
2015-12-05  0:02     ` Brian Norris
2015-12-04 23:25 ` [PATCH v2 4/6] mtd: partitions: remove kmemdup() Brian Norris
2015-12-05  0:00   ` Boris Brezillon
2015-12-04 23:25 ` [PATCH v2 5/6] mtd: partitions: pass around 'mtd_partitions' wrapper struct Brian Norris
2015-12-05  0:30   ` Boris Brezillon
2015-12-05  0:41     ` Boris Brezillon
2015-12-05  1:45     ` Brian Norris
2015-12-05  4:18       ` Brian Norris
2015-12-05  8:18         ` Boris Brezillon
2015-12-05  8:27       ` Boris Brezillon
2015-12-04 23:25 ` [PATCH v2 6/6] mtd: partitions: support a cleanup callback for parsers Brian Norris
2015-12-05  0:33   ` Boris Brezillon
2015-12-09 18:24   ` [PATCH v3 " Brian Norris
2015-12-09 21:46     ` Boris Brezillon
2015-12-09 23:00       ` Brian Norris
2015-12-09 18:25 ` [PATCH v2 0/6] mtd: partitions: support " Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).