Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tools lib api: Renaming pr_warning to pr_warn

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.

Link: http://lkml.kernel.org/r/20191018031850.48498-30-wangkefeng.wang@huawei.com
To: linux-kernel@vger.kernel.org
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>

authored by

Kefeng Wang and committed by
Petr Mladek
c405c37b 2304d447

+6 -6
+2 -2
tools/lib/api/debug-internal.h
··· 10 10 (func)("libapi: " fmt, ##__VA_ARGS__); \ 11 11 } while (0) 12 12 13 - extern libapi_print_fn_t __pr_warning; 13 + extern libapi_print_fn_t __pr_warn; 14 14 extern libapi_print_fn_t __pr_info; 15 15 extern libapi_print_fn_t __pr_debug; 16 16 17 - #define pr_warning(fmt, ...) __pr(__pr_warning, fmt, ##__VA_ARGS__) 17 + #define pr_warn(fmt, ...) __pr(__pr_warn, fmt, ##__VA_ARGS__) 18 18 #define pr_info(fmt, ...) __pr(__pr_info, fmt, ##__VA_ARGS__) 19 19 #define pr_debug(fmt, ...) __pr(__pr_debug, fmt, ##__VA_ARGS__) 20 20
+2 -2
tools/lib/api/debug.c
··· 15 15 return err; 16 16 } 17 17 18 - libapi_print_fn_t __pr_warning = __base_pr; 18 + libapi_print_fn_t __pr_warn = __base_pr; 19 19 libapi_print_fn_t __pr_info = __base_pr; 20 20 libapi_print_fn_t __pr_debug; 21 21 ··· 23 23 libapi_print_fn_t info, 24 24 libapi_print_fn_t debug) 25 25 { 26 - __pr_warning = warn; 26 + __pr_warn = warn; 27 27 __pr_info = info; 28 28 __pr_debug = debug; 29 29 }
+2 -2
tools/lib/api/fs/fs.c
··· 381 381 n = read(fd, bf + size, alloc_size - size); 382 382 if (n < 0) { 383 383 if (size) { 384 - pr_warning("read failed %d: %s\n", errno, 385 - strerror_r(errno, sbuf, sizeof(sbuf))); 384 + pr_warn("read failed %d: %s\n", errno, 385 + strerror_r(errno, sbuf, sizeof(sbuf))); 386 386 err = 0; 387 387 } else 388 388 err = -errno;