Commit 1bb5d660 authored by Breno Leitao's avatar Breno Leitao Committed by Andrew Morton
Browse files

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: default avatarBreno Leitao <leitao@debian.org>
Reviewed-by: default avatarElliot Berman <quic_eberman@quicinc.com>
Reviewed-by: default avatarCarlos Llamas <cmllamas@google.com>
Reviewed-by: default avatarStephen 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: default avatarAndrew Morton <akpm@linux-foundation.org>
parent bf9850f6
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -311,7 +311,12 @@ handle_line() {
	parse_symbol # modifies $symbol

	# Add up the line number to the symbol
	if [[ -z ${module} ]]
	then
		echo "${words[@]}" "$symbol"
	else
		echo "${words[@]}" "$symbol $module"
	fi
}

while read line; do