Skip to content

Commit 7fc11a5

Browse files
KAGA-KOKOpmladek
authored andcommitted
printk: Remove write only variable nr_ext_console_drivers
Commit a699449 ("printk: refactor and rework printing logic") removed the need for @nr_ext_console_drivers. Remove the unneeded variable. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> Reviewed-by: Petr Mladek <pmladek@suse.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20220924000454.3319186-4-john.ogness@linutronix.de
1 parent e3f12f0 commit 7fc11a5

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

kernel/printk/printk.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,6 @@ int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
220220
}
221221
#endif /* CONFIG_PRINTK && CONFIG_SYSCTL */
222222

223-
/* Number of registered extended console drivers. */
224-
static int nr_ext_console_drivers;
225-
226223
/*
227224
* Helper macros to handle lockdep when locking/unlocking console_sem. We use
228225
* macros instead of functions so that _RET_IP_ contains useful information.
@@ -3188,9 +3185,6 @@ void register_console(struct console *newcon)
31883185
console_drivers->next = newcon;
31893186
}
31903187

3191-
if (newcon->flags & CON_EXTENDED)
3192-
nr_ext_console_drivers++;
3193-
31943188
newcon->dropped = 0;
31953189
if (newcon->flags & CON_PRINTBUFFER) {
31963190
/* Get a consistent copy of @syslog_seq. */
@@ -3256,9 +3250,6 @@ int unregister_console(struct console *console)
32563250
if (res)
32573251
goto out_disable_unlock;
32583252

3259-
if (console->flags & CON_EXTENDED)
3260-
nr_ext_console_drivers--;
3261-
32623253
/*
32633254
* If this isn't the last console and it has CON_CONSDEV set, we
32643255
* need to set it on the next preferred console.

0 commit comments

Comments
 (0)