Commit cbe46bd4 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

powerpc: remove CONFIG_CMDLINE #ifdef mess

This patch makes CONFIG_CMDLINE defined at all time. It avoids
having to enclose related code inside #ifdef CONFIG_CMDLINE
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 26deb043
...@@ -831,9 +831,9 @@ config CMDLINE_BOOL ...@@ -831,9 +831,9 @@ config CMDLINE_BOOL
bool "Default bootloader kernel arguments" bool "Default bootloader kernel arguments"
config CMDLINE config CMDLINE
string "Initial kernel command string" string "Initial kernel command string" if CMDLINE_BOOL
depends on CMDLINE_BOOL default "console=ttyS0,9600 console=tty0 root=/dev/sda2" if CMDLINE_BOOL
default "console=ttyS0,9600 console=tty0 root=/dev/sda2" default ""
help help
On some platforms, there is currently no way for the boot loader to On some platforms, there is currently no way for the boot loader to
pass arguments to the kernel. For these platforms, you can supply pass arguments to the kernel. For these platforms, you can supply
......
...@@ -631,17 +631,14 @@ static void __init early_cmdline_parse(void) ...@@ -631,17 +631,14 @@ static void __init early_cmdline_parse(void)
const char *opt; const char *opt;
char *p; char *p;
int l __maybe_unused = 0; int l = 0;
prom_cmd_line[0] = 0; prom_cmd_line[0] = 0;
p = prom_cmd_line; p = prom_cmd_line;
if ((long)prom.chosen > 0) if ((long)prom.chosen > 0)
l = prom_getprop(prom.chosen, "bootargs", p, COMMAND_LINE_SIZE-1); l = prom_getprop(prom.chosen, "bootargs", p, COMMAND_LINE_SIZE-1);
#ifdef CONFIG_CMDLINE if (IS_ENABLED(CONFIG_CMDLINE_BOOL) && (l <= 0 || p[0] == '\0')) /* dbl check */
if (l <= 0 || p[0] == '\0') /* dbl check */ strlcpy(prom_cmd_line, CONFIG_CMDLINE, sizeof(prom_cmd_line));
strlcpy(prom_cmd_line,
CONFIG_CMDLINE, sizeof(prom_cmd_line));
#endif /* CONFIG_CMDLINE */
prom_printf("command line: %s\n", prom_cmd_line); prom_printf("command line: %s\n", prom_cmd_line);
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment