[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1Dfx0MayHFP46KL0RDta9cZYBy3pVRTaVTbEsbMOy5xg@mail.gmail.com>
Date: Fri, 21 Jun 2019 16:38:10 +0200
From: Arnd Bergmann <arnd@...db.de>
To: "Jason A. Donenfeld" <Jason@...c4.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 3/3] timekeeping: add missing _ns functions for coarse accessors
On Thu, Jun 20, 2019 at 4:12 PM Jason A. Donenfeld <Jason@...c4.com> wrote:
>
>
> diff --git a/Documentation/core-api/timekeeping.rst b/Documentation/core-api/timekeeping.rst
> index ad32085174f8..d5e88f0e06a4 100644
> --- a/Documentation/core-api/timekeeping.rst
> +++ b/Documentation/core-api/timekeeping.rst
> @@ -99,16 +99,20 @@ Coarse and fast access
>
> Some additional variants exist for more specialized cases:
>
> -.. c:function:: ktime_t ktime_get_coarse_boottime( void )
> +.. c:function:: ktime_t ktime_get_coarse( void )
> + ktime_t ktime_get_coarse_boottime( void )
> ktime_t ktime_get_coarse_real( void )
> ktime_t ktime_get_coarse_clocktai( void )
> - ktime_t ktime_get_coarse_raw( void )
> +
> +.. c:function:: u64 ktime_get_coarse_ns( void )
> + u64 ktime_get_boot_coarse_ns( void )
> + u64 ktime_get_real_coarse_ns( void )
> + u64 ktime_get_tai_coarse_ns( void )
I would prefer the 'coarse' on the other side, i.e.
ktime_get_coarse_real_ns instead of ktime_get_real_coarse_ns,
as this is what we already have with ktime_get_coarse_real_ts64.
I originally went with that order to avoid the function sounding
"real coarse", although I have to admit that it was before Thomas
fixed it in e3ff9c3678b4 ("timekeeping: Repair ktime_get_coarse*()
granularity"). ;-)
I would also prefer _boottime over _boot. Unfortunately we
are already inconsistent and have roughly the same number
of callers for ktime_get_boot_ns() and ktime_get_boottime().
Arnd
Powered by blists - more mailing lists