Skip to content

Commit

Permalink
perf trace x86_arch_prctl: Address shellcheck warnings about local va…
Browse files Browse the repository at this point in the history
…riables

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 <[email protected]>
Acked-by: Ian Rogers <[email protected]>
Cc: Disha Goel <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Madhavan Srinivasan <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
athira-rajeev authored and acmel committed Aug 3, 2023
1 parent 1e094f9 commit 5e9310a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/perf/trace/beauty/x86_arch_prctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e9310a

Please sign in to comment.