From: Kevin Hao <haokexin@gmail.com>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Grant Likely <grant.likely@linaro.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
linux-samsung-soc <linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH v4 0/4] Bugfix for of_match_node ordering
Date: Thu, 20 Feb 2014 18:12:40 +0800 [thread overview]
Message-ID: <20140220101240.GA3745@pek-khao-d1.corp.ad.wrs.com> (raw)
In-Reply-To: <CAK9yfHwwmZkFMRvxsxjBAfUbVXU3V+iPFDZO=DwQsFvJ3NQyKA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]
On Thu, Feb 20, 2014 at 02:09:08PM +0530, Sachin Kamat wrote:
> Hi Grant,
>
> I observe the following boot failure with today's (next-20140220) linux-next
> tree on Exynos based boards with the default exynos_defconfig.
Does this help?
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 8a27fc907ab6..9cc893530b9a 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -381,12 +381,16 @@ static int __of_device_is_compatible(const struct device_node *device,
/* Compatible match has highest priority */
if (compat && compat[0]) {
- of_property_for_each_string(device, "compatible", prop, cp) {
+ prop = __of_find_property(device, "compatible", NULL);
+ if (!prop)
+ return 0;
+
+ for (cp = of_prop_next_string(prop, NULL); cp;
+ cp = of_prop_next_string(prop, cp), index++) {
if (of_compat_cmp(cp, compat, strlen(compat)) == 0) {
score = INT_MAX/2 - (index << 2);
break;
}
- index++;
}
if (!score)
return 0;
Thanks,
Kevin
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2014-02-20 10:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-19 14:14 Grant Likely
[not found] ` < CAK9yfHwwmZkFMRvxsxjBAfUbVXU3V+iPFDZO=DwQsFvJ3NQyKA@mail.gmail.com>
[not found] ` < 1392819290-1044-3-git-send-email-grant.likely@linaro.org>
2014-02-19 14:14 ` [PATCH v4 1/4] Revert "of: search the best compatible match first in __of_match_node()" Grant Likely
2014-02-19 14:14 ` [PATCH v4 2/4] of: reimplement the matching method for __of_match_node() Grant Likely
2014-02-19 14:54 ` Rob Herring
2014-02-19 15:34 ` Grant Likely
2014-02-19 14:14 ` [PATCH v4 3/4] of: Move testcase FDT data into drivers/of Grant Likely
2014-02-19 14:14 ` [PATCH v4 4/4] of: Add self test for of_match_node() Grant Likely
2014-02-20 8:39 ` [PATCH v4 0/4] Bugfix for of_match_node ordering Sachin Kamat
2014-02-20 10:12 ` Kevin Hao [this message]
2014-02-20 10:27 ` Sachin Kamat
2014-02-20 10:55 ` Kevin Hao
2014-02-20 11:13 ` Sachin Kamat
2014-02-20 11:53 ` Grant Likely
2014-02-20 11:29 ` Grant Likely
2014-02-21 1:22 ` Sören Brinkmann
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=20140220101240.GA3745@pek-khao-d1.corp.ad.wrs.com \
--to=haokexin@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=sachin.kamat@linaro.org \
--cc=sebastian.hesselbarth@gmail.com \
/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
all inboxes | Powered by JetHome®