From: Sascha Hauer <s.hauer@pengutronix.de>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] of: fix of_tree_for_each_node_from() macro
Date: Wed, 27 Apr 2016 11:04:34 +0200 [thread overview]
Message-ID: <20160427090434.GR7860@pengutronix.de> (raw)
In-Reply-To: <1461696366-21604-1-git-send-email-boris.brezillon@free-electrons.com>
Hi Boris,
On Tue, Apr 26, 2016 at 08:46:06PM +0200, Boris Brezillon wrote:
> of_tree_for_each_node_from() is supposed to iterate over all DT nodes
> after the one pointed by the from parameter, but with the current
> of_next_node() implementation we cannot access the root node.
>
> Patch of_next_node() to point to root_node when from is NULL.
>
> Doing that also simplifies users of of_tree_for_each_node_from() which
> were duplicating the logic to point to the root_node when from is NULL.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
> Hi Sacha,
>
> Not sure this patch is doing exactly what we want, but it fixes a bug
> in the sunxi clk driver I'm working on. This driver declares a
> clk provider using CLK_OF_DECLARE() with the SoC compatible (the
> compatible attached to the root node), which means the clk core code has
> to match the root_node, and with the current of_tree_for_each_node() it
> never tests the root_node.
The patch looks good and I can't find a reason why it shouldn't work as
expected. I applied it for now. Let's see what happens.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2016-04-27 9:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 18:46 Boris Brezillon
2016-04-27 9:04 ` Sascha Hauer [this message]
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=20160427090434.GR7860@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=boris.brezillon@free-electrons.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