lkml.org 
[lkml]   [2022]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH printk v2 09/38] netconsole: use console_is_enabled()
Date
Replace (console->flags & CON_ENABLED) usage with console_is_enabled().

Signed-off-by: John Ogness <john.ogness@linutronix.de>
---
drivers/net/netconsole.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index bdff9ac5056d..073e59a06f21 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -332,7 +332,7 @@ static ssize_t enabled_store(struct config_item *item,
}

if (enabled) { /* true */
- if (nt->extended && !(netconsole_ext.flags & CON_ENABLED)) {
+ if (nt->extended && !console_is_enabled(&netconsole_ext)) {
netconsole_ext.flags |= CON_ENABLED;
register_console(&netconsole_ext);
}
@@ -915,7 +915,7 @@ static int __init init_netconsole(void)
if (err)
goto undonotifier;

- if (netconsole_ext.flags & CON_ENABLED)
+ if (console_is_enabled(&netconsole_ext))
register_console(&netconsole_ext);
register_console(&netconsole);
pr_info("network logging started\n");
--
2.30.2
\
 
 \ /
  Last update: 2022-10-19 17:05    [W:0.777 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site