[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANDhNCpFFRoj6O_0WP0yZt-A+hk7QAkQXjd9ekxvsgUT+yYXiQ@mail.gmail.com>
Date: Thu, 24 Oct 2024 15:41:19 -0700
From: John Stultz <jstultz@...gle.com>
To: Anna-Maria Behnsen <anna-maria@...utronix.de>
Cc: Frederic Weisbecker <frederic@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Miroslav Lichvar <mlichvar@...hat.com>, Richard Cochran <richardcochran@...il.com>,
Christopher S Hall <christopher.s.hall@...el.com>
Subject: Re: [PATCH v2 25/25] timekeeping: Merge timekeeping_update_staged()
and timekeeping_update()
On Wed, Oct 9, 2024 at 1:29 AM Anna-Maria Behnsen
<anna-maria@...utronix.de> wrote:
>
> From: Anna-Maria Behnsen <anna-maria@...utronix.de>
>
> timekeeping_update_staged() is the only call site of timekeeping_update().
>
> Merge those functions. No functional change.
>
> Signed-off-by: Anna-Maria Behnsen <anna-maria@...utronix.de>
> ---
> kernel/time/timekeeping.c | 31 ++++++++++++++-----------------
> 1 file changed, 14 insertions(+), 17 deletions(-)
>
> diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
> index 67d7be2e02fb..d07eb1946ff1 100644
> --- a/kernel/time/timekeeping.c
> +++ b/kernel/time/timekeeping.c
> @@ -529,7 +529,7 @@ EXPORT_SYMBOL_GPL(ktime_get_raw_fast_ns);
> * timekeeping_inject_sleeptime64()
> * __timekeeping_inject_sleeptime(tk, delta);
> * timestamp();
> - * timekeeping_update(tkd, tk, TK_CLEAR_NTP...);
> + * timekeeping_update_staged(tkd, TK_CLEAR_NTP...);
> *
> * (2) On 32-bit systems, the 64-bit boot offset (tk->offs_boot) may be
> * partially updated. Since the tk->offs_boot update is a rare event, this
> @@ -775,10 +775,21 @@ static void timekeeping_restore_shadow(struct tk_data *tkd)
> memcpy(&tkd->shadow_timekeeper, &tkd->timekeeper, sizeof(tkd->timekeeper));
> }
>
> -static void timekeeping_update(struct tk_data *tkd, struct timekeeper *tk, unsigned int action)
> +static void timekeeping_update_staged(struct tk_data *tkd, unsigned int action)
I still think timekeeping_update_from_shadow would be a better name.
> {
> + struct timekeeper *tk = &tk_core.shadow_timekeeper;
> +
Same naming nit, as its easy to mix up what tk is modifying.
Other than those,
Acked-by: John Stultz <jstultz@...gle.com>
Thanks so much for these really nice cleanups! They are a great
improvement to the code!
And again, my apologies for jumping off to other things midway through
reviewing these and not getting back to them until now.
thanks
-john
Powered by blists - more mailing lists