diff options
author | Athira Rajeev <atrajeev@linux.vnet.ibm.com> | 2023-07-09 23:57:54 +0530 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-08-03 17:01:26 -0300 |
commit | 5e9310ae235bc304a522f14a7fce6293e3cb9d14 (patch) | |
tree | d45a3f18e0474b4127faaf49ecc097ae5474dcc7 | |
parent | 1e094f925e1ec2825586b6a7c15f90afed9c1468 (diff) | |
download | lwn-5e9310ae235bc304a522f14a7fce6293e3cb9d14.tar.gz lwn-5e9310ae235bc304a522f14a7fce6293e3cb9d14.zip |
perf trace x86_arch_prctl: Address shellcheck warnings about local variables
Running shellcheck on x86_arch_prctl.sh generates below warning:
In ./tools/perf/trace/beauty/x86_arch_prctl.sh line 10:
local idx=$1
^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
In ./tools/perf/trace/beauty/x86_arch_prctl.sh line 11:
local prefix=$2
^----------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
In ./tools/perf/trace/beauty/x86_arch_prctl.sh line 12:
local first_entry=$3
^---------------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
Fix this by removing local since these are variables used only in
specific function
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Disha Goel <disgoel@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kajol Jain <kjain@linux.ibm.com>
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-21-atrajeev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-x | tools/perf/trace/beauty/x86_arch_prctl.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/trace/beauty/x86_arch_prctl.sh b/tools/perf/trace/beauty/x86_arch_prctl.sh index fd5c740512c5..b1596df251f0 100755 --- a/tools/perf/trace/beauty/x86_arch_prctl.sh +++ b/tools/perf/trace/beauty/x86_arch_prctl.sh @@ -7,9 +7,9 @@ prctl_arch_header=${x86_header_dir}/prctl.h print_range () { - local idx=$1 - local prefix=$2 - local first_entry=$3 + idx=$1 + prefix=$2 + first_entry=$3 printf "#define x86_arch_prctl_codes_%d_offset %s\n" $idx $first_entry printf "static const char *x86_arch_prctl_codes_%d[] = {\n" $idx |