From: Breno Leitao Date: Mon, 14 Oct 2024 10:02:10 +0000 (-0700) Subject: scripts/decode_stacktrace.sh: remove trailing space X-Git-Tag: v6.13-rc1~89^2~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bb5d6609767b631526a95446198e5f436159bea;p=thirdparty%2Fkernel%2Flinux.git scripts/decode_stacktrace.sh: remove trailing space decode_stacktrace.sh adds a trailing space at the end of the decoded stack if the module is not set (in most of the lines), which makes the some lines of the stack having trailing space and some others not. Do not add an extra space at the end of the line if module is not set, adding consistency in output formatting. Link: https://lkml.kernel.org/r/20241014100213.1873611-1-leitao@debian.org Signed-off-by: Breno Leitao Reviewed-by: Elliot Berman Reviewed-by: Carlos Llamas Reviewed-by: Stephen Boyd Cc: Bjorn Andersson Cc: Luca Ceresoli Cc: Xiong Nandi Signed-off-by: Andrew Morton --- diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh index 826836d264c6a..46fa18b80fc1b 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -311,7 +311,12 @@ handle_line() { parse_symbol # modifies $symbol # Add up the line number to the symbol - echo "${words[@]}" "$symbol $module" + if [[ -z ${module} ]] + then + echo "${words[@]}" "$symbol" + else + echo "${words[@]}" "$symbol $module" + fi } while read line; do