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.OFrpiyV399 and /tmp/tmp.jq5vlDio4I Tree base: ea180ffbd27c ("mm: drop mem_cgroup_usage() declaration from memcontrol.h") Now at: 2de36e528ea7 ("scripts/gen-btf.sh: Ensure initial object in gen_btf_o is ELF with correct endianness") ====== 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 72: ${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 74: --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 77: ${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 79: --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 90: 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 91: ${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 92: --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 93: ${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 102: 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 107: ${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 112: ${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 116: ${RESOLVE_BTFIDS} --patch_btfids ${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: ${RESOLVE_BTFIDS} --patch_btfids "${btf_ids}" "${ELF_FILE}" In gen-btf.sh line 120: 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 72: ${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 74: --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 77: ${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 79: --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 90: echo "" | ${CC} ${CLANG_FLAGS} ${KBUILD_CPPFLAGS} ${KBUILD_CFLAGS} -fno-lto -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. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "" | ${CC} "${CLANG_FLAGS}" "${KBUILD_CPPFLAGS}" "${KBUILD_CFLAGS}" -fno-lto -c -x c -o "${btf_data}" - In gen-btf.sh line 91: ${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 92: --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 93: ${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 102: 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 107: ${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 112: ${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 116: ${RESOLVE_BTFIDS} --patch_btfids ${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: ${RESOLVE_BTFIDS} --patch_btfids "${btf_ids}" "${ELF_FILE}" In gen-btf.sh line 120: 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 ...