mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 15:41:36 +00:00
c405c37bd9
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>
22 lines
576 B
C
22 lines
576 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __API_DEBUG_INTERNAL_H__
|
|
#define __API_DEBUG_INTERNAL_H__
|
|
|
|
#include "debug.h"
|
|
|
|
#define __pr(func, fmt, ...) \
|
|
do { \
|
|
if ((func)) \
|
|
(func)("libapi: " fmt, ##__VA_ARGS__); \
|
|
} while (0)
|
|
|
|
extern libapi_print_fn_t __pr_warn;
|
|
extern libapi_print_fn_t __pr_info;
|
|
extern libapi_print_fn_t __pr_debug;
|
|
|
|
#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__)
|
|
|
|
#endif /* __API_DEBUG_INTERNAL_H__ */
|