[Skiboot] [RFC PATCH 08/12] core/console: Drop has_wrapped

Oliver O'Halloran oohall at gmail.com
Tue May 19 15:46:29 AEST 2020


This same information is tracked in struct memcons so use that instead.

Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 core/console.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/core/console.c b/core/console.c
index e18c4c3213bb..34944de4f310 100644
--- a/core/console.c
+++ b/core/console.c
@@ -23,7 +23,6 @@ static char *con_buf = (char *)INMEM_CON_START;
  * out to the console which is what flush_head is for.
  */
 static size_t flush_head;
-static bool con_wrapped;
 
 /* Internal console driver ops */
 static struct con_ops *con_driver;
@@ -197,7 +196,7 @@ static void inmem_write(char c)
 	memcons.obuf[memcons.out_pos++] = c;
 	if (memcons.out_pos >= INMEM_CON_OUT_LEN) {
 		memcons.out_pos = 0;
-		con_wrapped = true;
+		memcons.has_wrapped = true;
 	}
 
 	/*
@@ -208,7 +207,7 @@ static void inmem_write(char c)
 	 * out_pos
 	 */
 	opos = memcons.out_pos;
-	if (con_wrapped)
+	if (memcons.has_wrapped)
 		opos |= MEMCONS_OUT_POS_WRAP;
 	lwsync();
 	memcons.desc->out_pos = cpu_to_be32(opos);
-- 
2.26.2



More information about the Skiboot mailing list