treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / tools / lib / perf / internal.h
blob2c27e158de6b1fcd8ab0a93a4f4359a395c0d52a
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __LIBPERF_INTERNAL_H
3 #define __LIBPERF_INTERNAL_H
5 #include <perf/core.h>
7 void libperf_print(enum libperf_print_level level,
8 const char *format, ...)
9 __attribute__((format(printf, 2, 3)));
11 #define __pr(level, fmt, ...) \
12 do { \
13 libperf_print(level, "libperf: " fmt, ##__VA_ARGS__); \
14 } while (0)
16 #define pr_err(fmt, ...) __pr(LIBPERF_ERR, fmt, ##__VA_ARGS__)
17 #define pr_warning(fmt, ...) __pr(LIBPERF_WARN, fmt, ##__VA_ARGS__)
18 #define pr_info(fmt, ...) __pr(LIBPERF_INFO, fmt, ##__VA_ARGS__)
19 #define pr_debug(fmt, ...) __pr(LIBPERF_DEBUG, fmt, ##__VA_ARGS__)
20 #define pr_debug2(fmt, ...) __pr(LIBPERF_DEBUG2, fmt, ##__VA_ARGS__)
21 #define pr_debug3(fmt, ...) __pr(LIBPERF_DEBUG3, fmt, ##__VA_ARGS__)
23 #endif /* __LIBPERF_INTERNAL_H */