linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf intel-bts: Use true,false for bool variable
@ 2020-11-06  6:29 xiakaixu1987
  2020-11-09 11:39 ` Peter Zijlstra
  0 siblings, 1 reply; 3+ messages in thread
From: xiakaixu1987 @ 2020-11-06  6:29 UTC (permalink / raw)
  To: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
	namhyung, adrian.hunter
  Cc: linux-kernel, Kaixu Xia

From: Kaixu Xia <kaixuxia@tencent.com>

Fix the following coccinelle reports:

./tools/perf/util/intel-bts.c:472:3-13: WARNING: Assignment of 0/1 to bool variable
./tools/perf/util/intel-bts.c:515:3-13: WARNING: Assignment of 0/1 to bool variable

Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
 tools/perf/util/intel-bts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.c
index af1e78d76228..aa4fad92c79b 100644
--- a/tools/perf/util/intel-bts.c
+++ b/tools/perf/util/intel-bts.c
@@ -469,7 +469,7 @@ static int intel_bts_process_queue(struct intel_bts_queue *btsq, u64 *timestamp)
 
 	if (!buffer) {
 		if (!btsq->bts->sampling_mode)
-			btsq->done = 1;
+			btsq->done = true;
 		err = 1;
 		goto out_put;
 	}
@@ -512,7 +512,7 @@ static int intel_bts_process_queue(struct intel_bts_queue *btsq, u64 *timestamp)
 			*timestamp = btsq->buffer->reference;
 	} else {
 		if (!btsq->bts->sampling_mode)
-			btsq->done = 1;
+			btsq->done = true;
 	}
 out_put:
 	thread__put(thread);
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-09 16:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06  6:29 [PATCH] perf intel-bts: Use true,false for bool variable xiakaixu1987
2020-11-09 11:39 ` Peter Zijlstra
2020-11-09 16:22   ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).