From: Jamie Iles <jamie@jamieiles.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
Jamie Iles <jamie@jamieiles.com>,
linux-mtd@lists.infradead.org, Daniel Drake <dsd@laptop.org>,
linux-kernel@vger.kernel.org
Subject: Re: MTD-related kobject badness during linux-next boot
Date: Tue, 2 Aug 2011 23:53:16 +0100 [thread overview]
Message-ID: <20110802225316.GF5063@pulham.picochip.com> (raw)
In-Reply-To: <CAN8TOE9mWEmS5YJqNrS9OrG=t+emeLcXNpKR1BiZ6VDJW7_c=A@mail.gmail.com>
Hi Brian,
On Tue, Aug 02, 2011 at 10:40:29AM -0700, Brian Norris wrote:
> Since Dmitry's change, it looks like cafe_nand will add the master
> device, then parse and register its partitions, if found. However, if
> partitions are NOT found, then mtd_device_parse_register() falls back
> to adding the master device, which was already added. In
> drivers/mtd/mtdcore.c, see:
>
> int mtd_device_parse_register(struct mtd_info *mtd, const char **types,
> ...
> if (err > 0) {
> ...
> } else if (err == 0) {
> err = add_mtd_device(mtd);
> ...
>
>
> So it looks like perhaps we can solve the problem by just killing the
> "register the whole device first" and allow mtd_device_parse_register
> to do it if there are no partitions. Any cafe_nand developers know if
> this is a problem? i.e., is there a reason we need both the whole
> device AND the partitions sent to add_mtd_device()? I'll send a full
> patch with sign-off and description if there are no objections.
I think that's the right thing to do. There's actually a comment in
drivers/mtd/mtdpart.c saying:
/* NOTE: we don't arrange MTDs as a tree; it'd be error-prone
* to have the same data be in two different partitions.
*/
So I do think it should be the whole device *or* the partitions. In any
case, your patch looks good to me.
Jamie
next prev parent reply other threads:[~2011-08-02 22:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-14 17:37 MTD-related kobject badness during linux-next boot Daniel Drake
2011-08-02 17:40 ` Brian Norris
2011-08-02 17:58 ` Daniel Drake
2011-08-02 18:05 ` Brian Norris
2011-08-02 22:53 ` Jamie Iles [this message]
2011-08-02 23:38 ` [PATCH] mtd: cafe_nand: register master MTD at most once Brian Norris
2011-08-15 15:31 ` Artem Bityutskiy
2011-08-15 17:41 ` Brian Norris
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=20110802225316.GF5063@pulham.picochip.com \
--to=jamie@jamieiles.com \
--cc=computersforpeace@gmail.com \
--cc=dbaryshkov@gmail.com \
--cc=dsd@laptop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
/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