lkml.org 
[lkml]   [2013]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/5] time: pass flags instead of multiple bools to timekeeping_update()
On 06/27/2013 03:35 AM, David Vrabel wrote:
> From: David Vrabel <david.vrabel@citrix.com>
>
> Instead of passing multiple bools to timekeeping_updated(), define
> flags and use a single 'action' parameter. It is then more obvious
> what each timekeeping_update() call does.
>
> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
> ---
> kernel/time/timekeeping.c | 21 ++++++++++++---------
> 1 files changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
> index baeeb5c..7aed2b0 100644
> --- a/kernel/time/timekeeping.c
> +++ b/kernel/time/timekeeping.c
> @@ -26,6 +26,9 @@
> #include "tick-internal.h"
> #include "ntp_internal.h"
>
> +#define TK_CLEAR_NTP (1 << 0)
> +#define TK_MIRROR (1 << 1)
> +
> static struct timekeeper timekeeper;
> static DEFINE_RAW_SPINLOCK(timekeeper_lock);
> static seqcount_t timekeeper_seq;
> @@ -241,16 +244,16 @@ int pvclock_gtod_unregister_notifier(struct notifier_block *nb)
> EXPORT_SYMBOL_GPL(pvclock_gtod_unregister_notifier);
>
> /* must hold timekeeper_lock */
> -static void timekeeping_update(struct timekeeper *tk, bool clearntp, bool mirror)
> +static void timekeeping_update(struct timekeeper *tk, unsigned action)

Nit: Mind making this "unsigned int" just for consistency sake with the
rest of the code?

thanks
-john



\
 
 \ /
  Last update: 2013-06-27 20:21    [W:0.042 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site