From: "Ivan T. Ivanov" <iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
To: frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Josh Cartwright <joshc-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Courtney Cavin
<courtney.cavin-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>,
Bjorn Andersson <bjorn-UYDU3/A3LUY@public.gmane.org>,
Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH 2/4] of/platform: return error on of_platform_device_create_pdata failure
Date: Wed, 14 May 2014 10:43:46 +0300 [thread overview]
Message-ID: <1400053426.8431.13.camel@iivanov-dev> (raw)
In-Reply-To: <53728173.7050508-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Tue, 2014-05-13 at 13:32 -0700, Frank Rowand wrote:
> On 5/13/2014 10:56 AM, Olof Johansson wrote:
> > On Wed, May 07, 2014 at 04:48:16PM -0500, Rob Herring wrote:
> >> From: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> >>
> >> of_platform_populate does not return an error if creating the platform
> >> device fails. This means almost any error from driver core cannot be
> >> detected by the caller. Fix this.
> >>
> >> Signed-off-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> >> ---
> >> drivers/of/platform.c | 4 +++-
> >> 1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> >> index 404d1da..622aeb3 100644
> >> --- a/drivers/of/platform.c
> >> +++ b/drivers/of/platform.c
> >> @@ -391,7 +391,9 @@ static int of_platform_bus_create(struct device_node *bus,
> >> }
> >>
> >> dev = of_platform_device_create_pdata(bus, bus_id, platform_data, parent);
> >> - if (!dev || !of_match_node(matches, bus))
> >> + if (!dev)
> >> + return -ENODEV;
> >> + if (!of_match_node(matches, bus))
> >> return 0;
> >>
> >> for_each_child_of_node(bus, child) {
> >
> > This patch caused every single MMC driver to break on OF platforms, as far
> > as I can tell. Reverting it on last night's -next seems to resolve it.
> >
> > The problem seems to be that of_platform_populate() will bail on the
> > first device that fails this.
> >
> > How did you test this code, Frank? On what platform? Practically all my
> > targets here failed to mount rootfs from eMMC or SD card...
>
> I tested on a dragonboard, but without a working sdhci driver. Thus I would not
> have hit the error.
Same here.
Regards,
Ivan
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
To: frowand.list@gmail.com
Cc: Olof Johansson <olof@lixom.net>,
Rob Herring <robherring2@gmail.com>,
Grant Likely <grant.likely@linaro.org>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Josh Cartwright <joshc@codeaurora.org>,
Courtney Cavin <courtney.cavin@sonymobile.com>,
Bjorn Andersson <bjorn@kryo.se>, Rob Herring <robh@kernel.org>
Subject: Re: [PATCH 2/4] of/platform: return error on of_platform_device_create_pdata failure
Date: Wed, 14 May 2014 10:43:46 +0300 [thread overview]
Message-ID: <1400053426.8431.13.camel@iivanov-dev> (raw)
In-Reply-To: <53728173.7050508@gmail.com>
On Tue, 2014-05-13 at 13:32 -0700, Frank Rowand wrote:
> On 5/13/2014 10:56 AM, Olof Johansson wrote:
> > On Wed, May 07, 2014 at 04:48:16PM -0500, Rob Herring wrote:
> >> From: Rob Herring <robh@kernel.org>
> >>
> >> of_platform_populate does not return an error if creating the platform
> >> device fails. This means almost any error from driver core cannot be
> >> detected by the caller. Fix this.
> >>
> >> Signed-off-by: Rob Herring <robh@kernel.org>
> >> ---
> >> drivers/of/platform.c | 4 +++-
> >> 1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> >> index 404d1da..622aeb3 100644
> >> --- a/drivers/of/platform.c
> >> +++ b/drivers/of/platform.c
> >> @@ -391,7 +391,9 @@ static int of_platform_bus_create(struct device_node *bus,
> >> }
> >>
> >> dev = of_platform_device_create_pdata(bus, bus_id, platform_data, parent);
> >> - if (!dev || !of_match_node(matches, bus))
> >> + if (!dev)
> >> + return -ENODEV;
> >> + if (!of_match_node(matches, bus))
> >> return 0;
> >>
> >> for_each_child_of_node(bus, child) {
> >
> > This patch caused every single MMC driver to break on OF platforms, as far
> > as I can tell. Reverting it on last night's -next seems to resolve it.
> >
> > The problem seems to be that of_platform_populate() will bail on the
> > first device that fails this.
> >
> > How did you test this code, Frank? On what platform? Practically all my
> > targets here failed to mount rootfs from eMMC or SD card...
>
> I tested on a dragonboard, but without a working sdhci driver. Thus I would not
> have hit the error.
Same here.
Regards,
Ivan
next prev parent reply other threads:[~2014-05-14 7:43 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-07 21:48 [PATCH 0/4] DT platform device name collision fixes Rob Herring
2014-05-07 21:48 ` Rob Herring
2014-05-07 21:48 ` [PATCH 2/4] of/platform: return error on of_platform_device_create_pdata failure Rob Herring
[not found] ` <1399499298-8830-3-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-13 17:56 ` Olof Johansson
2014-05-13 17:56 ` Olof Johansson
[not found] ` <20140513175603.GA27173-O5ziIzlqnXUVNXGz7ipsyg@public.gmane.org>
2014-05-13 18:31 ` Rob Herring
2014-05-13 18:31 ` Rob Herring
2014-05-13 20:32 ` Frank Rowand
2014-05-13 20:37 ` Olof Johansson
[not found] ` <53728173.7050508-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-14 7:43 ` Ivan T. Ivanov [this message]
2014-05-14 7:43 ` Ivan T. Ivanov
2014-05-07 21:48 ` [PATCH 3/4] of/platform: fix device naming for non-translatable addresses Rob Herring
2014-05-08 10:41 ` Arnd Bergmann
2014-05-08 12:55 ` Rob Herring
2014-05-08 12:55 ` Rob Herring
[not found] ` <CAL_JsqJEW_Xrfi7OiF6caHVup1Y6-8SvyOJawov8o3oiYiFvXQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-08 13:15 ` Arnd Bergmann
2014-05-08 13:15 ` Arnd Bergmann
2014-05-08 11:47 ` Ivan T. Ivanov
2014-05-07 21:48 ` [PATCH 4/4] of: kill off of_can_translate_address Rob Herring
[not found] ` <1399499298-8830-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-07 21:48 ` [PATCH 1/4] of/selftest: add testcase for nodes with same name and address Rob Herring
2014-05-07 21:48 ` Rob Herring
[not found] ` <1399499298-8830-2-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-08 2:51 ` Frank Rowand
2014-05-08 2:51 ` Frank Rowand
2014-05-08 8:59 ` Grant Likely
2014-05-08 19:44 ` Frank Rowand
[not found] ` <536AF13F.6000502-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-09 4:28 ` Frank Rowand
2014-05-09 4:28 ` Frank Rowand
2014-05-08 9:00 ` Grant Likely
2014-05-08 9:00 ` Grant Likely
2014-05-07 22:52 ` [PATCH 0/4] DT platform device name collision fixes Frank Rowand
2014-05-07 22:52 ` Frank Rowand
[not found] ` <536AB91F.3010302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-08 2:54 ` Frank Rowand
2014-05-08 2:54 ` Frank Rowand
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=1400053426.8431.13.camel@iivanov-dev \
--to=iivanov-neyub+7iv8pqt0dzr+alfa@public.gmane.org \
--cc=bjorn-UYDU3/A3LUY@public.gmane.org \
--cc=courtney.cavin-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=joshc-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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.