LKML Archive on
 help / color / Atom feed
From: Matthias Kaehlcke <>
To: Steven Rostedt <>, Ingo Molnar <>
	Grant Grundler <>,
	Greg Hackmann <>,
	Michael Davidson <>,
	Matthias Kaehlcke <>
Subject: [PATCH] tracing: Use cpumask_available() to check if cpumask variable may be used
Date: Fri, 21 Apr 2017 16:41:10 -0700
Message-ID: <> (raw)

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)

Signed-off-by: Matthias Kaehlcke <>
- "cpumask: Add helper cpumask_available()"
  - tip master f7e30f01a9e2

 kernel/trace/trace.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index d484452ae648..95eeefc08605 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3222,13 +3222,14 @@ static void test_cpu_buff_start(struct trace_iterator *iter)
 	if (!(iter->iter_flags & TRACE_FILE_ANNOTATE))
-	if (iter->started && cpumask_test_cpu(iter->cpu, iter->started))
+	if (cpumask_available(iter->started) &&
+	    cpumask_test_cpu(iter->cpu, iter->started))
 	if (per_cpu_ptr(iter->trace_buffer->data, iter->cpu)->skipped_entries)
-	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 */

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21 23:41 Matthias Kaehlcke [this message]
2017-05-08 22:36 ` Matthias Kaehlcke
2017-05-09  1:24   ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone