[PATCH] Remove bogus errors from check_chosen.

Scott Wood scottwood at freescale.com
Fri Mar 23 03:11:09 EST 2007


It is not an error for /chosen (or any of its children) to be missing.

It is not a requirement that the output of dtc be a complete, valid
device tree, as it may be intended that the dtb be passed through boot
code that will complete it.  Thus, do not complain.

Signed-off-by: Scott Wood <scottwood at freescale.com>
---
 livetree.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/livetree.c b/livetree.c
index 45642dc..ce73f50 100644
--- a/livetree.c
+++ b/livetree.c
@@ -588,13 +588,8 @@ static int check_chosen(struct node *root)
 	int ok = 1;
 
 	chosen = get_subnode(root, "chosen");
-	if (! chosen) {
-		ERRMSG("Missing /chosen node\n");
-		return 0;
-	}
-
-	CHECK_HAVE_WARN_STRING(chosen, "bootargs");
-	CHECK_HAVE_WARN_STRING(chosen, "linux,stdout-path");
+	if (!chosen)
+		return ok;
 
         /* give warning for obsolete interrupt-controller property */
 	do {
-- 
1.5.0.3



More information about the Linuxppc-dev mailing list