Skip to content

Commit 3583ab2

Browse files
arndbRussell King (Oracle)
authored andcommitted
ARM: 9135/1: kprobes: address gcc -Wempty-body warning
Building with 'make W=1' shows a warning in some configurations when 'verbose()' is defined to be empty. arch/arm/probes/kprobes/test-core.c: In function 'kprobes_test_case_start': arch/arm/probes/kprobes/test-core.c:1367:26: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] 1367 | current_instruction); | ^ Change the definition of verbose() to use no_printk(), allowing format string checking and avoiding the warning. Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]>
1 parent 20a451f commit 3583ab2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/probes/kprobes/test-core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ struct test_arg_end {
9898
#if VERBOSE
9999
#define verbose(fmt, ...) pr_info(fmt, ##__VA_ARGS__)
100100
#else
101-
#define verbose(fmt, ...)
101+
#define verbose(fmt, ...) no_printk(fmt, ##__VA_ARGS__)
102102
#endif
103103

104104
#define TEST_GROUP(title) \

0 commit comments

Comments
 (0)