diff options
author | Kajol Jain <kjain@linux.ibm.com> | 2023-07-09 23:57:49 +0530 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-08-03 17:01:26 -0300 |
commit | e936584214b93929eb41ec598959469e3a1f6079 (patch) | |
tree | d7cf97e15c79bb0ea854285b6c54698238e47a18 /tools/perf/check-headers.sh | |
parent | f188b2ce65730178f8dc0d105beb759719a12e6c (diff) | |
download | linux-e936584214b93929eb41ec598959469e3a1f6079.tar.gz linux-e936584214b93929eb41ec598959469e3a1f6079.tar.bz2 linux-e936584214b93929eb41ec598959469e3a1f6079.zip |
perf build: Fix shellcheck issue about quotes for check-headers.sh
Running shellcheck on check-headers.sh generates below warning:
In check-headers.sh line 126:
check_2 "tools/$file" "$file" $*
^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems.
In check-headers.sh line 134:
check_2 "tools/perf/trace/beauty/$file" "$file" $*
^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems.
In check-headers.sh line 186:
cd tools/perf
^-----------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
Fixed the warnings by:
- Using "$@" instead of $*
- Adding exit condition with cd command
Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Disha Goel <disgoel@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20230709182800.53002-16-atrajeev@linux.vnet.ibm.com
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/check-headers.sh')
-rwxr-xr-x | tools/perf/check-headers.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh index a0f1d8adce60..4314c9197850 100755 --- a/tools/perf/check-headers.sh +++ b/tools/perf/check-headers.sh @@ -123,7 +123,7 @@ check () { shift - check_2 "tools/$file" "$file" $* + check_2 "tools/$file" "$file" "$@" } beauty_check () { @@ -131,7 +131,7 @@ beauty_check () { shift - check_2 "tools/perf/trace/beauty/$file" "$file" $* + check_2 "tools/perf/trace/beauty/$file" "$file" "$@" } # Check if we have the kernel headers (tools/perf/../../include), else @@ -183,7 +183,7 @@ done check_2 tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h check_2 tools/perf/util/hashmap.c tools/lib/bpf/hashmap.c -cd tools/perf +cd tools/perf || exit if [ ${#FAILURES[@]} -gt 0 ] then |