mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/3] OF: base: fix inifinite looping in node iterators
@ 2013-07-03 22:46 Sebastian Hesselbarth
  2013-07-03 22:46 ` [PATCH 1/3] OF: base: fix infinite loop in of_find_node_by_name Sebastian Hesselbarth
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Sebastian Hesselbarth @ 2013-07-03 22:46 UTC (permalink / raw)
  To: Sebastian Hesselbarth; +Cc: barebox

Node iterators imported from linux and converted to barebox struct
device_node suffer from infinite looping because of missing check for
root node. Hiroki Nishimoto already reported this for
of_find_matching_node_and_match where a separate patch has been sent.

This patch set also fixes the same issue for other node iterators.

Sebastian Hesselbarth (3):
  OF: base: fix infinite loop in of_find_node_by_name
  OF: base: fix infinite loop in of_find_compatible_node
  OF: base: fix infinite loop in of_find_node_with_property

 drivers/of/base.c |   18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
---
Cc: barebox@lists.infradead.org
Cc: Hiroki Nishimoto <hiroki.nishimoto.if@gmail.com>
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/3] OF: base: fix infinite loop in of_find_node_by_name
  2013-07-03 22:46 [PATCH 0/3] OF: base: fix inifinite looping in node iterators Sebastian Hesselbarth
@ 2013-07-03 22:46 ` Sebastian Hesselbarth
  2013-07-04  6:58   ` Sascha Hauer
  2013-07-03 22:46 ` [PATCH 2/3] OF: base: fix infinite loop in of_find_compatible_node Sebastian Hesselbarth
  2013-07-03 22:46 ` [PATCH 3/3] OF: base: fix infinite loop in of_find_node_with_property Sebastian Hesselbarth
  2 siblings, 1 reply; 10+ messages in thread
From: Sebastian Hesselbarth @ 2013-07-03 22:46 UTC (permalink / raw)
  To: Sebastian Hesselbarth; +Cc: barebox

of_find_node_by_name suffers from infinite looping, because it
does not check for root node of the tree iterated over. This adds a
check for parent pointer of last tested iterator entry, which is
NULL for the root node.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: barebox@lists.infradead.org
Cc: Hiroki Nishimoto <hiroki.nishimoto.if@gmail.com>
---
 drivers/of/base.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index f21476c..df71e8c 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -301,9 +301,13 @@ struct device_node *of_find_node_by_name(struct device_node *from,
 	if (!from)
 		from = root_node;
 
-	of_tree_for_each_node(np, from)
+	of_tree_for_each_node(np, from) {
 		if (np->name && !of_node_cmp(np->name, name))
 			return np;
+		/* check for root node */
+		if (!np->parent)
+			break;
+	}
 
 	return NULL;
 }
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2/3] OF: base: fix infinite loop in of_find_compatible_node
  2013-07-03 22:46 [PATCH 0/3] OF: base: fix inifinite looping in node iterators Sebastian Hesselbarth
  2013-07-03 22:46 ` [PATCH 1/3] OF: base: fix infinite loop in of_find_node_by_name Sebastian Hesselbarth
@ 2013-07-03 22:46 ` Sebastian Hesselbarth
  2013-07-03 22:46 ` [PATCH 3/3] OF: base: fix infinite loop in of_find_node_with_property Sebastian Hesselbarth
  2 siblings, 0 replies; 10+ messages in thread
From: Sebastian Hesselbarth @ 2013-07-03 22:46 UTC (permalink / raw)
  To: Sebastian Hesselbarth; +Cc: barebox

