[Skiboot] [PATCH v2 1/5] core/fdt: Split flatten_dt_node()
Shilpasri G Bhat
shilpa.bhat at linux.vnet.ibm.com
Fri Apr 1 00:34:53 AEDT 2016
From: Gavin Shan <gwshan at linux.vnet.ibm.com>
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);
--
1.9.3
More information about the Skiboot
mailing list