Re: [PATCH] time: Rename CLOCK_SET_* as BASEMASK_*_CLOCK_SET
From: Thomas Gleixner
Date: Mon Sep 02 2024 - 11:46:09 EST
On Thu, Aug 15 2024 at 13:03, John Stultz wrote:
> In commit 5916be8a53de ("timekeeping: Fix bogus clock_was_set()
> invocation in do_adjtimex()"), Thomas fixed a bug where instead
> of passing one of the CLOCK_SET_* values to clock_was_set(),a
> conceptually related clockid (CLOCK_REALTIME) was incorrectly
> passed.
>
> Just to make this type of accident less likely, lets rename the
s/lets//
> base masks used by clock_was_set() to something that doesn't
> resemble a clockid.
>
> Thus:
> CLOCK_SET_WALL -> BASEMASK_WALL_CLOCK_SET
> CLOCK_SET_BOOT -> BASEMASK_BOOT_CLOCK_SET
I don't think that's the actual problem. What's the confusing part is
the function name itself clock_was_set().
Renaming that to at the same time to something unambiguous would be
helpful.
hrtimer_refresh_bases() or something like that should be descriptive
enough.
Thanks,
tglx