提交 17d25ae7 编写于 作者: M Masami Hiramatsu 提交者: Steven Rostedt (VMware)

tools/bootconfig: Fix wrong __VA_ARGS__ usage

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: 950313eb ("tools: bootconfig: Add bootconfig command")
Reported-by: NMichael Ellerman <mpe@ellerman.id.au>
Tested-by: NMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
上级 a0057403
......@@ -7,7 +7,7 @@
/* controllable printf */
extern int pr_output;
#define printk(fmt, ...) \
(pr_output ? printf(fmt, __VA_ARGS__) : 0)
(pr_output ? printf(fmt, ##__VA_ARGS__) : 0)
#define pr_err printk
#define pr_warn printk
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册