Skip to content

Commit

Permalink
Revert "printk: Save console options for add_preferred_console_match()"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Kroah-Hartman committed Jun 25, 2024
1 parent 64f9f01 commit cc8d5a2
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 167 deletions.
3 changes: 0 additions & 3 deletions include/linux/printk.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ static inline const char *printk_skip_headers(const char *buffer)
#define CONSOLE_LOGLEVEL_DEFAULT CONFIG_CONSOLE_LOGLEVEL_DEFAULT
#define CONSOLE_LOGLEVEL_QUIET CONFIG_CONSOLE_LOGLEVEL_QUIET

int add_preferred_console_match(const char *match, const char *name,
const short idx);

extern int console_printk[];

#define console_loglevel (console_printk[0])
Expand Down
2 changes: 1 addition & 1 deletion kernel/printk/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-y = printk.o conopt.o
obj-y = printk.o
obj-$(CONFIG_PRINTK) += printk_safe.o nbcon.o
obj-$(CONFIG_A11Y_BRAILLE_CONSOLE) += braille.o
obj-$(CONFIG_PRINTK_INDEX) += index.o
Expand Down
146 changes: 0 additions & 146 deletions kernel/printk/conopt.c

This file was deleted.

6 changes: 0 additions & 6 deletions kernel/printk/console_cmdline.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
#ifndef _CONSOLE_CMDLINE_H
#define _CONSOLE_CMDLINE_H

#define MAX_CMDLINECONSOLES 8

int console_opt_save(const char *str, const char *brl_opt);
int console_opt_add_preferred_console(const char *name, const short idx,
char *options, char *brl_options);

struct console_cmdline
{
char name[16]; /* Name of the driver */
Expand Down
14 changes: 3 additions & 11 deletions kernel/printk/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ static int console_locked;
/*
* Array of consoles built from command line options (console=)
*/

#define MAX_CMDLINECONSOLES 8

static struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES];

static int preferred_console = -1;
Expand Down Expand Up @@ -2500,10 +2503,6 @@ static int __init console_setup(char *str)
if (_braille_console_setup(&str, &brl_options))
return 1;

/* Save the console for driver subsystem use */
if (console_opt_save(str, brl_options))
return 1;

/*
* Decode str into name, index, options.
*/
Expand Down Expand Up @@ -2534,13 +2533,6 @@ static int __init console_setup(char *str)
}
__setup("console=", console_setup);

/* Only called from add_preferred_console_match() */
int console_opt_add_preferred_console(const char *name, const short idx,
char *options, char *brl_options)
{
return __add_preferred_console(name, idx, options, brl_options, true);
}

/**
* add_preferred_console - add a device to the list of preferred consoles.
* @name: device name
Expand Down

0 comments on commit cc8d5a2

Please sign in to comment.