Message ID | 1453540813-15764-21-git-send-email-zhaoshenglong@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sat, 23 Jan 2016, Shannon Zhao wrote: > From: Shannon Zhao <shannon.zhao@linaro.org> > > This function will be used by ACPI booting. Export it so that it can be > used by other files. > > Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Please remove __init from the declaration. Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > xen/arch/arm/bootfdt.c | 6 +++--- > xen/include/xen/device_tree.h | 4 ++++ > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c > index 74d208b..8a14015 100644 > --- a/xen/arch/arm/bootfdt.c > +++ b/xen/arch/arm/bootfdt.c > @@ -85,9 +85,9 @@ static u32 __init device_tree_get_u32(const void *fdt, int node, > * Returns 0 if all nodes were iterated over successfully. If @func > * returns a value different from 0, that value is returned immediately. > */ > -static int __init device_tree_for_each_node(const void *fdt, > - device_tree_node_func func, > - void *data) > +int __init device_tree_for_each_node(const void *fdt, > + device_tree_node_func func, > + void *data) > { > int node; > int depth; > diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h > index cf31e50..12942cf 100644 > --- a/xen/include/xen/device_tree.h > +++ b/xen/include/xen/device_tree.h > @@ -173,6 +173,10 @@ typedef int (*device_tree_node_func)(const void *fdt, > > extern const void *device_tree_flattened; > > +int __init device_tree_for_each_node(const void *fdt, > + device_tree_node_func func, > + void *data); > + > /** > * dt_unflatten_host_device_tree - Unflatten the host device tree > * > -- > 2.0.4 > >
diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c index 74d208b..8a14015 100644 --- a/xen/arch/arm/bootfdt.c +++ b/xen/arch/arm/bootfdt.c @@ -85,9 +85,9 @@ static u32 __init device_tree_get_u32(const void *fdt, int node, * Returns 0 if all nodes were iterated over successfully. If @func * returns a value different from 0, that value is returned immediately. */ -static int __init device_tree_for_each_node(const void *fdt, - device_tree_node_func func, - void *data) +int __init device_tree_for_each_node(const void *fdt, + device_tree_node_func func, + void *data) { int node; int depth; diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index cf31e50..12942cf 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -173,6 +173,10 @@ typedef int (*device_tree_node_func)(const void *fdt, extern const void *device_tree_flattened; +int __init device_tree_for_each_node(const void *fdt, + device_tree_node_func func, + void *data); + /** * dt_unflatten_host_device_tree - Unflatten the host device tree *