of_find_compatible_node suffers from infinite looping, because it
does not check for root node of the tree iterated over. This adds a
check for parent pointer of last tested iterator entry, which is
NULL for the root node.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: barebox@lists.infradead.org
Cc: Hiroki Nishimoto <hiroki.nishimoto.if@gmail.com>
---
 drivers/of/base.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index df71e8c..25f2e96 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -335,9 +335,13 @@ struct device_node *of_find_compatible_node(struct device_node *from,
 	if (!from)
 		from = root_node;
 
-	of_tree_for_each_node(np, from)
+	of_tree_for_each_node(np, from) {
 		if (of_device_is_compatible(np, compatible))
 			return np;
+		/* check for root node */
+		if (!np->parent)
+			break;
+	}
 
 	return NULL;
 }
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 3/3] OF: base: fix infinite loop in of_find_node_with_property
  2013-07-03 22:46 [PATCH 0/3] OF: base: fix inifinite looping in node iterators Sebastian Hesselbarth
  2013-07-03 22:46 ` [PATCH 1/3] OF: base: fix infinite loop in of_find_node_by_name Sebastian Hesselbarth
  2013-07-03 22:46 ` [PATCH 2/3] OF: base: fix infinite loop in of_find_compatible_node Sebastian Hesselbarth
@ 2013-07-03 22:46 ` Sebastian Hesselbarth
  2 siblings, 0 replies; 10+ messages in thread
From: Sebastian Hesselbarth @ 2013-07-03 22:46 UTC (permalink / raw)
  To: Sebastian Hesselbarth; +Cc: barebox

of_find_node_with_property suffers from infinite looping, because it
does not check for root node of the tree iterated over. This adds a
check for parent pointer of last tested iterator entry, which is
NULL for the root node. Also set from node to current root_node if
NULL.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: barebox@lists.infradead.org
Cc: Hiroki Nishimoto <hiroki.nishimoto.if@gmail.com>
---
 drivers/of/base.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 25f2e96..0500c86 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -363,10 +363,16 @@ struct device_node *of_find_node_with_property(struct device_node *from,
 {
 	struct device_node *np;
 
+	if (!from)
+		from = root_node;
+
 	of_tree_for_each_node(np, from) {
 		struct property *pp = of_find_property(np, prop_name, NULL);
 		if (pp)
 			return np;
+		/* check for root node */
+		if (!np->parent)
+			break;
 	}
 
 	return NULL;
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] OF: base: fix infinite loop in of_find_node_by_name
  2013-07-03 22:46 ` [PATCH 1/3] OF: base: fix infinite loop in of_find_node_by_name Sebastian Hesselbarth
@ 2013-07-04  6:58   ` Sascha Hauer
  2013-07-04  7:13     ` Sebastian Hesselbarth
  2013-07-04 17:12     ` Sebastian Hesselbarth
  0 siblings, 2 replies; 10+ messages in thread
From: Sascha Hauer @ 2013-07-04  6:58 UTC (permalink / raw)
  To: Sebastian Hesselbarth; +Cc: barebox

Hi Sebastian, NISHIMOTO Hiroki,

On Thu, Jul 04, 2013 at 12:46:16AM +0200, Sebastian Hesselbarth wrote:
> of_find_node_by_name suffers from infinite looping, because it
> does not check for root node of the tree iterated over. This adds a
> check for parent pointer of last tested iterator entry, which is
> NULL for the root node.
> 

How about the following which adds the check to the iterator instead of
repeating it in the users.

Sascha

8<---------------------------------------------------------------

From 3f361661e5446b0592f137a50efc4b275f426b41 Mon Sep 17 00:00:00 2001
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: Thu, 4 Jul 2013 08:52:10 +0200
Subject: [PATCH] OF: base: fix inifinite looping in node iterators

of_find_node_by_name suffers from infinite looping, because it
does not check for root node of the tree iterated over. This
fixes this by checking for node->parent to determine whether
the last node has been reached.
Since of_tree_for_each_node does not iterate over the whole tree,
but only over the remaining nodes, rename it to
of_tree_for_each_node_from.

Reported-by: NISHIMOTO Hiroki <hiroki.nishimoto.if@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/of/base.c | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 63ff647..74d4748 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -33,8 +33,17 @@
  * have a dedicated list head, the start node (usually the root
  * node) will not be iterated over.
  */
-#define of_tree_for_each_node(node, root) \
-	list_for_each_entry(node, &root->list, list)
+static inline struct device_node *of_next_node(struct device_node *node)
+{
+	struct device_node *next;
+
+	next = list_first_entry(&node->list, struct device_node, list);
+
+	return next->parent ? next : NULL;
+}
+
+#define of_tree_for_each_node_from(node, from) \
+	for (node = of_next_node(from); node; node = of_next_node(node))
 
 /**
  * struct alias_prop - Alias property in 'aliases' node
@@ -337,7 +346,7 @@ struct device_node *of_find_node_by_name(struct device_node *from,
 	if (!from)
 		from = root_node;
 
-	of_tree_for_each_node(np, from)
+	of_tree_for_each_node_from(np, from)
 		if (np->name && !of_node_cmp(np->name, name))
 			return np;
 
@@ -367,7 +376,7 @@ struct device_node *of_find_compatible_node(struct device_node *from,
 	if (!from)
 		from = root_node;
 
-	of_tree_for_each_node(np, from)
+	of_tree_for_each_node_from(np, from)
 		if (of_device_is_compatible(np, compatible))
 			return np;
 
@@ -391,7 +400,7 @@ struct device_node *of_find_node_with_property(struct device_node *from,
 {
 	struct device_node *np;
 
-	of_tree_for_each_node(np, from) {
+	of_tree_for_each_node_from(np, from) {
 		struct property *pp = of_find_property(np, prop_name, NULL);
 		if (pp)
 			return np;
@@ -447,7 +456,7 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from,
 	if (!from)
 		from = root_node;
 
-	of_tree_for_each_node(np, from) {
+	of_tree_for_each_node_from(np, from) {
 		const struct of_device_id *m = of_match_node(matches, np);
 		if (m) {
 			if (match)
-- 
1.8.3.2

-- 
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] OF: base: fix infinite loop in of_find_node_by_name
  2013-07-04  6:58   ` Sascha Hauer
