mirror of
https://github.com/torvalds/linux.git
synced 2026-11-26 08:23:17 +00:00
Since printk() wrapper macro uses __VA_ARGS__ without "##" prefix, it causes
a build error if there is no variable arguments (e.g. only fmt is
specified.) To fix this error, use ##__VA_ARGS__ instead of __VAR_ARGS__.
Link: http://lkml.kernel.org/r/158108370130.2758.10893830923800978011.stgit@devnote2
Fixes: 950313ebf7 ("tools: bootconfig: Add bootconfig command")
Reported-by: Michael Ellerman <[email protected]>
Tested-by: Michael Ellerman <[email protected]>
Signed-off-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
18 lines
338 B
C
18 lines
338 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _SKC_LINUX_PRINTK_H
|
|
#define _SKC_LINUX_PRINTK_H
|
|
|
|
#include <stdio.h>
|
|
|
|
/* controllable printf */
|
|
extern int pr_output;
|
|
#define printk(fmt, ...) \
|
|
(pr_output ? printf(fmt, ##__VA_ARGS__) : 0)
|
|
|
|
#define pr_err printk
|
|
#define pr_warn printk
|
|
#define pr_info printk
|
|
#define pr_debug printk
|
|
|
|
#endif
|