From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>
Subject: [PATCH 5/7] tools/bootconfig: Print all error message in stderr
Date: Fri, 17 Sep 2021 19:03:01 +0900 [thread overview]
Message-ID: <163187298106.2366983.15210300267326257397.stgit@devnote2> (raw)
In-Reply-To: <163187294400.2366983.7393164788107844569.stgit@devnote2>
Print all error message in stderr. This also removes
unneeded tools/bootconfig/include/linux/printk.h.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
tools/bootconfig/include/linux/kernel.h | 2 --
tools/bootconfig/include/linux/printk.h | 14 --------------
tools/bootconfig/main.c | 2 ++
3 files changed, 2 insertions(+), 16 deletions(-)
delete mode 100644 tools/bootconfig/include/linux/printk.h
diff --git a/tools/bootconfig/include/linux/kernel.h b/tools/bootconfig/include/linux/kernel.h
index 2d93320aa374..c4854b8e7023 100644
--- a/tools/bootconfig/include/linux/kernel.h
+++ b/tools/bootconfig/include/linux/kernel.h
@@ -5,8 +5,6 @@
#include <stdlib.h>
#include <stdbool.h>
-#include <linux/printk.h>
-
typedef unsigned short u16;
typedef unsigned int u32;
diff --git a/tools/bootconfig/include/linux/printk.h b/tools/bootconfig/include/linux/printk.h
deleted file mode 100644
index 036e667596eb..000000000000
--- a/tools/bootconfig/include/linux/printk.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _SKC_LINUX_PRINTK_H
-#define _SKC_LINUX_PRINTK_H
-
-#include <stdio.h>
-
-#define printk(fmt, ...) printf(fmt, ##__VA_ARGS__)
-
-#define pr_err printk
-#define pr_warn printk
-#define pr_info printk
-#define pr_debug printk
-
-#endif
diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
index 4252c23bd35d..adc6c6e73fa9 100644
--- a/tools/bootconfig/main.c
+++ b/tools/bootconfig/main.c
@@ -15,6 +15,8 @@
#include <linux/kernel.h>
#include <linux/bootconfig.h>
+#define pr_err(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
+
static int xbc_show_value(struct xbc_node *node, bool semicolon)
{
const char *val, *eol;
next prev parent reply other threads:[~2021-09-17 10:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 10:02 [PATCH 0/7] bootconfig: Clean up bootconfig Masami Hiramatsu
2021-09-17 10:02 ` [PATCH 1/7] tools/bootconfig: Run test script when build all Masami Hiramatsu
2021-09-17 10:02 ` [PATCH 2/7] bootconfig: Rename xbc_destroy_all() to xbc_exit() Masami Hiramatsu
2021-09-17 10:02 ` [PATCH 3/7] bootconfig: Split parse-tree part from xbc_init Masami Hiramatsu
2021-09-17 10:02 ` [PATCH 4/7] bootconfig: Remove unused debug function Masami Hiramatsu
2021-09-17 10:03 ` Masami Hiramatsu [this message]
2021-09-17 10:03 ` [PATCH 6/7] bootconfig: Replace u16 and u32 with uint16_t and uint32_t Masami Hiramatsu
2021-09-17 10:03 ` [PATCH 7/7] bootconfig: Cleanup dummy headers in tools/bootconfig 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=163187298106.2366983.15210300267326257397.stgit@devnote2 \
--to=mhiramat@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.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