From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Petr Mladek <pmladek@suse.com>, <linux-kernel@vger.kernel.org>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: [PATCH v2 30/33] tools lib api: Renaming pr_warning to pr_warn
Date: Fri, 18 Oct 2019 11:18:47 +0800 [thread overview]
Message-ID: <20191018031850.48498-30-wangkefeng.wang@huawei.com> (raw)
In-Reply-To: <20191018031850.48498-1-wangkefeng.wang@huawei.com>
For kernel logging macro, pr_warning is completely removed and
replaced by pr_warn, using pr_warn in tools lib api for symmetry
to kernel logging macro, then we could drop pr_warning in the
whole linux code.
Changing __pr_warning to __pr_warn to be consistent.
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
tools/lib/api/debug-internal.h | 4 ++--
tools/lib/api/debug.c | 4 ++--
tools/lib/api/fs/fs.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/lib/api/debug-internal.h b/tools/lib/api/debug-internal.h
index 80c783497d25..5a5820c11db8 100644
--- a/tools/lib/api/debug-internal.h
+++ b/tools/lib/api/debug-internal.h
@@ -10,11 +10,11 @@ do { \
(func)("libapi: " fmt, ##__VA_ARGS__); \
} while (0)
-extern libapi_print_fn_t __pr_warning;
+extern libapi_print_fn_t __pr_warn;
extern libapi_print_fn_t __pr_info;
extern libapi_print_fn_t __pr_debug;
-#define pr_warning(fmt, ...) __pr(__pr_warning, fmt, ##__VA_ARGS__)
+#define pr_warn(fmt, ...) __pr(__pr_warn, fmt, ##__VA_ARGS__)
#define pr_info(fmt, ...) __pr(__pr_info, fmt, ##__VA_ARGS__)
#define pr_debug(fmt, ...) __pr(__pr_debug, fmt, ##__VA_ARGS__)
diff --git a/tools/lib/api/debug.c b/tools/lib/api/debug.c
index 69b1ba3d1ee3..7708f0558e8c 100644
--- a/tools/lib/api/debug.c
+++ b/tools/lib/api/debug.c
@@ -15,7 +15,7 @@ static int __base_pr(const char *format, ...)
return err;
}
-libapi_print_fn_t __pr_warning = __base_pr;
+libapi_print_fn_t __pr_warn = __base_pr;
libapi_print_fn_t __pr_info = __base_pr;
libapi_print_fn_t __pr_debug;
@@ -23,7 +23,7 @@ void libapi_set_print(libapi_print_fn_t warn,
libapi_print_fn_t info,
libapi_print_fn_t debug)
{
- __pr_warning = warn;
+ __pr_warn = warn;
__pr_info = info;
__pr_debug = debug;
}
diff --git a/tools/lib/api/fs/fs.c b/tools/lib/api/fs/fs.c
index 7aba8243a0e7..11b3885e833e 100644
--- a/tools/lib/api/fs/fs.c
+++ b/tools/lib/api/fs/fs.c
@@ -381,8 +381,8 @@ int filename__read_str(const char *filename, char **buf, size_t *sizep)
n = read(fd, bf + size, alloc_size - size);
if (n < 0) {
if (size) {
- pr_warning("read failed %d: %s\n", errno,
- strerror_r(errno, sbuf, sizeof(sbuf)));
+ pr_warn("read failed %d: %s\n", errno,
+ strerror_r(errno, sbuf, sizeof(sbuf)));
err = 0;
} else
err = -errno;
--
2.20.1
next prev parent reply other threads:[~2019-10-18 5:05 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191018031710.41052-1-wangkefeng.wang@huawei.com>
2019-10-18 3:18 ` [PATCH v2 01/33] alpha: Use pr_warn instead of pr_warning Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 02/33] arm64: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 03/33] ia64: " Kefeng Wang
2019-10-18 16:35 ` Luck, Tony
2019-10-18 3:18 ` [PATCH v2 04/33] riscv: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 05/33] sh: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 06/33] sparc: " Kefeng Wang
2019-10-18 4:58 ` David Miller
2019-10-18 3:18 ` [PATCH v2 07/33] x86: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 08/33] acpi: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 09/33] drbd: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 10/33] gdrom: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 11/33] clocksource: samsung_pwm_timer: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 12/33] crypto: n2: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 13/33] ide: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 14/33] idsn: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 15/33] macintosh: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 16/33] of: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 17/33] oprofile: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 18/33] platform/x86: eeepc-laptop: " Kefeng Wang
2019-10-18 7:51 ` Andy Shevchenko
2019-10-18 3:18 ` [PATCH v2 19/33] platform/x86: asus-laptop: " Kefeng Wang
2019-10-18 7:51 ` Andy Shevchenko
2019-10-18 3:18 ` [PATCH v2 20/33] platform/x86: intel_oaktrail: " Kefeng Wang
2019-10-18 7:52 ` Andy Shevchenko
2019-10-18 3:18 ` [PATCH v2 21/33] scsi: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 22/33] sh/intc: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 23/33] fs: afs: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 24/33] vgacon: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 25/33] dma-debug: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 26/33] trace: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 27/33] lib: cpu_rmap: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 28/33] ASoC: samsung: " Kefeng Wang
2019-10-18 8:55 ` Sylwester Nawrocki
2019-10-18 3:18 ` [PATCH v2 29/33] printk: Drop pr_warning Kefeng Wang
2019-10-18 3:18 ` Kefeng Wang [this message]
2019-10-18 3:18 ` [PATCH v2 31/33] tools lib bpf: Renaming pr_warning to pr_warn Kefeng Wang
2019-10-18 4:24 ` Alexei Starovoitov
2019-10-18 7:04 ` Petr Mladek
2019-10-18 18:52 ` Daniel Borkmann
2019-10-21 5:55 ` [bpf-next] " Kefeng Wang
2019-10-21 12:55 ` Daniel Borkmann
2019-10-18 3:18 ` [PATCH v2 32/33] tools perf: " Kefeng Wang
2019-10-18 3:18 ` [PATCH v2 33/33] checkpatch: Drop pr_warning check Kefeng Wang
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=20191018031850.48498-30-wangkefeng.wang@huawei.com \
--to=wangkefeng.wang@huawei.com \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=sergey.senozhatsky@gmail.com \
/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