linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix misleading indentation issues in perf
@ 2015-12-12 18:07 Markus Trippelsdorf
  2015-12-14  8:19 ` Ingo Molnar
  2015-12-14 10:46 ` Matt Fleming
  0 siblings, 2 replies; 11+ messages in thread
From: Markus Trippelsdorf @ 2015-12-12 18:07 UTC (permalink / raw)
  To: Matt Fleming
  Cc: Arnaldo Carvalho de Melo, linux-kernel, Ingo Molnar, Peter Zijlstra

perf doesn't build with gcc-6 because of several misleading-indentation
warnings, e.g.:

arch/x86/tests/intel-cqm.c: In function ‘spawn’:
arch/x86/tests/intel-cqm.c:21:3: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
   sleep(5);
   ^~~~~

arch/x86/tests/intel-cqm.c:20:2: note: ...this ‘while’ clause, but it is not
  while(1);
  ^~~~~

Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>

diff --git a/tools/perf/arch/x86/tests/intel-cqm.c b/tools/perf/arch/x86/tests/intel-cqm.c
index d28c1b6a3b54..fa5d17af88b7 100644
--- a/tools/perf/arch/x86/tests/intel-cqm.c
+++ b/tools/perf/arch/x86/tests/intel-cqm.c
@@ -17,7 +17,7 @@ static pid_t spawn(void)
 	if (pid)
 		return pid;
 
-	while(1);
+	while(1)
 		sleep(5);
 	return 0;
 }
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index d4d7cc27252f..718bd46d47fa 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -755,11 +755,11 @@ static int annotate_browser__run(struct annotate_browser *browser,
 				nd = browser->curr_hot;
 			break;
 		case K_UNTAB:
-			if (nd != NULL)
+			if (nd != NULL) {
 				nd = rb_next(nd);
 				if (nd == NULL)
 					nd = rb_first(&browser->entries);
-			else
+			} else
 				nd = browser->curr_hot;
 			break;
 		case K_F1:
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index e4b173dec4b9..c900b664ab8f 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -153,7 +153,7 @@ static int perf_pmu__parse_unit(struct perf_pmu_alias *alias, char *dir, char *n
 	if (fd == -1)
 		return -1;
 
-		sret = read(fd, alias->unit, UNIT_MAX_LEN);
+	sret = read(fd, alias->unit, UNIT_MAX_LEN);
 	if (sret < 0)
 		goto error;
 
-- 
Markus

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

end of thread, other threads:[~2016-02-03 10:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-12 18:07 [PATCH] Fix misleading indentation issues in perf Markus Trippelsdorf
2015-12-14  8:19 ` Ingo Molnar
2015-12-14 10:46 ` Matt Fleming
2015-12-14 15:14   ` Arnaldo Carvalho de Melo
2015-12-14 15:43     ` [PATCH 1/3] Remove wrong semicolon in while loop Markus Trippelsdorf
2015-12-14 17:55       ` Arnaldo Carvalho de Melo
2016-01-30  8:24       ` [tip:perf/urgent] perf tests: Remove wrong semicolon in while loop in CQM test tip-bot for Markus Trippelsdorf
2015-12-14 15:44     ` [PATCH 2/3] Add missing braces to if statement Markus Trippelsdorf
2016-01-30  8:24       ` [tip:perf/urgent] perf annotate browser: Fix behaviour of Shift-Tab with nothing focussed tip-bot for Markus Trippelsdorf
2015-12-14 15:44     ` [PATCH 3/3] Fix misleadingly indented assignment (whitespace) Markus Trippelsdorf
2016-02-03 10:06       ` [tip:perf/core] perf pmu: Fix misleadingly indented assignment ( whitespace) tip-bot for Markus Trippelsdorf

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).