summaryrefslogtreecommitdiffstats
path: root/arch/c6x
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2019-09-26 18:22:59 +0200
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-09-28 23:13:39 +0200
commit968e5170939662341242812b9c82ef51cf140a33 (patch)
tree55b5f965485179f55046d23c82426240baf62f4d /arch/c6x
parenttracing/probe: Fix to check the difference of nr_args before adding probe (diff)
downloadlinux-968e5170939662341242812b9c82ef51cf140a33.tar.xz
linux-968e5170939662341242812b9c82ef51cf140a33.zip
tracing: Fix clang -Wint-in-bool-context warnings in IF_ASSIGN macro
After r372664 in clang, the IF_ASSIGN macro causes a couple hundred warnings along the lines of: kernel/trace/trace_output.c:1331:2: warning: converting the enum constant to a boolean [-Wint-in-bool-context] kernel/trace/trace.h:409:3: note: expanded from macro 'trace_assign_type' IF_ASSIGN(var, ent, struct ftrace_graph_ret_entry, ^ kernel/trace/trace.h:371:14: note: expanded from macro 'IF_ASSIGN' WARN_ON(id && (entry)->type != id); \ ^ 264 warnings generated. This warning can catch issues with constructs like: if (state == A || B) where the developer really meant: if (state == A || state == B) This is currently the only occurrence of the warning in the kernel tree across defconfig, allyesconfig, allmodconfig for arm32, arm64, and x86_64. Add the implicit '!= 0' to the WARN_ON statement to fix the warnings and find potential issues in the future. Link: https://github.com/llvm/llvm-project/commit/28b38c277a2941e9e891b2db30652cfd962f070b Link: https://github.com/ClangBuiltLinux/linux/issues/686 Link: http://lkml.kernel.org/r/20190926162258.466321-1-natechancellor@gmail.com Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'arch/c6x')
0 files changed, 0 insertions, 0 deletions