Re: [PATCH next] ACPICA: AML Parser: Remove spurious precision from format used to dump parse trees
Petr Mladek <[email protected]>
| Newsgroups | dev.linux.lists.acpica-devel,org.kernel.vger.linux-acpi,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Thu 2026-03-26 20:18:30, [email protected] wrote: > From: David Laight <[email protected]> > > 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 <[email protected]> Best Regards, Petr