unflatten_dt_node allocl is out by one?

From: James Cameron <hidden>
Date: 2014-07-12 06:11:41

G'day,

OLPC XO-4 on 3.16-rc4 was not resolving aliases.

of_alias_get_id was returning -ENODEV, because of_alias_scan was not
finding an /aliases node.

unflatten_device_tree did process an /aliases node.

But the name of the aliases node was missing a terminating NUL,
because in unflatten_dt_node the node allocation length was off by
one, in turn because the length was set from a post-decrement:

        allocl = l++;

And is solved by pre-decrement:

        allocl = ++l;

The triggering change may have been from "of/fdt: Convert FDT
functions to use libfdt" e6a6928c3ea1d0195ed75a091e345696b916c09b.

It is also quite possible that I misunderstand something, and welcome
any correction.

-- 
James Cameron
http://quozl.linux.org.au/
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help