Thread (60 messages) flat view 60 messages, 3 authors, 2007-08-24

Re: [PATCH 05/20] bootwrapper: flatdevtree fixes

From: Scott Wood <hidden>
Date: 2007-08-22 17:25:05

On Wed, Aug 22, 2007 at 11:09:07AM +1000, David Gibson wrote:
On Tue, Aug 21, 2007 at 11:09:58AM -0500, Scott Wood wrote:
quoted
The point of #2 was as part of the fix to #1 -- otherwise, the same 
check for NULL would have to be moved into ft_create_node to 
conditionally call ft_find_device or ft_find_device_rel.
Um... oh, ok, I hadn't spotted that (1) made ft_create() use
find_device_rel().  That sounds doubly wrong: you have the internal
offset pointer, you should be able to create a phandle using the
phandle allocation stuff, rather than having to refind the node you've
just created from the parent.
Yeah, that'd make more sense.
quoted
quoted
 (3) I really dislike;  I just don't see the point.
It's needed by dt_get_path().
No, it isn't.  dt_get_path() needs *some* way of getting the name of a
node, but it could be a separate function, which I think would be
preferable rather than folding it into getprop - you don't need to
search for the name, so a getname() function would have quite a
different structure to getprop().
I'd rather not add a new entry in ops just for that; it's more of an
attribute of the dtb format that name is handled specially.  IIUC, on
real OF you'd use the same code for both.

Plus, something might come along that needs to dynamically look for
either name or something else.  It's more flexible this way.

-Scott
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help