diff mbox

[v2,02/14] console: unexport con_lock

Message ID 1482213825-30448-3-git-send-email-oohall@gmail.com
State Superseded
Headers show

Commit Message

Oliver O'Halloran Dec. 20, 2016, 6:03 a.m. UTC
The skiboot console lock protects the skiboot log buffer. All writes to
the log buffer need to be done via console_write() so there is no need
to export the lock outside console.c

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
 core/console.c    | 2 +-
 include/console.h | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

Comments

Andrew Donnellan Dec. 20, 2016, 6:21 a.m. UTC | #1
On 20/12/16 17:03, Oliver O'Halloran wrote:
> The skiboot console lock protects the skiboot log buffer. All writes to
> the log buffer need to be done via console_write() so there is no need
> to export the lock outside console.c
>
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>

Makes sense.

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
diff mbox

Patch

diff --git a/core/console.c b/core/console.c
index 0e96bf4593eb..20de285f5104 100644
--- a/core/console.c
+++ b/core/console.c
@@ -33,7 +33,7 @@  static size_t con_out;
 static bool con_wrapped;
 static struct con_ops *con_driver;
 
-struct lock con_lock = LOCK_UNLOCKED;
+static struct lock con_lock = LOCK_UNLOCKED;
 
 /* This is mapped via TCEs so we keep it alone in a page */
 struct memcons memcons __section(".data.memcons") = {
diff --git a/include/console.h b/include/console.h
index f88547c7791e..4c77433421f6 100644
--- a/include/console.h
+++ b/include/console.h
@@ -54,8 +54,6 @@  struct con_ops {
 	int64_t (*flush)(void);
 };
 
-extern struct lock con_lock;
-
 extern bool dummy_console_enabled(void);
 extern void force_dummy_console(void);
 extern bool flush_console(void);