Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit cc8d5a2

Browse files
committed
Revert "printk: Save console options for add_preferred_console_match()"
This reverts commit f03e8c1. Let's roll back all of the serial core and printk console changes that went into 6.10-rc1 as there still are problems with them that need to be sorted out. Link: https://lore.kernel.org/r/ZnpRozsdw6zbjqze@tlindgre-MOBL1 Reported-by: Petr Mladek <pmladek@suse.com> Reported-by: Tony Lindgren <tony@atomide.com> Cc: Jiri Slaby <jirislaby@kernel.org> Cc: John Ogness <john.ogness@linutronix.de> Cc: Sergey Senozhatsky <senozhatsky@chromium.org> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 64f9f01 commit cc8d5a2

File tree

5 files changed

+4
-167
lines changed

5 files changed

+4
-167
lines changed

include/linux/printk.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ static inline const char *printk_skip_headers(const char *buffer)
6060
#define CONSOLE_LOGLEVEL_DEFAULT CONFIG_CONSOLE_LOGLEVEL_DEFAULT
6161
#define CONSOLE_LOGLEVEL_QUIET CONFIG_CONSOLE_LOGLEVEL_QUIET
6262

63-
int add_preferred_console_match(const char *match, const char *name,
64-
const short idx);
65-
6663
extern int console_printk[];
6764

6865
#define console_loglevel (console_printk[0])

kernel/printk/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2-
obj-y = printk.o conopt.o
2+
obj-y = printk.o
33
obj-$(CONFIG_PRINTK) += printk_safe.o nbcon.o
44
obj-$(CONFIG_A11Y_BRAILLE_CONSOLE) += braille.o
55
obj-$(CONFIG_PRINTK_INDEX) += index.o

kernel/printk/conopt.c

Lines changed: 0 additions & 146 deletions
This file was deleted.

kernel/printk/console_cmdline.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
#ifndef _CONSOLE_CMDLINE_H
33
#define _CONSOLE_CMDLINE_H
44

5-
#define MAX_CMDLINECONSOLES 8
6-
7-
int console_opt_save(const char *str, const char *brl_opt);
8-
int console_opt_add_preferred_console(const char *name, const short idx,
9-
char *options, char *brl_options);
10-
115
struct console_cmdline
126
{
137
char name[16]; /* Name of the driver */

kernel/printk/printk.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,9 @@ static int console_locked;
383383
/*
384384
* Array of consoles built from command line options (console=)
385385
*/
386+
387+
#define MAX_CMDLINECONSOLES 8
388+
386389
static struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES];
387390

388391
static int preferred_console = -1;
@@ -2500,10 +2503,6 @@ static int __init console_setup(char *str)
25002503
if (_braille_console_setup(&str, &brl_options))
25012504
return 1;
25022505

2503-
/* Save the console for driver subsystem use */
2504-
if (console_opt_save(str, brl_options))
2505-
return 1;
2506-
25072506
/*
25082507
* Decode str into name, index, options.
25092508
*/
@@ -2534,13 +2533,6 @@ static int __init console_setup(char *str)
25342533
}
25352534
__setup("console=", console_setup);
25362535

2537-
/* Only called from add_preferred_console_match() */
2538-
int console_opt_add_preferred_console(const char *name, const short idx,
2539-
char *options, char *brl_options)
2540-
{
2541-
return __add_preferred_console(name, idx, options, brl_options, true);
2542-
}
2543-
25442536
/**
25452537
* add_preferred_console - add a device to the list of preferred consoles.
25462538
* @name: device name

0 commit comments

Comments
 (0)