[PATCH] of/pdt: fix section mismatch warning

David Miller davem at davemloft.net
Wed Dec 28 09:13:07 EST 2011


From: Sam Ravnborg <sam at ravnborg.org>
Date: Tue, 27 Dec 2011 23:04:08 +0100

> prom_early_alloc() is annotated __init, and users of
> kernel_tree_alloc() is also annotated __init.
> So simply match the annoation of these to fix the warning.

Not exactly.

drivers/of/fdt.c:of_fdt_unflatten_tree() is not marked __init but does
pass kernel_tree_alloc in as a callback to __unflatten_device_tree()

So I don't think we can't just mark kernel_tree_alloc as __init to fix
this problem.

of_fdt_unflatten_tree() seems to be invokable at arbitrary points in
time, even long after we boot up, so I think we'll end up having to
unravel things to other way, removing the __init tag from the various
implementations of prom_early_alloc().


More information about the devicetree-discuss mailing list