perf arch x86: Address shellcheck warnings about unused variables in syscalltbl.sh
authorAthira Rajeev <atrajeev@linux.vnet.ibm.com>
Sun, 9 Jul 2023 18:27:55 +0000 (23:57 +0530)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 3 Aug 2023 20:01:26 +0000 (17:01 -0300)
Running shellcheck on syscalltbl.sh generates below warning:

   In ./tools/perf/arch/x86/entry/syscalls/syscalltbl.sh line 27:
   while read nr abi name entry compat; do
                 ^-^ SC2034 (warning): abi appears unused. Verify use (or export if used externally).
                                ^----^ SC2034 (warning): compat appears unused. Verify use (or export if used externally).

These variables are intentionally unused since they are needed to parse
through the output. Use "_" as a prefix for these throw away variables.

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-22-atrajeev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/x86/entry/syscalls/syscalltbl.sh

index fa526a9..59d7914 100755 (executable)
@@ -24,7 +24,7 @@ sorted_table=$(mktemp /tmp/syscalltbl.XXXXXX)
 grep '^[0-9]' "$in" | sort -n > $sorted_table
 
 max_nr=0
-while read nr abi name entry compat; do
+while read nr _abi name entry _compat; do
     if [ $nr -ge 512 ] ; then # discard compat sycalls
         break
     fi