Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <leitao@debian.org>
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Reviewed-by: Carlos Llamas <cmllamas@google.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Cc: Bjorn Andersson <quic_bjorande@quicinc.com>
Cc: Luca Ceresoli <luca.ceresoli@bootlin.com>
Cc: Xiong Nandi <xndchn@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Breno Leitao and committed by
Andrew Morton
1bb5d660 bf9850f6

+6 -1
+6 -1
scripts/decode_stacktrace.sh
··· 311 311 parse_symbol # modifies $symbol 312 312 313 313 # Add up the line number to the symbol 314 - echo "${words[@]}" "$symbol $module" 314 + if [[ -z ${module} ]] 315 + then 316 + echo "${words[@]}" "$symbol" 317 + else 318 + echo "${words[@]}" "$symbol $module" 319 + fi 315 320 } 316 321 317 322 while read line; do