Skip to content

Commit

Permalink
tools/bootconfig: Fix wrong __VA_ARGS__ usage
Browse files Browse the repository at this point in the history
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: 950313e ("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]>
  • Loading branch information
mhiramat authored and rostedt committed Feb 10, 2020
1 parent a005740 commit 17d25ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/bootconfig/include/linux/printk.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 17d25ae

Please sign in to comment.