[tip: locking/futex] selftests/futex: Print tv_sec as long long

From: tip-bot2 for Sasha Levin

Date: Mon Nov 30 2026 - 16:07:13 EST


The following commit has been merged into the locking/futex branch of tip:

Commit-ID: e2f325bc7f1e22fdd84a281fb600ee33e61724fd
Gitweb: https://git.kernel.org/tip/e2f325bc7f1e22fdd84a281fb600ee33e61724fd
Author: Sasha Levin <sashal@xxxxxxxxxx>
AuthorDate: Tue, 03 Nov 2026 10:54:45 -05:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Mon, 30 Nov 2026 22:03:34 +01:00

selftests/futex: Print tv_sec as long long

On 32-bit architectures with a 64-bit time_t, such as armhf in Debian
13, tv_sec is a long long, and printing it with %ld warns:

futex_requeue_pi.c:351:30: warning: format specifies type 'long' but the argument has type '__time64_t' (aka 'long long') [-Wformat]

Cast it to long long and print it with %lld.

Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Reviewed-by: André Almeida <andrealmeid@xxxxxxxxxx>
Link: https://patch.msgid.link/20261103155445.534229-1-sashal@xxxxxxxxxx
---
tools/testing/selftests/futex/functional/futex_requeue_pi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/futex/functional/futex_requeue_pi.c b/tools/testing/selftests/futex/functional/futex_requeue_pi.c
index 65326cb..2530e69 100644
--- a/tools/testing/selftests/futex/functional/futex_requeue_pi.c
+++ b/tools/testing/selftests/futex/functional/futex_requeue_pi.c
@@ -348,7 +348,7 @@ TEST_F(args, futex_requeue_pi)
secs = (ts.tv_nsec + timeout_ns) / 1000000000;
ts.tv_nsec = ((int64_t)ts.tv_nsec + timeout_ns) % 1000000000;
ts.tv_sec += secs;
- TH_LOG("ts.tv_sec = %ld", ts.tv_sec);
+ TH_LOG("ts.tv_sec = %lld", (long long)ts.tv_sec);
TH_LOG("ts.tv_nsec = %ld", ts.tv_nsec);
tsp = &ts;
}