linux/tools/perf/arch/x86
Haoze Xie 759ce73cf7 perf build x86: Fix SC2034 error in syscalltbl.sh
Change the unused var in 'arch/x86/entry/syscalls/syscalltbl.sh' to '_'
when reading from '$sorted_table'. This change allows the script to pass
tests of ShellCheck before and after version 0.7.2 at the same time.

When building in arch x86, syscalltbl.sh got a ShellCheck warning, which
makes compilation error:

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

The script reads unused param abi and compat. It uses format '_xxx' to
indicate dummy vars, which won't work properly when ShellCheck <= 0.7.2.

According to SC2034, the more general way of writing is to use directly
'_' to indicate discarding vars. 'entry' is also replaced by '_' because
it just happens to be defined in emit function, otherwise it will lead
to some misunderstandings.

Link: https://www.shellcheck.net/wiki/SC2034
Signed-off-by: Haoze Xie <royenheart@gmail.com>
Signed-off-by: Yuan Tan <tanyuan@tinylab.org>
Link: https://lore.kernel.org/r/2143cab4cd8468c88860f4e5e382d0e6b4d89ac9.1720372178.git.royenheart@gmail.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2024-07-12 09:38:40 -07:00
..
annotate perf annotate: Add more x86 mov instruction cases 2023-09-15 16:46:40 -07:00
entry/syscalls perf build x86: Fix SC2034 error in syscalltbl.sh 2024-07-12 09:38:40 -07:00
include perf parse-regs: Remove unused macros PERF_REG_{IP|SP} 2023-08-16 08:48:06 -03:00
tests perf test: Make tests its own library 2024-06-26 11:07:11 -07:00
util perf intel-pt: Fix exclude_guest setting 2024-07-02 15:24:07 -07:00
Build perf util: Make util its own library 2024-06-26 11:07:42 -07:00
Makefile treewide: remove meaningless assignments in Makefiles 2024-02-23 14:19:07 -08:00