public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andrew Halaney <ahalaney@redhat.com>,
	Masami Hiramatsu <mhiramat@kernel.org>
Subject: [for-linus][PATCH 6/7] init: Suppress wrong warning for bootconfig cmdline parameter
Date: Wed, 11 Aug 2021 21:12:56 -0400	[thread overview]
Message-ID: <20210812011355.421445007@goodmis.org> (raw)
In-Reply-To: 20210812011250.954353252@goodmis.org

From: Masami Hiramatsu <mhiramat@kernel.org>

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'.

Link: https://lkml.kernel.org/r/162812945097.77369.1849780946468010448.stgit@devnote2

Fixes: 86d1919a4fb0 ("init: print out unknown kernel parameters")
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 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);
-
 #endif
+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)
-- 
2.30.2

  parent reply	other threads:[~2021-08-12  1:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12  1:12 [for-linus][PATCH 0/7] tracing: More fixes for 5.14 Steven Rostedt
2021-08-12  1:12 ` [for-linus][PATCH 1/7] trace/osnoise: Rename main variable to tracer_main Steven Rostedt
2021-08-12  1:12 ` [for-linus][PATCH 2/7] trace/osnoise: Add a header with PREEMPT_RT additional fields Steven Rostedt
2021-08-12  1:12 ` [for-linus][PATCH 3/7] trace/timerlat: " Steven Rostedt
2021-08-12  1:12 ` [for-linus][PATCH 4/7] trace/osnoise: Print a stop tracing message Steven Rostedt
2021-08-12  1:12 ` [for-linus][PATCH 5/7] tracing: define needed config DYNAMIC_FTRACE_WITH_ARGS Steven Rostedt
2021-08-12  1:12 ` Steven Rostedt [this message]
2021-08-12  1:12 ` [for-linus][PATCH 7/7] tracing / histogram: Fix NULL pointer dereference on strcmp() on NULL event name Steven Rostedt

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20210812011355.421445007@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=ahalaney@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox