linux/drivers/ptp
Deepa Dinamani ead25417f8 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>
2019-02-07 00:13:27 +01:00
..
Kconfig ptp: support DPAA FMan 1588 timer in ptp_qoriq 2018-06-26 22:15:14 +09:00
Makefile ptp: rework gianfar_ptp as QorIQ common PTP driver 2018-05-28 23:05:11 -04:00
ptp_chardev.c ptp: deprecate gettime64() in favor of gettimex64() 2018-11-09 19:43:51 -08:00
ptp_clock.c timex: use __kernel_timex internally 2019-02-07 00:13:27 +01:00
ptp_dte.c ptp: ptp_dte: simplify getting .driver_data 2018-10-22 19:48:35 -07:00
ptp_ixp46x.c ptp: make ptp_clock_info const 2017-08-22 11:04:51 -07:00
ptp_kvm.c x86/pvclock: add setter for pvclock_pvti_cpu0_va 2017-11-08 16:33:14 -05:00
ptp_pch.c ptp_pch: use helpers function for converting between ns and timespec 2018-04-27 15:22:28 -04:00
ptp_private.h the rest of drivers/*: annotate ->poll() instances 2017-11-28 11:06:58 -05:00
ptp_qoriq.c ptp_qoriq: use div_u64/div_u64_rem for 64-bit division 2018-08-06 10:43:35 -07:00
ptp_sysfs.c ptp: create "pins" together with the rest of attributes 2017-02-17 11:03:06 -05:00