[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250719121659.515c199b@pumpkin>
Date: Sat, 19 Jul 2025 12:16:59 +0100
From: David Laight <david.laight.linux@...il.com>
To: Mark Brown <broonie@...nel.org>
Cc: Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
Marek Szyprowski <m.szyprowski@...sung.com>, Thomas Gleixner
<tglx@...utronix.de>, Andy Lutomirski <luto@...nel.org>, Vincenzo Frascino
<vincenzo.frascino@....com>, Shuah Khan <shuah@...nel.org>, Anna-Maria
Behnsen <anna-maria@...utronix.de>, Frederic Weisbecker
<frederic@...nel.org>, John Stultz <jstultz@...gle.com>, Stephen Boyd
<sboyd@...nel.org>, Catalin Marinas <catalin.marinas@....com>, Will Deacon
<will@...nel.org>, Arnd Bergmann <arnd@...db.de>,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-arch@...r.kernel.org, Richard
Cochran <richardcochran@...il.com>, Christopher Hall
<christopher.s.hall@...el.com>, Miroslav Lichvar <mlichvar@...hat.com>,
Werner Abt <werner.abt@...nberg-usa.com>, David Woodhouse
<dwmw2@...radead.org>, Kurt Kanzenbach <kurt@...utronix.de>, Nam Cao
<namcao@...utronix.de>, Antoine Tenart <atenart@...nel.org>
Subject: Re: [PATCH 06/14] vdso/gettimeofday: Return bool from
clock_gettime() helpers
On Wed, 16 Jul 2025 15:35:09 +0100
Mark Brown <broonie@...nel.org> wrote:
> 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@...nel.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))
Do you even need 'ok' at all, just:
if (unlikely(!__cvdso_clock_gettime_common(vd, clock, &ts)))
> 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
David
Powered by blists - more mailing lists