bootwrapper: flatdevtree fixes
In-Reply-To: <[email protected]>
Quoted 2 lines · Scott Wood
1.
ft_create_nodewas returning the internal pointer rather than a phandle.
2.ft_find_device_relwas treating lookups relative to root as an error.
No, it is treating lookups relative to NULL as an error.
Your patch changes it to treat lookups relative to the NULL phandle as relative to root.
I've no objections to the other part, can you split these?
Quoted 16 lines
Signed-off-by Scott Wood <scottwood at freescale.com>--- arch/powerpc/boot/flatdevtree.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)arch/powerpc/boot/flatdevtree.c +0
-1@@ -659,9 +659,13 @@ void *ft_find_device_rel(struct ft_cxt *cxt, const void *top, {char *node; - node =ft_node_ph2node (cxt, top);
arch/powerpc/boot/flatdevtree.c void *ft_find_device_rel(struct ft_cxt *cxt, · line 670
Quoted 10 lines
arch/powerpc/boot/flatdevtree.c +7
-2-if (node ==NULL ) -return NULL ; +if (top) { + node =ft_node_ph2node (cxt, top); +if (node ==NULL ) +return NULL ; + }else { + node =ft_root_node (cxt); + }
milton
Quoted 11 lines · Milton Miller
In-Reply-To: <[email protected]>
Quoted 2 lines · Scott Wood
1.
ft_create_nodewas returning the internal pointer rather than a phandle.
2.ft_find_device_relwas treating lookups relative to root as an error.No, it is treating lookups relative to NULL as an error.
Your patch changes it to treat lookups relative to the NULL phandle as relative to root.
Other parts of the code (such as ft_create_node) already do that. What's wrong with it?
Quoted 1 line
I've no objections to the other part, can you split these?
No, because change #1 won't work without change #2.
-Scott
Quoted 9 lines · Scott Wood
Quoted 6 lines · Milton Miller
In-Reply-To: <[email protected]>
Quoted 2 lines · Scott Wood
1.
ft_create_nodewas returning the internal pointer rather than a phandle.
2.ft_find_device_relwas treating lookups relative to root as an error.No, it is treating lookups relative to NULL as an error.
Your patch changes it to treat lookups relative to the NULL phandle as relative to root.Other parts of the code (such as
ft_create_node) already do that. What's wrong with it?
Well, that behavior may be ok, but the change log should say that is the behavior you are changing.
Ie I would record 2 as:
When ft_find_device_rel is asked to find relative to NULL, find realative to root instead of returning an error.
or:
ft_find_device_rel now treats lookups relative to NULL as relative to the root instead of erroring out.
My reading would say that lookups relative to the phandle of root would have workied before, no?
Quoted 4 lines
Quoted 2 lines
I've no objections to the other part, can you split these?
No, because change #1 won't work without change #2.
Huh?
I can see how changing a routine to return an external not internal pointer is necessary before changing a caller creates a dependancy for 2 on 1, but why does it require lookups relative to the phandle NULL be treated as lookups relative to the root?
milton