@ 2013-07-04  7:13     ` Sebastian Hesselbarth
  2013-07-04 17:12     ` Sebastian Hesselbarth
  1 sibling, 0 replies; 10+ messages in thread
From: Sebastian Hesselbarth @ 2013-07-04  7:13 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 07/04/13 08:58, Sascha Hauer wrote:
> On Thu, Jul 04, 2013 at 12:46:16AM +0200, Sebastian Hesselbarth wrote:
>> of_find_node_by_name suffers from infinite looping, because it
>> does not check for root node of the tree iterated over. This adds a
>> check for parent pointer of last tested iterator entry, which is
>> NULL for the root node.
>>
>
> How about the following which adds the check to the iterator instead of
> repeating it in the users.
>
> Sascha
>
> 8<---------------------------------------------------------------
>
>  From 3f361661e5446b0592f137a50efc4b275f426b41 Mon Sep 17 00:00:00 2001
> From: Sascha Hauer <s.hauer@pengutronix.de>
> Date: Thu, 4 Jul 2013 08:52:10 +0200
> Subject: [PATCH] OF: base: fix inifinite looping in node iterators
>
> of_find_node_by_name suffers from infinite looping, because it
> does not check for root node of the tree iterated over. This
> fixes this by checking for node->parent to determine whether
> the last node has been reached.
> Since of_tree_for_each_node does not iterate over the whole tree,
> but only over the remaining nodes, rename it to
> of_tree_for_each_node_from.
>
> Reported-by: NISHIMOTO Hiroki <hiroki.nishimoto.if@gmail.com>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---

Sascha,

I thought about that also. I like the approach better than fixing
every user of the iterator and will re-test them all.

Thanks for the patch.

Sebastian


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] OF: base: fix infinite loop in of_find_node_by_name
  2013-07-04  6:58   ` Sascha Hauer
  2013-07-04  7:13     ` Sebastian Hesselbarth
@ 2013-07-04 17:12     ` Sebastian Hesselbarth
  2013-07-05  6:50       ` Sascha Hauer
  1 sibling, 1 reply; 10+ messages in thread
From: Sebastian Hesselbarth @ 2013-07-04 17:12 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 07/04/13 08:58, Sascha Hauer wrote:
> On Thu, Jul 04, 2013 at 12:46:16AM +0200, Sebastian Hesselbarth wrote:
>> of_find_node_by_name suffers from infinite looping, because it
>> does not check for root node of the tree iterated over. This adds a
>> check for parent pointer of last tested iterator entry, which is
>> NULL for the root node.
>>
>
> How about the following which adds the check to the iterator instead of
> repeating it in the users.

Sascha,

