archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu <>
To: Steven Rostedt <>
	Andrew Halaney <>,
	Masami Hiramatsu <>,
	Borislav Petkov <>
Subject: [PATCH] init: Suppress wrong warning for bootconfig cmdline parameter
Date: Thu,  5 Aug 2021 11:10:51 +0900	[thread overview]
Message-ID: <162812945097.77369.1849780946468010448.stgit@devnote2> (raw)

Since the 'bootconfig' command line parameter is handled before
parsing the command line, it doesn't use early_param(). But in
this case, kernel shows a wrong warning message about it.

[    0.013714] Kernel command line: ro console=ttyS0  bootconfig console=tty0
[    0.013741] Unknown command line parameters: bootconfig

To suppress this message, add a dummy handler for 'bootconfig'.

Fixes: 86d1919a4fb0 ("init: print out unknown kernel parameters")
Signed-off-by: Masami Hiramatsu <>
 init/main.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/init/main.c b/init/main.c
index f5b8246e8aa1..8d97aba78c3a 100644
--- a/init/main.c
+++ b/init/main.c
@@ -397,6 +397,12 @@ static int __init bootconfig_params(char *param, char *val,
 	return 0;
+static int __init warn_bootconfig(char *str)
+	/* The 'bootconfig' has been handled by bootconfig_params(). */
+	return 0;
 static void __init setup_boot_config(void)
 	static char tmp_cmdline[COMMAND_LINE_SIZE] __initdata;
@@ -475,9 +481,8 @@ static int __init warn_bootconfig(char *str)
 	pr_warn("WARNING: 'bootconfig' found on the kernel command line but CONFIG_BOOT_CONFIG is not set.\n");
 	return 0;
-early_param("bootconfig", warn_bootconfig);
+early_param("bootconfig", warn_bootconfig);
 /* Change NUL term back to "=", to make "param" the whole string. */
 static void __init repair_env_string(char *param, char *val)

             reply	other threads:[~2021-08-05  2:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05  2:10 Masami Hiramatsu [this message]
2021-08-05 15:22 ` Andrew Halaney
2021-08-06 13:49   ` Masami Hiramatsu
2021-08-06 14:08     ` Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=162812945097.77369.1849780946468010448.stgit@devnote2 \ \ \ \ \ \
    --subject='Re: [PATCH] init: Suppress wrong warning for bootconfig cmdline parameter' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox