public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Scott Wood <oss@buserror.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/7] nand: add nand mtd concat support
Date: Fri, 03 Jun 2016 17:30:45 -0500	[thread overview]
Message-ID: <1464993045.22191.27.camel@buserror.net> (raw)
In-Reply-To: <574FBDC9.6010002@denx.de>

On Thu, 2016-06-02 at 07:02 +0200, Heiko Schocher wrote:
> Hello Scott,
> 
> Am 02.06.2016 um 02:09 schrieb Scott Wood:
> > On Tue, 2016-05-31 at 14:08 +0200, Heiko Schocher wrote:
> > > @@ -59,6 +64,9 @@ int nand_register(int devnum, struct mtd_info *mtd)
> > >   	 * via the mtdcore infrastructure (e.g. ubi).
> > >   	 */
> > >   	add_mtd_device(mtd);
> > > +#ifdef CONFIG_MTD_CONCAT
> > > +	nand_devices_found++;
> > > +#endif
> > >   #endif
> > [snip]
> > > +		sprintf(c_mtd_name, "nand%d", nand_devices_found);
> > > +		mtd = mtd_concat_create(nand_info, nand_devices_found,
> > > +					c_mtd_name);
> > 
> > This assumes that there are no gaps in the NAND numbering (e.g. because
> > some
> > device was optional or failed to init).  It would be better to build an
> > array
> > by scanning nand_info[] for non-NULL devices.
> 
> Yes, you are right ... Hmm... thinking about it ... this did exactly
> my v1 ... I created such an array "mtd_nand_list" ... Ok, this
> "mtd_nand_list" was a variable in file scope ... but as it is an array
> of pointers, the mem footprint is not so big ...

My concern was code organization, not (just) footprint.

>  but if you find it
> better to scan nand_info and create a new array on stack, I can do
> this ... what way do you preffer?

On the stack.

-Scott

  reply	other threads:[~2016-06-03 22:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31 12:08 [U-Boot] [PATCH v2 0/7] add support for the etamin draco board variant Heiko Schocher
2016-05-31 12:08 ` [U-Boot] [PATCH v2 1/7] siemens,am33x: add ubi fastmap support Heiko Schocher
2016-05-31 12:08 ` [U-Boot] [PATCH v2 2/7] ubi: add new ubi command "ubi detach" Heiko Schocher
2016-05-31 12:08 ` [U-Boot] [PATCH v2 3/7] nand: add nand mtd concat support Heiko Schocher
2016-06-02  0:09   ` Scott Wood
2016-06-02  5:02     ` Heiko Schocher
2016-06-03 22:30       ` Scott Wood [this message]
2016-05-31 12:08 ` [U-Boot] [PATCH v2 4/7] mtd: nand: omap: allow to switch to BCH16 Heiko Schocher
2016-05-31 12:08 ` [U-Boot] [PATCH v2 5/7] am335x, dxr2: get ECC sType from I2C eeprom Heiko Schocher
2016-05-31 12:08 ` [U-Boot] [PATCH v2 6/7] dfu, nand, ubi: fix erasing after write finish Heiko Schocher
2016-05-31 14:43   ` Lukasz Majewski
2016-05-31 12:08 ` [U-Boot] [PATCH v2 7/7] siemens,am33x: add draco etamin board Heiko Schocher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1464993045.22191.27.camel@buserror.net \
    --to=oss@buserror.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox