* [PATCH] perf check-headers.sh: Fix check-headers.sh opts assignment
@ 2018-03-21 14:05 Jiri Olsa
2018-03-26 14:20 ` Arnaldo Carvalho de Melo
2018-03-29 13:57 ` [tip:perf/core] perf build: " tip-bot for Jiri Olsa
0 siblings, 2 replies; 3+ messages in thread
From: Jiri Olsa @ 2018-03-21 14:05 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
Peter Zijlstra
Currently opts variable is not zero-ed and we keep
on adding to it, ending up with:
$ check-headers.sh 2>&1
+ opts=' "-B"'
+ opts=' "-B" "-B"'
+ opts=' "-B" "-B" "-B"'
+ opts=' "-B" "-B" "-B" "-B"'
+ opts=' "-B" "-B" "-B" "-B" "-B"'
+ opts=' "-B" "-B" "-B" "-B" "-B" "-B"'
Fixing this by initializing the opts variable.
Link: http://lkml.kernel.org/n/tip-chyv198z0tc2knnm2zdn4ms1@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
| 1 +
1 file changed, 1 insertion(+)
--git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index bf206ffe5c45..9aff89bc7535 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -59,6 +59,7 @@ check () {
file=$1
shift
+ opts=
while [ -n "$*" ]; do
opts="$opts \"$1\""
shift
--
2.13.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf check-headers.sh: Fix check-headers.sh opts assignment
2018-03-21 14:05 [PATCH] perf check-headers.sh: Fix check-headers.sh opts assignment Jiri Olsa
@ 2018-03-26 14:20 ` Arnaldo Carvalho de Melo
2018-03-29 13:57 ` [tip:perf/core] perf build: " tip-bot for Jiri Olsa
1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-03-26 14:20 UTC (permalink / raw)
To: Jiri Olsa
Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
Peter Zijlstra
Em Wed, Mar 21, 2018 at 03:05:15PM +0100, Jiri Olsa escreveu:
> Currently opts variable is not zero-ed and we keep
> on adding to it, ending up with:
>
> $ check-headers.sh 2>&1
> + opts=' "-B"'
> + opts=' "-B" "-B"'
> + opts=' "-B" "-B" "-B"'
> + opts=' "-B" "-B" "-B" "-B"'
> + opts=' "-B" "-B" "-B" "-B" "-B"'
> + opts=' "-B" "-B" "-B" "-B" "-B" "-B"'
Thanks, tested and applied.
- Arnaldo
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:perf/core] perf build: Fix check-headers.sh opts assignment
2018-03-21 14:05 [PATCH] perf check-headers.sh: Fix check-headers.sh opts assignment Jiri Olsa
2018-03-26 14:20 ` Arnaldo Carvalho de Melo
@ 2018-03-29 13:57 ` tip-bot for Jiri Olsa
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Jiri Olsa @ 2018-03-29 13:57 UTC (permalink / raw)
To: linux-tip-commits
Cc: peterz, hpa, alexander.shishkin, dsahern, acme, namhyung,
linux-kernel, jolsa, tglx, mingo
Commit-ID: b4c786e5aa69c5a75ac3932f81fdf8e8c120c03b
Gitweb: https://git.kernel.org/tip/b4c786e5aa69c5a75ac3932f81fdf8e8c120c03b
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Wed, 21 Mar 2018 15:05:15 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 27 Mar 2018 13:13:38 -0300
perf build: Fix check-headers.sh opts assignment
Currently the "opts" variable is not zero-ed and we keep on adding to
it, ending up with:
$ check-headers.sh 2>&1
+ opts=' "-B"'
+ opts=' "-B" "-B"'
+ opts=' "-B" "-B" "-B"'
+ opts=' "-B" "-B" "-B" "-B"'
+ opts=' "-B" "-B" "-B" "-B" "-B"'
+ opts=' "-B" "-B" "-B" "-B" "-B" "-B"'
Fix this by initializing it in the check() function, right before
starting the loop.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180321140515.2252-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
| 1 +
1 file changed, 1 insertion(+)
--git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index bf206ffe5c45..9aff89bc7535 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -59,6 +59,7 @@ check () {
file=$1
shift
+ opts=
while [ -n "$*" ]; do
opts="$opts \"$1\""
shift
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-29 13:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-21 14:05 [PATCH] perf check-headers.sh: Fix check-headers.sh opts assignment Jiri Olsa
2018-03-26 14:20 ` Arnaldo Carvalho de Melo
2018-03-29 13:57 ` [tip:perf/core] perf build: " tip-bot for Jiri Olsa
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).