tracing: Use cpumask_available() to check if cpumask variable may be used
PATCH 1/1 tracing: Use cpumask_available() to check if cpumask variable may be used
This fixes the following clang warning:
kernel/trace/trace.c:3231:12: warning: address of array 'iter->started'
will always evaluate to 'true' [-Wpointer-bool-conversion]
if (iter->started)
---
Dependencies:
- "cpumask: Add helper cpumask_available()"
- git.kernel.org tip master f7e30f01a9e2
- https://patchwork.kernel.org/patch/9678159/
kernel/trace/trace.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
kernel/trace/trace.c +3 -2
@@ -3222,13 +3222,14 @@ static void test_cpu_buff_start(struct trace_iterator *iter)if (!(iter->iter_flags &TRACE_FILE_ANNOTATE ))return ; -if (iter->started &&cpumask_test_cpu (iter->cpu, iter->started)) +if (cpumask_available (iter->started) && +cpumask_test_cpu (iter->cpu, iter->started))return ;if (per_cpu_ptr (iter->trace_buffer->data, iter->cpu)->skipped_entries)return ; -if (iter->started) +if (cpumask_available (iter->started))cpumask_set_cpu (iter->cpu, iter->started);/* Don't print started cpu buffer for the first entry of the trace */
Signature · 1 line
2.12.2.816.g2cccc81164-goog
El Fri, Apr 21, 2017 at 04:41:10PM -0700 Matthias Kaehlcke ha dit:
Quoted 4 lines
This fixes the following clang warning:
kernel/trace/trace.c:3231:12: warning: address of array 'iter->started'
will always evaluate to 'true' [-Wpointer-bool-conversion]
Quoted 8 lines
if (iter->started)Signed-off-by Matthias Kaehlcke <[email protected]>---
Dependencies:
- "cpumask: Add helpercpumask_available()"
- git.kernel.org tip masterf7e30f01a9e2
- https://patchwork.kernel.org/patch/9678159/
Ping, any comments on this patch?
FYI: the dependency has landed in Linus' tree (f7e30f01a9e2)
Thanks
Matthias
Steven Rostedt
maintainerQuoted 15 lines · On Mon, 8 May 2017 15:36:16 -0700 Matthias Kaehlcke <[email protected]> wrote:
El Fri, Apr 21, 2017 at 04:41:10PM -0700 Matthias Kaehlcke ha dit:
Quoted 4 lines
This fixes the following clang warning:
kernel/trace/trace.c:3231:12: warning: address of array 'iter->started'
will always evaluate to 'true' [-Wpointer-bool-conversion]Quoted 8 lines
if (iter->started)Signed-off-by Matthias Kaehlcke <[email protected]>---
Dependencies:
- "cpumask: Add helpercpumask_available()"
- git.kernel.org tip masterf7e30f01a9e2
- https://patchwork.kernel.org/patch/9678159/
Quoted 4 lines
Ping, any comments on this patch?
FYI: the dependency has landed in Linus' tree (
f7e30f01a9e2)
Thanks for the ping. I'll test it some bit and try to get it out during this merge window.
-- Steve