From: Carlos Llamas <cmllamas@google.com>
To: Breno Leitao <leitao@debian.org>
Cc: akpm@linux-foundation.org,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Stephen Boyd <swboyd@chromium.org>,
Elliot Berman <quic_eberman@quicinc.com>,
Xiong Nandi <xndchn@gmail.com>,
Kent Overstreet <kent.overstreet@linux.dev>,
Bjorn Andersson <quic_bjorande@quicinc.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scripts/decode_stacktrace.sh: remove trailing space
Date: Mon, 7 Oct 2024 19:29:27 +0000 [thread overview]
Message-ID: <ZwQ2l8zo6BZQnnkB@google.com> (raw)
In-Reply-To: <20241003103009.2635627-1-leitao@debian.org>
On Thu, Oct 03, 2024 at 03:30:05AM -0700, Breno Leitao wrote:
> 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.
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
> scripts/decode_stacktrace.sh | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
> index 826836d264c6..4b3502a007fd 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
nit: it seems the convention would have been something like:
if [[ -z $module ]]; then
> + echo "${words[@]}" "$symbol"
> + else
> + echo "${words[@]}" "$symbol $module"
I guess the space could have also been prepended in module above? e.g
module=" $module"
> + fi
> }
>
> while read line; do
> --
> 2.43.5
>
...either way this looks good to me.
Reviewed-by: Carlos Llamas <cmllamas@google.com>
next prev parent reply other threads:[~2024-10-07 19:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 10:30 [PATCH] scripts/decode_stacktrace.sh: remove trailing space Breno Leitao
2024-10-04 20:30 ` Stephen Boyd
2024-10-07 19:29 ` Carlos Llamas [this message]
2024-10-08 11:18 ` Breno Leitao
2024-10-08 18:01 ` Carlos Llamas
2024-10-10 21:14 ` Elliot Berman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZwQ2l8zo6BZQnnkB@google.com \
--to=cmllamas@google.com \
--cc=akpm@linux-foundation.org \
--cc=kent.overstreet@linux.dev \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=quic_bjorande@quicinc.com \
--cc=quic_eberman@quicinc.com \
--cc=swboyd@chromium.org \
--cc=xndchn@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox