ShellCheck - shell script analysis tool version: 0.10.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.tzVtFZF1Vq and /tmp/tmp.lYe8nZxqes Tree base: 359a91589ea2 ("selftests/bpf: BTF distill tests to ensure LOC[_PARAM|_PROTO] add to split BTF") Now at: 81b59a160757 ("kbuild: Add support for extra BTF") ====== Checking before the patch ====== Checking scripts/link-vmlinux.sh - 1a5ec77b938a1281fa5a5a03577fa372e6dca61be17ce2f2dbf3a5a02ee9578a In link-vmlinux.sh line 51: local output=${1} ^----------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local output="${1}" In link-vmlinux.sh line 52: local objs ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In link-vmlinux.sh line 53: local libs ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In link-vmlinux.sh line 54: local ld ^------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In link-vmlinux.sh line 55: local ldflags ^-----------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In link-vmlinux.sh line 56: local ldlibs ^----------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In link-vmlinux.sh line 58: info LD ${output} ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: info LD "${output}" In link-vmlinux.sh line 82: ldflags="${CFLAGS_vmlinux}" ^---------------^ SC2154 (warning): CFLAGS_vmlinux is referenced but not assigned (did you mean 'LDFLAGS_vmlinux'?). In link-vmlinux.sh line 91: ldflags="${ldflags} ${wl}--script=${objtree}/${KBUILD_LDS}" ^--------^ SC2154 (warning): objtree is referenced but not assigned. In link-vmlinux.sh line 102: ${ld} ${ldflags} -o ${output} \ ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${ld} "${ldflags}" -o "${output}" \ In link-vmlinux.sh line 103: ${wl}--whole-archive ${objs} ${wl}--no-whole-archive \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${wl}--whole-archive "${objs}" ${wl}--no-whole-archive \ In link-vmlinux.sh line 104: ${wl}--start-group ${libs} ${wl}--end-group \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${wl}--start-group "${libs}" ${wl}--end-group \ In link-vmlinux.sh line 105: ${kallsymso} ${btf_vmlinux_bin_o} ${arch_vmlinux_o} ${ldlibs} ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${kallsymso}" "${btf_vmlinux_bin_o}" "${arch_vmlinux_o}" "${ldlibs}" In link-vmlinux.sh line 112: local btf_data=${1}.btf.o ^------------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local btf_data="${1}".btf.o In link-vmlinux.sh line 115: LLVM_OBJCOPY="${OBJCOPY}" ${PAHOLE} -J ${PAHOLE_FLAGS} ${1} ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: LLVM_OBJCOPY="${OBJCOPY}" ${PAHOLE} -J "${PAHOLE_FLAGS}" "${1}" In link-vmlinux.sh line 123: --strip-all ${1} "${btf_data}" 2>/dev/null ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: --strip-all "${1}" "${btf_data}" 2>/dev/null In link-vmlinux.sh line 131: printf "${et_rel}" | dd of="${btf_data}" conv=notrunc bs=1 seek=16 status=none ^---------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In link-vmlinux.sh line 139: local kallsymopt; ^--------------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In link-vmlinux.sh line 146: scripts/kallsyms ${kallsymopt} "${1}" > "${2}.S" ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: scripts/kallsyms "${kallsymopt}" "${1}" > "${2}.S" In link-vmlinux.sh line 149: ${CC} ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS} \ ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${CC} "${NOSTDINC_FLAGS}" "${LINUXINCLUDE}" "${KBUILD_CPPFLAGS}" \ In link-vmlinux.sh line 150: ${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL} -c -o "${2}.o" "${2}.S" ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------------^ SC2153 (info): Possible misspelling: KBUILD_AFLAGS may not be assigned. Did you mean KBUILD_LDFLAGS? ^---------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${KBUILD_AFLAGS}" "${KBUILD_AFLAGS_KERNEL}" -c -o "${2}.o" "${2}.S" In link-vmlinux.sh line 168: info NM ${2} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: info NM "${2}" In link-vmlinux.sh line 169: ${NM} -n "${1}" | sed -f "${srctree}/scripts/mksysmap" > "${2}" ^--------^ SC2154 (warning): srctree is referenced but not assigned. In link-vmlinux.sh line 174: ${NM} -S ${1} > .tmp_vmlinux.nm-sort ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${NM} -S "${1}" > .tmp_vmlinux.nm-sort In link-vmlinux.sh line 175: ${objtree}/scripts/sorttable -s .tmp_vmlinux.nm-sort ${1} ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${objtree}"/scripts/sorttable -s .tmp_vmlinux.nm-sort "${1}" In link-vmlinux.sh line 264: size1=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" ${kallsymso}) ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: size1=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" "${kallsymso}") In link-vmlinux.sh line 268: size2=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" ${kallsymso}) ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: size2=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" "${kallsymso}") In link-vmlinux.sh line 270: if [ $size1 -ne $size2 ] || [ -n "${KALLSYMS_EXTRA_PASS}" ]; then ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$size1" -ne "$size2" ] || [ -n "${KALLSYMS_EXTRA_PASS}" ]; then In link-vmlinux.sh line 291: ${RESOLVE_BTFIDS} ${RESOLVE_BTFIDS_ARGS} "${VMLINUX}" ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${RESOLVE_BTFIDS} "${RESOLVE_BTFIDS_ARGS}" "${VMLINUX}" For more information: https://www.shellcheck.net/wiki/SC2154 -- CFLAGS_vmlinux is referenced but ... https://www.shellcheck.net/wiki/SC3043 -- In POSIX sh, 'local' is undefined. https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf... ====== Checking the tree with the patch ====== Checking scripts/link-vmlinux.sh - 1a5ec77b938a1281fa5a5a03577fa372e6dca61be17ce2f2dbf3a5a02ee9578a In link-vmlinux.sh line 51: local output=${1} ^----------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local output="${1}" In link-vmlinux.sh line 52: local objs ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In link-vmlinux.sh line 53: local libs ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In link-vmlinux.sh line 54: local ld ^------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In link-vmlinux.sh line 55: local ldflags ^-----------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In link-vmlinux.sh line 56: local ldlibs ^----------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In link-vmlinux.sh line 58: info LD ${output} ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: info LD "${output}" In link-vmlinux.sh line 82: ldflags="${CFLAGS_vmlinux}" ^---------------^ SC2154 (warning): CFLAGS_vmlinux is referenced but not assigned (did you mean 'LDFLAGS_vmlinux'?). In link-vmlinux.sh line 91: ldflags="${ldflags} ${wl}--script=${objtree}/${KBUILD_LDS}" ^--------^ SC2154 (warning): objtree is referenced but not assigned. In link-vmlinux.sh line 102: ${ld} ${ldflags} -o ${output} \ ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${ld} "${ldflags}" -o "${output}" \ In link-vmlinux.sh line 103: ${wl}--whole-archive ${objs} ${wl}--no-whole-archive \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${wl}--whole-archive "${objs}" ${wl}--no-whole-archive \ In link-vmlinux.sh line 104: ${wl}--start-group ${libs} ${wl}--end-group \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${wl}--start-group "${libs}" ${wl}--end-group \ In link-vmlinux.sh line 105: ${kallsymso} ${btf_vmlinux_bin_o} ${arch_vmlinux_o} ${ldlibs} ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${kallsymso}" "${btf_vmlinux_bin_o}" "${arch_vmlinux_o}" "${ldlibs}" In link-vmlinux.sh line 113: local btf_data=${1}.btf.o ^------------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local btf_data="${1}".btf.o In link-vmlinux.sh line 114: local btf_extra_flags= ^-------------------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In link-vmlinux.sh line 117: LLVM_OBJCOPY="${OBJCOPY}" ${PAHOLE} -J ${PAHOLE_FLAGS} ${1} ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: LLVM_OBJCOPY="${OBJCOPY}" ${PAHOLE} -J "${PAHOLE_FLAGS}" "${1}" In link-vmlinux.sh line 130: ${btf_extra_flags} --strip-all ${1} "${btf_data}" 2>/dev/null ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${btf_extra_flags}" --strip-all "${1}" "${btf_data}" 2>/dev/null In link-vmlinux.sh line 138: printf "${et_rel}" | dd of="${btf_data}" conv=notrunc bs=1 seek=16 status=none ^---------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In link-vmlinux.sh line 146: local kallsymopt; ^--------------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In link-vmlinux.sh line 153: scripts/kallsyms ${kallsymopt} "${1}" > "${2}.S" ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: scripts/kallsyms "${kallsymopt}" "${1}" > "${2}.S" In link-vmlinux.sh line 156: ${CC} ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS} \ ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${CC} "${NOSTDINC_FLAGS}" "${LINUXINCLUDE}" "${KBUILD_CPPFLAGS}" \ In link-vmlinux.sh line 157: ${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL} -c -o "${2}.o" "${2}.S" ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------------^ SC2153 (info): Possible misspelling: KBUILD_AFLAGS may not be assigned. Did you mean KBUILD_LDFLAGS? ^---------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${KBUILD_AFLAGS}" "${KBUILD_AFLAGS_KERNEL}" -c -o "${2}.o" "${2}.S" In link-vmlinux.sh line 175: info NM ${2} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: info NM "${2}" In link-vmlinux.sh line 176: ${NM} -n "${1}" | sed -f "${srctree}/scripts/mksysmap" > "${2}" ^--------^ SC2154 (warning): srctree is referenced but not assigned. In link-vmlinux.sh line 181: ${NM} -S ${1} > .tmp_vmlinux.nm-sort ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${NM} -S "${1}" > .tmp_vmlinux.nm-sort In link-vmlinux.sh line 182: ${objtree}/scripts/sorttable -s .tmp_vmlinux.nm-sort ${1} ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${objtree}"/scripts/sorttable -s .tmp_vmlinux.nm-sort "${1}" In link-vmlinux.sh line 271: size1=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" ${kallsymso}) ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: size1=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" "${kallsymso}") In link-vmlinux.sh line 275: size2=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" ${kallsymso}) ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: size2=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" "${kallsymso}") In link-vmlinux.sh line 277: if [ $size1 -ne $size2 ] || [ -n "${KALLSYMS_EXTRA_PASS}" ]; then ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$size1" -ne "$size2" ] || [ -n "${KALLSYMS_EXTRA_PASS}" ]; then In link-vmlinux.sh line 298: ${RESOLVE_BTFIDS} ${RESOLVE_BTFIDS_ARGS} "${VMLINUX}" ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${RESOLVE_BTFIDS} "${RESOLVE_BTFIDS_ARGS}" "${VMLINUX}" For more information: https://www.shellcheck.net/wiki/SC2154 -- CFLAGS_vmlinux is referenced but ... https://www.shellcheck.net/wiki/SC3043 -- In POSIX sh, 'local' is undefined. https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf...