[Skiboot] [PATCH v9 06/22] core/fdt: Split flatten_dt_node()

Daniel Axtens dja at axtens.net
Tue Dec 1 09:17:19 AEDT 2015


Hi Gavin,

I'm back to reviewing this series again... sorry it has dragged out so
long!

The patch looks good. I have 1 question: is the split function
(flatten_dt_properties()) used in any later patch? I haven't found it
yet but I haven't looked at all of the patches yet either.

Regards,
Daniel

> This moves the logic flattenning all properties of the specified
> device node from flatten_dt_node() to flatten_dt_properties(). No
> logical changes introduced.
>
> Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
> ---
>  core/fdt.c | 20 ++++++++++++--------
>  1 file changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/core/fdt.c b/core/fdt.c
> index a301f1f..6d3446e 100644
> --- a/core/fdt.c
> +++ b/core/fdt.c
> @@ -113,24 +113,28 @@ static void dump_fdt(void)
>  #endif
>  }
>  
> -static void flatten_dt_node(const struct dt_node *root)
> +static void flatten_dt_properties(const struct dt_node *dn)
>  {
> -	const struct dt_node *i;
>  	const struct dt_property *p;
>  
> -#ifdef DEBUG_FDT
> -	printf("FDT: node: %s\n", root->name);
> -#endif
> -
> -	list_for_each(&root->properties, p, list) {
> +	list_for_each(&dn->properties, p, list) {
>  		if (strstarts(p->name, DT_PRIVATE))
>  			continue;
>  #ifdef DEBUG_FDT
> -		printf("FDT:   prop: %s size: %ld\n", p->name, p->len);
> +		printf("FDT: prop: %s size: %ld\n", p->name, p->len);
>  #endif
>  		dt_property(p);
>  	}
> +}
>  
> +static void flatten_dt_node(const struct dt_node *root)
> +{
> +	const struct dt_node *i;
> +
> +#ifdef DEBUG_FDT
> +	printf("FDT: node: %s\n", root->name);
> +#endif
> +	flatten_dt_properties(root);
>  	list_for_each(&root->children, i, list) {
>  		dt_begin_node(i);
>  		flatten_dt_node(i);
> -- 
> 2.1.0
>
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 859 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/skiboot/attachments/20151201/12064e4d/attachment.sig>


More information about the Skiboot mailing list