[PATCH 3/3] mtd: support a cleanup callback for partition parsers

Boris Brezillon boris.brezillon at free-electrons.com
Wed Dec 2 00:55:00 PST 2015


On Tue, 1 Dec 2015 19:12:09 -0800
Brian Norris <computersforpeace at gmail.com> wrote:

> On Tue, Dec 01, 2015 at 01:37:32PM +0100, Boris Brezillon wrote:
> > On Mon, 30 Nov 2015 15:53:40 -0800
> > Brian Norris <computersforpeace at gmail.com> wrote:
> > > On Mon, Nov 30, 2015 at 07:36:24PM +0100, Boris Brezillon wrote:
> > > > What do you think?
> > > 
> > > I guess I do like the idea of hiding the handling of the parser
> > > reference so mtd_device_parse_register() doesn't have to track the
> > > parser directly. I'll admit I didn't like yet another
> > > return-by-pointer-argument, but I didn't bother finding a better
> > > solution at the time.
> > > 
> > > About the extra parser field: it's awkward that you assume the first
> > > partition has the reference, making all the other instances of that
> > > field pointless. Maybe a new mtd_partitions struct would be nice for
> > > encapsulating everything properly.
> > 
> > Agreed. I just wanted to show that with a minimal amount of changes we
> > could have a simpler implementation, but I clearly prefer the
> > mtd_partitions approach.
> 
> OK, do you want to roll up all the suggestions into a new patch series,
> or should I?

If you don't mind and have some time I'll let you do it ;-).

Thanks,

Boris

-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com



More information about the linux-mtd mailing list