From: Petr Mladek <pmladek@suse.com>
To: david.laight.linux@gmail.com
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Robert Moore <robert.moore@intel.com>,
Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev,
linux-kernel@vger.kernel.org,
Masami Hiramatsu <mhiramat@kernel.org>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Steven Rostedt <rostedt@goodmis.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH next] ACPICA: AML Parser: Remove spurious precision from format used to dump parse trees
Date: Fri, 27 Mar 2026 10:54:54 +0100 [thread overview]
Message-ID: <acZT7vZ-4GZdDh3f@pathway.suse.cz> (raw)
In-Reply-To: <20260326201830.3938-1-david.laight.linux@gmail.com>
On Thu 2026-03-26 20:18:30, david.laight.linux@gmail.com wrote:
> From: David Laight <david.laight.linux@gmail.com>
>
> The debug code in acpi_ps_delete_parse_tree() uses ("%*.s", level * 4, " ")
> to indent traces.
> POSIX requires the empty precision be treated as zero, but the kernel treats
> is as 'no precision specified'.
> Change to ("%*s", level * 4, "") since there is additional whitespace and no
> reason to indent by one space when level is zero.
>
> --- a/drivers/acpi/acpica/pswalk.c
> +++ b/drivers/acpi/acpica/pswalk.c
> @@ -49,8 +49,7 @@ void acpi_ps_delete_parse_tree(union acpi_parse_object *subtree_root)
>
> /* This debug option will print the entire parse tree */
>
> - acpi_os_printf(" %*.s%s %p", (level * 4),
> - " ",
> + acpi_os_printf(" %*s%s %p", (level * 4), "",
> acpi_ps_get_opcode_name(op->
> common.
> aml_opcode),
The change has no visible effect. The precision defines how many
characters are copied from the given string. It does not matter
here because the given string is empty "". The number of added
spaces ' ' is defined by the field width parameter (level * 4).
Anyway, the change makes sense:
Reviewed-by: Petr Mladek <pmladek@suse.com>
Best Regards,
Petr
prev parent reply other threads:[~2026-03-27 9:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 20:18 [PATCH next] ACPICA: AML Parser: Remove spurious precision from format used to dump parse trees david.laight.linux
2026-03-27 9:28 ` Andy Shevchenko
2026-03-27 9:45 ` David Laight
2026-03-27 9:58 ` Rafael J. Wysocki
2026-03-27 10:58 ` David Laight
2026-03-27 11:17 ` Rafael J. Wysocki
2026-03-27 9:54 ` Petr Mladek [this message]
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=acZT7vZ-4GZdDh3f@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=acpica-devel@lists.linux.dev \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=david.laight.linux@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mhiramat@kernel.org \
--cc=rafael@kernel.org \
--cc=robert.moore@intel.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
/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