[PATCH 06/14] vdso/gettimeofday: Return bool from clock_gettime() helpers
Mark Brown
broonie at kernel.org
Wed Jul 16 07:35:09 PDT 2025
On Wed, Jul 16, 2025 at 03:23:24PM +0200, Thomas Weißschuh wrote:
> Can you try the following?
> I missed this despite the double-checking after the last reported issue.
I needed to fix that up a bit, it was missing an update of the final ret
in the function and didn't apply directly to -next for some reason so I
had to manually apply but it seems to do the trick, thanks!
Tested-by: Mark Brown <broonie at kernel.org>
with this against -next:
diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index 97aa9059a5c97..487e3458e536e 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -365,18 +365,18 @@ __cvdso_clock_gettime32_data(const struct vdso_time_data *vd, clockid_t clock,
struct old_timespec32 *res)
{
struct __kernel_timespec ts;
- int ret;
+ bool ok;
- ret = __cvdso_clock_gettime_common(vd, clock, &ts);
+ ok = __cvdso_clock_gettime_common(vd, clock, &ts);
- if (unlikely(ret))
+ if (unlikely(!ok))
return clock_gettime32_fallback(clock, res);
- /* For ret == 0 */
+ /* For ok == true */
res->tv_sec = ts.tv_sec;
res->tv_nsec = ts.tv_nsec;
- return ret;
+ return 0;
}
static __maybe_unused int
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250716/becf583a/attachment.sig>
More information about the linux-arm-kernel
mailing list