ShellCheck - shell script analysis tool version: 0.11.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.8algLK6QCI and /tmp/tmp.1zQFAA63rE Tree base: f14cdb1367b9 ("Merge branch 'remove-kf_sleepable-from-arena-kfuncs'") Now at: 066ea0280b0b ("scripts/gen-btf.sh: Fix .btf.o generation when compiling for RISCV") ====== Checking before the patch ====== Checking scripts/gen-btf.sh - 78782c60d2cc946a9e0ef88597158cec2166c4a8ff00ff1ad6906c332cfc571b In gen-btf.sh line 60: grep -q "^$1=y" ${objtree}/include/config/auto.conf ^--------^ SC2154 (warning): objtree is referenced but not assigned. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: grep -q "^$1=y" "${objtree}"/include/config/auto.conf In gen-btf.sh line 79: ${PAHOLE} -J ${PAHOLE_FLAGS} \ ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${PAHOLE} -J "${PAHOLE_FLAGS}" \ In gen-btf.sh line 81: --btf_encode_detached=${btf1} \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: --btf_encode_detached="${btf1}" \ In gen-btf.sh line 85: ${RESOLVE_BTFIDS} ${RESOLVE_BTFIDS_FLAGS} \ ^---------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${RESOLVE_BTFIDS} "${RESOLVE_BTFIDS_FLAGS}" \ In gen-btf.sh line 87: --btf ${btf1} "${ELF_FILE}" ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: --btf "${btf1}" "${ELF_FILE}" In gen-btf.sh line 99: echo "" | ${CC} ${CLANG_FLAGS} -c -x c -o ${btf_data} - ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "" | ${CC} "${CLANG_FLAGS}" -c -x c -o "${btf_data}" - In gen-btf.sh line 100: ${OBJCOPY} --add-section .BTF=${ELF_FILE}.BTF \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${OBJCOPY} --add-section .BTF="${ELF_FILE}".BTF \ In gen-btf.sh line 101: --set-section-flags .BTF=alloc,readonly ${btf_data} ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: --set-section-flags .BTF=alloc,readonly "${btf_data}" In gen-btf.sh line 102: ${OBJCOPY} --only-section=.BTF --strip-all ${btf_data} ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${OBJCOPY} --only-section=.BTF --strip-all "${btf_data}" In gen-btf.sh line 111: 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 gen-btf.sh line 117: ${OBJCOPY} --add-section .BTF=${ELF_FILE}.BTF ${ELF_FILE} ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${OBJCOPY} --add-section .BTF="${ELF_FILE}".BTF "${ELF_FILE}" In gen-btf.sh line 122: ${OBJCOPY} --add-section .BTF.base=${btf_base} ${ELF_FILE} ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${OBJCOPY} --add-section .BTF.base="${btf_base}" "${ELF_FILE}" In gen-btf.sh line 126: ${OBJCOPY} --update-section .BTF_ids=${btf_ids} ${ELF_FILE} ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${OBJCOPY} --update-section .BTF_ids="${btf_ids}" "${ELF_FILE}" In gen-btf.sh line 130: cleanup() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). For more information: https://www.shellcheck.net/wiki/SC2154 -- objtree is referenced but not ass... https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... ====== Checking the tree with the patch ====== Checking scripts/gen-btf.sh - 78782c60d2cc946a9e0ef88597158cec2166c4a8ff00ff1ad6906c332cfc571b In gen-btf.sh line 60: grep -q "^$1=y" ${objtree}/include/config/auto.conf ^--------^ SC2154 (warning): objtree is referenced but not assigned. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: grep -q "^$1=y" "${objtree}"/include/config/auto.conf In gen-btf.sh line 79: ${PAHOLE} -J ${PAHOLE_FLAGS} \ ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${PAHOLE} -J "${PAHOLE_FLAGS}" \ In gen-btf.sh line 81: --btf_encode_detached=${btf1} \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: --btf_encode_detached="${btf1}" \ In gen-btf.sh line 85: ${RESOLVE_BTFIDS} ${RESOLVE_BTFIDS_FLAGS} \ ^---------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${RESOLVE_BTFIDS} "${RESOLVE_BTFIDS_FLAGS}" \ In gen-btf.sh line 87: --btf ${btf1} "${ELF_FILE}" ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: --btf "${btf1}" "${ELF_FILE}" In gen-btf.sh line 99: echo "" | ${CC} ${CLANG_FLAGS} ${KBUILD_CFLAGS} -c -x c -o ${btf_data} - ^------------^ 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: echo "" | ${CC} "${CLANG_FLAGS}" "${KBUILD_CFLAGS}" -c -x c -o "${btf_data}" - In gen-btf.sh line 100: ${OBJCOPY} --add-section .BTF=${ELF_FILE}.BTF \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${OBJCOPY} --add-section .BTF="${ELF_FILE}".BTF \ In gen-btf.sh line 101: --set-section-flags .BTF=alloc,readonly ${btf_data} ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: --set-section-flags .BTF=alloc,readonly "${btf_data}" In gen-btf.sh line 102: ${OBJCOPY} --only-section=.BTF --strip-all ${btf_data} ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${OBJCOPY} --only-section=.BTF --strip-all "${btf_data}" In gen-btf.sh line 111: 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 gen-btf.sh line 117: ${OBJCOPY} --add-section .BTF=${ELF_FILE}.BTF ${ELF_FILE} ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${OBJCOPY} --add-section .BTF="${ELF_FILE}".BTF "${ELF_FILE}" In gen-btf.sh line 122: ${OBJCOPY} --add-section .BTF.base=${btf_base} ${ELF_FILE} ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${OBJCOPY} --add-section .BTF.base="${btf_base}" "${ELF_FILE}" In gen-btf.sh line 126: ${OBJCOPY} --update-section .BTF_ids=${btf_ids} ${ELF_FILE} ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ${OBJCOPY} --update-section .BTF_ids="${btf_ids}" "${ELF_FILE}" In gen-btf.sh line 130: cleanup() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). For more information: https://www.shellcheck.net/wiki/SC2154 -- objtree is referenced but not ass... https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...