timekeeping: Consolidate timekeeping_inject_offset code
authorArnd Bergmann <arnd@arndb.de>
Thu, 19 Oct 2017 11:14:44 +0000 (13:14 +0200)
committerJohn Stultz <john.stultz@linaro.org>
Mon, 30 Oct 2017 22:13:35 +0000 (15:13 -0700)
commite0956dcc4ba74ec4b17e32fc9a156fcba1ef6610
tree63b47cbfeb91f6118fc72c896be4b6922e1e9433
parent0f295b0650c90362b4111f46d7f9149a0a4191be
timekeeping: Consolidate timekeeping_inject_offset code

The code to check the adjtimex() or clock_adjtime() arguments is spread
out across multiple files for presumably only historic reasons. As a
preparatation for a rework to get rid of the use of 'struct timeval'
and 'struct timespec' in there, this moves all the portions into
kernel/time/timekeeping.c and marks them as 'static'.

The warp_clock() function here is not as closely related as the others,
but I feel it still makes sense to move it here in order to consolidate
all callers of timekeeping_inject_offset().

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Miroslav Lichvar <mlichvar@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[jstultz: Whitespace fixup]
Signed-off-by: John Stultz <john.stultz@linaro.org>
include/linux/time.h
kernel/time/ntp.c
kernel/time/ntp_internal.h
kernel/time/time.c
kernel/time/timekeeping.c
kernel/time/timekeeping.h