[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1452986629-17210-12-git-send-email-peter@hurleysoftware.com>
Date: Sat, 16 Jan 2016 15:23:48 -0800
From: Peter Hurley <peter@...leysoftware.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rob Herring <robh@...nel.org>,
Grant Likely <grant.likely@...aro.org>
Cc: Jiri Slaby <jslaby@...e.cz>, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org, Kevin Cernekee <cernekee@...il.com>,
Jon Hunter <jonathanh@...dia.com>,
Paul Burton <paul.burton@...tec.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Sebastian Frias <sf84@...oste.net>,
Peter Hurley <peter@...leysoftware.com>
Subject: [PATCH v6 11/12] of: earlycon: Log more helpful message if stdout-path node not found
Earlycon may fail to initialize for a variety of reasons, most of
which log the default early param message. If the stdout-path node is
not found, log the path which was not found (and suppress the
default early param message).
Acked-by: Rob Herring <robh@...nel.org>
Signed-off-by: Peter Hurley <peter@...leysoftware.com>
---
drivers/of/fdt.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 918809e..e2295b2 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -820,11 +820,14 @@ static int __init early_init_dt_scan_chosen_serial(void)
q = strchrnul(p, ':');
if (*q != '\0')
options = q + 1;
+ l = q - p;
/* Get the node specified by stdout-path */
- offset = fdt_path_offset_namelen(fdt, p, q - p);
- if (offset < 0)
- return -ENODEV;
+ offset = fdt_path_offset_namelen(fdt, p, l);
+ if (offset < 0) {
+ pr_warn("earlycon: stdout-path %.*s not found\n", l, p);
+ return 0;
+ }
for (match = __earlycon_table; match < __earlycon_table_end; match++) {
if (!match->compatible[0])
--
2.7.0
Powered by blists - more mailing lists