Re: [PATCH next] ACPICA: AML Parser: Remove spurious precision from format used to dump parse trees

"Rafael J. Wysocki" <[email protected]>
Newsgroups dev.linux.lists.acpica-devel,org.kernel.vger.linux-acpi,org.kernel.vger.linux-kernel
Message-ID <CAJZ5v0gywDJaaATp8q9=zJAWEbZDp25U9SDRCzr9_pfXLFv=Jw@mail.gmail.com>
On Fri, Mar 27, 2026 at 11:58 AM David Laight
<[email protected]> wrote:
>
> On Fri, 27 Mar 2026 10:58:14 +0100
> "Rafael J. Wysocki" <[email protected]> wrote:
>
> > On Fri, Mar 27, 2026 at 10:45 AM David Laight
> > <[email protected]> wrote:
> > >
> > > On Fri, 27 Mar 2026 11:28:26 +0200
> > > Andy Shevchenko <[email protected]> wrote:
> > >
> > > > On Thu, Mar 26, 2026 at 08:18:30PM +0000, [email protected] wrote:
> > > >
> > > > > 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.
> > > >
> > > > This is cross-platform code. Does the same applies to MS VC compiler, for
> > > > example?
> > > >
> > >
> > > Everything except the linux kernel will treat "%*.s" as "%*.0s".
> > >
> > > Regardless of anything else specifying a 'precision' when printing
> > > a constant string is entirely pointless - it limits the number of
> > > characters copied from the string.
> > >
> > > Basically "%*.s" is always a typo, either for "%.*s" or "%*s".
> >
> > So this change should be made in upstream ACPICA in the first place as
> > per Documentation/driver-api/acpi/linuxized-acpica.rst.
> >
> > Would you please send a PR to the upstream ACPICA project on GH?
>
> I'd have to go through a lot of hoops to do that.
> I've never used GH.

OK, we'll go for the second option then.

> > Alternatively, someone else may make that change upstream with a
> > Suggested-by tag pointing to you.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.