From: David Laight <david.laight.linux@gmail.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
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>,
Petr Mladek <pmladek@suse.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
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:58:51 +0000 [thread overview]
Message-ID: <20260327105851.5e124db8@pumpkin> (raw)
In-Reply-To: <CAJZ5v0inLkQrjBdvgXe8XmE53gWSfDcFHZFM4iEj=a1Wmz6xwg@mail.gmail.com>
On Fri, 27 Mar 2026 10:58:14 +0100
"Rafael J. Wysocki" <rafael@kernel.org> wrote:
> On Fri, Mar 27, 2026 at 10:45 AM David Laight
> <david.laight.linux@gmail.com> wrote:
> >
> > On Fri, 27 Mar 2026 11:28:26 +0200
> > Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> >
> > > On Thu, Mar 26, 2026 at 08:18:30PM +0000, david.laight.linux@gmail.com 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.
David
> Alternatively, someone else may make that change upstream with a
> Suggested-by tag pointing to you.
next prev parent reply other threads:[~2026-03-27 10:58 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 [this message]
2026-03-27 11:17 ` Rafael J. Wysocki
2026-03-27 9:54 ` Petr Mladek
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=20260327105851.5e124db8@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=acpica-devel@lists.linux.dev \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.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=pmladek@suse.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.