diff mbox series

[RFC,08/12] core/console: Drop has_wrapped

Message ID 20200519054633.113238-9-oohall@gmail.com
State RFC
Headers show
Series [RFC,01/12] platform/mambo: Add a mambo OPAL console driver | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (0f1937ef40fca0c3212a9dff1010b832a24fb063)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Oliver O'Halloran May 19, 2020, 5:46 a.m. UTC
This same information is tracked in struct memcons so use that instead.

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

Patch

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);