linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Borislav Petkov <bp@alien8.de>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: [PATCH v2 3/8] tools/bootconfig: Remove unneeded error message silencer
Date: Thu, 20 Feb 2020 21:18:52 +0900	[thread overview]
Message-ID: <158220113256.26565.14264598654427773104.stgit@devnote2> (raw)
In-Reply-To: <158220110257.26565.4812934676257459744.stgit@devnote2>

Remove error message silent knob, we don't need it anymore
because we can check if there is a bootconfig by checking
the magic word.
If there is a magic word, but failed to load a bootconfig
from initrd, there is a real problem.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
 tools/bootconfig/include/linux/printk.h |    5 +----
 tools/bootconfig/main.c                 |    8 --------
 2 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/tools/bootconfig/include/linux/printk.h b/tools/bootconfig/include/linux/printk.h
index e978a63d3222..036e667596eb 100644
--- a/tools/bootconfig/include/linux/printk.h
+++ b/tools/bootconfig/include/linux/printk.h
@@ -4,10 +4,7 @@
 
 #include <stdio.h>
 
-/* controllable printf */
-extern int pr_output;
-#define printk(fmt, ...)	\
-	(pr_output ? printf(fmt, ##__VA_ARGS__) : 0)
+#define printk(fmt, ...) printf(fmt, ##__VA_ARGS__)
 
 #define pr_err printk
 #define pr_warn	printk
diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
index 742271f019a9..a9b97814d1a9 100644
--- a/tools/bootconfig/main.c
+++ b/tools/bootconfig/main.c
@@ -14,8 +14,6 @@
 #include <linux/kernel.h>
 #include <linux/bootconfig.h>
 
-int pr_output = 1;
-
 static int xbc_show_array(struct xbc_node *node)
 {
 	const char *val;
@@ -227,13 +225,7 @@ int delete_xbc(const char *path)
 		return -errno;
 	}
 
-	/*
-	 * Suppress error messages in xbc_init() because it can be just a
-	 * data which concidentally matches the size and checksum footer.
-	 */
-	pr_output = 0;
 	size = load_xbc_from_initrd(fd, &buf);
-	pr_output = 1;
 	if (size < 0) {
 		ret = size;
 		pr_err("Failed to load a boot config from initrd: %d\n", ret);


  parent reply	other threads:[~2020-02-20 12:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 12:18 [PATCH v2 0/8] bootconfig: Update for the recent reports Masami Hiramatsu
2020-02-20 12:18 ` [PATCH v2 1/8] bootconfig: Set CONFIG_BOOT_CONFIG=n by default Masami Hiramatsu
2020-02-27  9:22   ` Geert Uytterhoeven
2020-02-27 14:27     ` Steven Rostedt
2020-02-27 14:47       ` Geert Uytterhoeven
2020-02-27 15:05         ` Steven Rostedt
2020-02-20 12:18 ` [PATCH v2 2/8] bootconfig: Add bootconfig magic word for indicating bootconfig explicitly Masami Hiramatsu
2020-02-20 12:18 ` Masami Hiramatsu [this message]
2020-02-20 12:19 ` [PATCH v2 4/8] bootconfig: Remove unneeded checksum Masami Hiramatsu
2020-02-20 17:14   ` Steven Rostedt
2020-02-20 23:34     ` Masami Hiramatsu
2020-02-20 12:19 ` [PATCH v2 5/8] bootconfig: Reject subkey and value on same parent key Masami Hiramatsu
2020-02-20 12:19 ` [PATCH v2 6/8] bootconfig: Overwrite value on same key by default Masami Hiramatsu
2020-02-20 17:16   ` Steven Rostedt
2020-02-21  0:21     ` Masami Hiramatsu
2020-02-21  2:56       ` Steven Rostedt
2020-02-21  6:32         ` Masami Hiramatsu
2020-02-20 12:19 ` [PATCH v2 7/8] bootconfig: Add append value operator support Masami Hiramatsu
2020-02-20 12:19 ` [PATCH v2 8/8] bootconfig: Print array as multiple commands for legacy command line 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:
  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=158220113256.26565.14264598654427773104.stgit@devnote2 \
    --to=mhiramat@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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;
as well as URLs for NNTP newsgroup(s).