I have taken your patch and successfully tested it for all node
iterators. of_for_each_node_with_property requires an additional patch
to initialize an empty from node with root_node.

Also, there was a similar issue for the child iterator where I sent a
patch ("OF: base: fix iterator in of_get_next_available_child") tonight.

If you have no objections against that last patch, I will prepare one
single patch set with v2 out of the three patches mentioned above.

Sebastian

> 8<---------------------------------------------------------------
>
>  From 3f361661e5446b0592f137a50efc4b275f426b41 Mon Sep 17 00:00:00 2001
> From: Sascha Hauer <s.hauer@pengutronix.de>
> Date: Thu, 4 Jul 2013 08:52:10 +0200
> Subject: [PATCH] OF: base: fix inifinite looping in node iterators
>
> of_find_node_by_name suffers from infinite looping, because it
> does not check for root node of the tree iterated over. This
> fixes this by checking for node->parent to determine whether
> the last node has been reached.
> Since of_tree_for_each_node does not iterate over the whole tree,
> but only over the remaining nodes, rename it to
> of_tree_for_each_node_from.
>
> Reported-by: NISHIMOTO Hiroki <hiroki.nishimoto.if@gmail.com>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>   drivers/of/base.c | 21 +++++++++++++++------
>   1 file changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index 63ff647..74d4748 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -33,8 +33,17 @@
>    * have a dedicated list head, the start node (usually the root
>    * node) will not be iterated over.
>    */
> -#define of_tree_for_each_node(node, root) \
> -	list_for_each_entry(node, &root->list, list)
> +static inline struct device_node *of_next_node(struct device_node *node)
> +{
> +	struct device_node *next;
> +
> +	next = list_first_entry(&node->list, struct device_node, list);
> +
> +	return next->parent ? next : NULL;
> +}
> +
> +#define of_tree_for_each_node_from(node, from) \
> +	for (node = of_next_node(from); node; node = of_next_node(node))
>
>   /**
>    * struct alias_prop - Alias property in 'aliases' node
> @@ -337,7 +346,7 @@ struct device_node *of_find_node_by_name(struct device_node *from,
>   	if (!from)
>   		from = root_node;
>
> -	of_tree_for_each_node(np, from)
> +	of_tree_for_each_node_from(np, from)
>   		if (np->name && !of_node_cmp(np->name, name))
>   			return np;
>
> @@ -367,7 +376,7 @@ struct device_node *of_find_compatible_node(struct device_node *from,
>   	if (!from)
>   		from = root_node;
>
> -	of_tree_for_each_node(np, from)
> +	of_tree_for_each_node_from(np, from)
>   		if (of_device_is_compatible(np, compatible))
>   			return np;
>
> @@ -391,7 +400,7 @@ struct device_node *of_find_node_with_property(struct device_node *from,
>   {
>   	struct device_node *np;
>
> -	of_tree_for_each_node(np, from) {
> +	of_tree_for_each_node_from(np, from) {
>   		struct property *pp = of_find_property(np, prop_name, NULL);
>   		if (pp)
>   			return np;
> @@ -447,7 +456,7 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from,
>   	if (!from)
>   		from = root_node;
>
> -	of_tree_for_each_node(np, from) {
> +	of_tree_for_each_node_from(np, from) {
>   		const struct of_device_id *m = of_match_node(matches, np);
>   		if (m) {
>   			if (match)
>


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] OF: base: fix infinite loop in of_find_node_by_name
  2013-07-04 17:12     ` Sebastian Hesselbarth
@ 2013-07-05  6:50       ` Sascha Hauer
  2013-07-05 21:19         ` [PATCH] OF: base: initalize from node in of_find_node_with_property Sebastian Hesselbarth
  0 siblings, 1 reply; 10+ messages in thread
From: Sascha Hauer @ 2013-07-05  6:50 UTC (permalink / raw)
  To: Sebastian Hesselbarth; +Cc: barebox

Hi Sebastian,

On Thu, Jul 04, 2013 at 07:12:10PM +0200, Sebastian Hesselbarth wrote:
> On 07/04/13 08:58, Sascha Hauer wrote:
> >On Thu, Jul 04, 2013 at 12:46:16AM +0200, Sebastian Hesselbarth wrote:
> >>of_find_node_by_name suffers from infinite looping, because it
> >>does not check for root node of the tree iterated over. This adds a
> >>check for parent pointer of last tested iterator entry, which is
> >>NULL for the root node.
> >>
> >
> >How about the following which adds the check to the iterator instead of
> >repeating it in the users.
> 
> Sascha,
> 
> I have taken your patch and successfully tested it for all node
> iterators.

I applied this one.

> of_for_each_node_with_property requires an additional patch
> to initialize an empty from node with root_node.
> 
> Also, there was a similar issue for the child iterator where I sent a
> patch ("OF: base: fix iterator in of_get_next_available_child") tonight.

I applied this one aswell.

What's missing now is the mentioned fix for
of_for_each_node_with_property, then we should be fine.

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] OF: base: initalize from node in of_find_node_with_property
  2013-07-05  6:50       ` Sascha Hauer
@ 2013-07-05 21:19         ` Sebastian Hesselbarth
  2013-07-09  6:55           ` Sascha Hauer
  0 siblings, 1 reply; 10+ messages in thread
From: Sebastian Hesselbarth @ 2013-07-05 21:19 UTC (permalink / raw)
  To: Sebastian Hesselbarth; +Cc: barebox

This adds initialization of from device node with root_node if NULL
is passed. This corresponds to the behavior of all other node iterators.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
@Sascha: this is the last remaining iterator fix we talked about.

Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
---
 drivers/of/base.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 5440f40..7bee912 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -364,6 +364,9 @@ struct device_node *of_find_node_with_property(struct device_node *from,
 {
 	struct device_node *np;
 
+	if (!from)
+		from = root_node;
+
 	of_tree_for_each_node_from(np, from) {
 		struct property *pp = of_find_property(np, prop_name, NULL);
 		if (pp)
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] OF: base: initalize from node in of_find_node_with_property
  2013-07-05 21:19         ` [PATCH] OF: base: initalize from node in of_find_node_with_property Sebastian Hesselbarth
@ 2013-07-09  6:55           ` Sascha Hauer
  0 siblings, 0 replies; 10+ messages in thread
From: Sascha Hauer @ 2013-07-09  6:55 UTC (permalink / raw)
  To: Sebastian Hesselbarth; +Cc: barebox

On Fri, Jul 05, 2013 at 11:19:43PM +0200, Sebastian Hesselbarth wrote:
> This adds initialization of from device node with root_node if NULL
> is passed. This corresponds to the behavior of all other node iterators.
> 
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> ---
> @Sascha: this is the last remaining iterator fix we talked about.

Applied, thanks

Sascha

> 
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: barebox@lists.infradead.org
> ---
>  drivers/of/base.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index 5440f40..7bee912 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -364,6 +364,9 @@ struct device_node *of_find_node_with_property(struct device_node *from,
>  {
>  	struct device_node *np;
>  
> +	if (!from)
> +		from = root_node;
> +
>  	of_tree_for_each_node_from(np, from) {
>  		struct property *pp = of_find_property(np, prop_name, NULL);
>  		if (pp)
> -- 
> 1.7.10.4
> 
> 

-- 
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-07-09  6:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-03 22:46 [PATCH 0/3] OF: base: fix inifinite looping in node iterators Sebastian Hesselbarth
2013-07-03 22:46 ` [PATCH 1/3] OF: base: fix infinite loop in of_find_node_by_name Sebastian Hesselbarth
2013-07-04  6:58   ` Sascha Hauer
2013-07-04  7:13     ` Sebastian Hesselbarth
2013-07-04 17:12     ` Sebastian Hesselbarth
2013-07-05  6:50       ` Sascha Hauer
2013-07-05 21:19         ` [PATCH] OF: base: initalize from node in of_find_node_with_property Sebastian Hesselbarth
2013-07-09  6:55           ` Sascha Hauer
2013-07-03 22:46 ` [PATCH 2/3] OF: base: fix infinite loop in of_find_compatible_node Sebastian Hesselbarth
2013-07-03 22:46 ` [PATCH 3/3] OF: base: fix infinite loop in of_find_node_with_property Sebastian Hesselbarth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox