From: Keith Teeple <keithrteeple@gmail.com>
To: Hungyu Lin <dennylin0707@gmail.com>
Cc: pmladek@suse.com, rostedt@goodmis.org,
andriy.shevchenko@linux.intel.com, linux@rasmusvillemoes.dk,
senozhatsky@chromium.org, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] lib/vsprintf: Preserve the sign of seconds in %ptSp
Date: Wed, 21 Oct 2026 21:21:09 -0400 [thread overview]
Message-ID: <atlflhXoxUsXu-BS@keith-pc> (raw)
In-Reply-To: <20261021110628.37106-1-dennylin0707@gmail.com>
On Wed, Oct 21, 2026 at 11:06:28AM +0000, Hungyu Lin wrote:
> The documentation defines %ptSp as equivalent to %lld.%09ld, but
> timespec64_str() formats tv_sec with default_dec_spec, which does not
> have SIGN set. Negative seconds are therefore printed as unsigned
> values: {-1, 0} produces "18446744073709551615.000000000" instead of
> "-1.000000000".
Tested on mainline 4df4d2a577db with gcc 16.2.1 under UML and i386
(QEMU). With only the new tests applied and vsprintf.c unchanged,
time_and_date fails on both. The -1, -1.999999999 and S64_MIN checks
print the unsigned values and the 0, %ptS and S64_MAX checks pass.
All tests pass on UML and i386 with the full patch applied.
Tested-by: Keith Teeple <keithrteeple@gmail.com>
prev parent reply other threads:[~2026-10-22 1:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 11:06 Hungyu Lin
2026-10-21 14:12 ` Andy Shevchenko
2026-10-22 1:21 ` Keith Teeple [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=atlflhXoxUsXu-BS@keith-pc \
--to=keithrteeple@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dennylin0707@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=pmladek@suse.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
all inboxes | Powered by JetHome®