]> asedeno.scripts.mit.edu Git - linux.git/commit
timex: use __kernel_timex internally
authorDeepa Dinamani <deepa.kernel@gmail.com>
Tue, 3 Jul 2018 05:44:21 +0000 (22:44 -0700)
committerArnd Bergmann <arnd@arndb.de>
Wed, 6 Feb 2019 23:13:27 +0000 (00:13 +0100)
commitead25417f82ed7f8a21da4dcefc768169f7da884
treeb97e7cae6a4b9c896e479c8c723706e59a95619b
parent1a596398a3d75f966b75f428e992cf1f242f9a5b
timex: use __kernel_timex internally

struct timex is not y2038 safe.
Replace all uses of timex with y2038 safe __kernel_timex.

Note that struct __kernel_timex is an ABI interface definition.
We could define a new structure based on __kernel_timex that
is only available internally instead. Right now, there isn't
a strong motivation for this as the structure is isolated to
a few defined struct timex interfaces and such a structure would
be exactly the same as struct timex.

The patch was generated by the following coccinelle script:

virtual patch

@depends on patch forall@
identifier ts;
expression e;
@@
(
- struct timex ts;
+ struct __kernel_timex ts;
|
- struct timex ts = {};
+ struct __kernel_timex ts = {};
|
- struct timex ts = e;
+ struct __kernel_timex ts = e;
|
- struct timex *ts;
+ struct __kernel_timex *ts;
|
(memset \| copy_from_user \| copy_to_user \)(...,
- sizeof(struct timex))
+ sizeof(struct __kernel_timex))
)

@depends on patch forall@
identifier ts;
identifier fn;
@@
fn(...,
- struct timex *ts,
+ struct __kernel_timex *ts,
...) {
...
}

@depends on patch forall@
identifier ts;
identifier fn;
@@
fn(...,
- struct timex *ts) {
+ struct __kernel_timex *ts) {
...
}

Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Cc: linux-alpha@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
13 files changed:
arch/alpha/kernel/osf_sys.c
arch/sparc/kernel/sys_sparc_64.c
drivers/ptp/ptp_clock.c
include/linux/posix-clock.h
include/linux/time32.h
include/linux/timex.h
kernel/time/ntp.c
kernel/time/ntp_internal.h
kernel/time/posix-clock.c
kernel/time/posix-timers.c
kernel/time/posix-timers.h
kernel/time/time.c
kernel/time/timekeeping.c