Hi Boris, I used the wrong branch, there are bugs in this version, I will send a v3. Boris Brezillon <bbrezillon@xxxxxxxxxx> wrote on Wed, 16 Jan 2019 18:23:31 +0100: > On Wed, 16 Jan 2019 17:21:44 +0100 > Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote: > > > Instead of collecting partitions in a flat list, create a hierarchy > > within the mtd_info structure: use a partitions list to keep track of > > the partitions of an MTD device (which might be itself a partition of > > another MTD device), a pointer to the parent device (NULL when the MTD > > device is the root one, not a partition). > > > > By also saving directly in mtd_info the offset of the partition, we > > can get rid of the mtd_part structure. > > > > All part_*() helpers are removed, the corresponding mtd_*() helpers > > are updated to handle the partitions themselves. > > > > The part_absolute_offset() helper is also replaced by > > mtd_get_master_offset() which is very similar but not recursive and > > accepts an additional offset. Plus, it is used in both mtdcore and > > mtdpart. > > > > While at it, be consistent in the naming of the mtd_info structures to > > ease the understanding of the new hierarchy: these structures are > > usually called 'mtd', unless there are multiple instances of the same > > structure. In this case, there is usually a parent/child bound so we > > will call them 'parent' and 'child'. > > Looking at the code it seems like names employed are actually 'master' > and 'mtd'. Actually it depends where, I will update the commit log (and possibly the code as well) as: * mtd is used when there is only one mtd_info in the game * parent/child (or parent/mtd) is used when there is a direct relationship * the root device is called master Thanks, Miquèl ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/