From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF059246762; Fri, 21 Nov 2025 13:25:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763731523; cv=none; b=PCKHPpeIzTKcYBScYY/w7CTarVgic6f0a6b/mRop7uHU+MmoiOHTpXOh+iZLiaBiRukGU7BpvbT81XKnBayM5ChLbizr/Zts+eWvAe+LQr/0SSFOeMrKOgwkNdykkltH9+o4prnCtUwccVD7b/7heo+EJBDAl6jRxGC+oQf/oLQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763731523; c=relaxed/simple; bh=EYkmFRWiCfxpMcKQCuT6gqAyFkJ9bN+mHpMbaklI7j4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YlcT/9ntfSMRhB4vhma7L9PqL4EMdMEVB0y+/GMjVIuqe7fntmUBK/g7R2IWtnmFn6vsLjkF1UBcgRyhNR9q1mB6iG5oUbV0WIQpBOOBsmJax1sP+PL31wGuJgwQR1xPrKHhUQUxxr98lSHqiXZcqiSEkUd8WSA575lCoCLtEUU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=e5JZvVJY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="e5JZvVJY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB95EC4CEF1; Fri, 21 Nov 2025 13:25:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1763731523; bh=EYkmFRWiCfxpMcKQCuT6gqAyFkJ9bN+mHpMbaklI7j4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e5JZvVJYjDH/GksvmB06mqsqXEUqwiepyYYf9qd/104gcfTWX5A0rev3ssPyzx2zO Mt4ltQKC5ygQolePpsJV/5eA0m5y69Qiv0IN21+NKe9y5MUFuP6fOzLXqmINPcz0yU aKZGDPSX57yWK0PD0OiQfgMosgp7m+uewGl4rxpA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Matthieu Baerts (NGI0)" , Carlos Llamas , Breno Leitao , Luca Ceresoli , Elliot Berman , Stephen Boyd , Andrew Morton Subject: [PATCH 6.17 238/247] scripts/decode_stacktrace.sh: symbol: avoid trailing whitespaces Date: Fri, 21 Nov 2025 14:13:05 +0100 Message-ID: <20251121130203.278948877@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251121130154.587656062@linuxfoundation.org> References: <20251121130154.587656062@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Matthieu Baerts (NGI0) commit d322f6a24ee5964a58294f61bf96a1b6404c676d upstream. A few patches slightly improving the output generated by decode_stacktrace.sh. This patch (of 3): Lines having a symbol to decode might not always have info after this symbol. It means ${info_str} might not be set, but it will always be printed after a space, causing trailing whitespaces. That's a detail, but when the output is opened with an editor marking these trailing whitespaces, that's a bit disturbing. It is easy to remove them by printing this variable with a space only if it is set. While at it, do the same with ${module} and print everything in one line. Link: https://lkml.kernel.org/r/20250908-decode_strace_indent-v1-0-28e5e4758080@kernel.org Link: https://lkml.kernel.org/r/20250908-decode_strace_indent-v1-1-28e5e4758080@kernel.org Signed-off-by: Matthieu Baerts (NGI0) Reviewed-by: Carlos Llamas Reviewed-by: Breno Leitao Reviewed-by: Luca Ceresoli Cc: Carlos Llamas Cc: Elliot Berman Cc: Stephen Boyd Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- scripts/decode_stacktrace.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -323,12 +323,7 @@ handle_line() { parse_symbol # modifies $symbol # Add up the line number to the symbol - if [[ -z ${module} ]] - then - echo "${words[@]}" "$symbol ${info_str}" - else - echo "${words[@]}" "$symbol $module ${info_str}" - fi + echo "${words[@]}" "${symbol}${module:+ ${module}}${info_str:+ ${info_str}}" } while read line; do