From: Brian Norris <computersforpeace@gmail.com>
To: Michal Suchanek <hramrach@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] mtd: ofpart: do not fail probe when no partitions exist
Date: Mon, 27 Jul 2015 13:39:24 -0700 [thread overview]
Message-ID: <20150727203924.GQ8876@google.com> (raw)
In-Reply-To: <2feb6039b908bbe7daf98c0fc3b7c8f725c36ac3.1438028045.git.hramrach@gmail.com>
On Mon, Jul 27, 2015 at 08:30:43PM -0000, Michal Suchanek wrote:
...
> The controller-data node contains no partition information and no other
> subnodes with partition information exist.
>
> The ofpart code returns an error when there are subnodes of the flash DT
> node but no partitions are found. This error is then propagated to
> mtdpart which propagetes it to MTD probe which fails probing the flash
> device.
>
> Change this condition to a warning so that flash without partitions can
> be accessed on Exynos with ofpart support compiled in.
You never replied to my suggestion here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/352206.html
Particularly, "just define a proper compatibile property for [the
'controller-data'] subnode, and ofpart.c will naturally handle this".
> Signed-off-by: Michal Suchanek <hramrach@gmail.com>
>
> --
> - add more verbose explanation
> ---
> drivers/mtd/ofpart.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c
> index aa26c32..a29d29f 100644
> --- a/drivers/mtd/ofpart.c
> +++ b/drivers/mtd/ofpart.c
> @@ -94,10 +94,10 @@ static int parse_ofpart_partitions(struct mtd_info *master,
>
> if (!i) {
> of_node_put(pp);
> - pr_err("No valid partition found on %s\n", node->full_name);
> + pr_warn("No valid partition found on %s\n", node->full_name);
> kfree(*pparts);
> *pparts = NULL;
> - return -EINVAL;
> + return 0;
I don't really like this, since it can turn other invalid device trees
into a silent fallback. I'd really prefer we make it easy to tell the
difference between a MTD partition subnode and another foo-bar subnode.
> }
>
> return nr_parts;
Brian
next prev parent reply other threads:[~2015-07-27 20:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-27 20:30 [PATCH 0/3] Improve mtdpart robustness Michal Suchanek
2015-07-27 20:30 ` [PATCH 3/3] mtd: mtdpart: Do not fail mtd probe when parsing partitions fails Michal Suchanek
2015-07-27 20:30 ` [PATCH 1/3] mtd: mtdpart: add debug prints to partition parser Michal Suchanek
2015-07-27 20:30 ` [PATCH 2/3] mtd: ofpart: do not fail probe when no partitions exist Michal Suchanek
2015-07-27 20:39 ` Brian Norris [this message]
2015-07-28 8:17 ` Michal Suchanek
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=20150727203924.GQ8876@google.com \
--to=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=hramrach@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.