* [PATCH] ptp: replace getnstimeofday64() with ktime_get_real_ts64()
@ 2018-06-18 14:20 Arnd Bergmann
2018-06-18 18:26 ` Richard Cochran
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Arnd Bergmann @ 2018-06-18 14:20 UTC (permalink / raw)
To: Richard Cochran, Yangbo Lu
Cc: y2038, Arnd Bergmann, David S. Miller, Fabio Estevam, netdev,
linux-kernel
getnstimeofday64() is deprecated and getting replaced throughout
the kernel with ktime_get_*() based helpers for a more consistent
interface.
The two functions do the exact same thing, so this is just
a cosmetic change.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/ptp/ptp_chardev.c | 4 ++--
drivers/ptp/ptp_qoriq.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c
index 767c485af59b..547dbdac9d54 100644
--- a/drivers/ptp/ptp_chardev.c
+++ b/drivers/ptp/ptp_chardev.c
@@ -221,7 +221,7 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg)
}
pct = &sysoff->ts[0];
for (i = 0; i < sysoff->n_samples; i++) {
- getnstimeofday64(&ts);
+ ktime_get_real_ts64(&ts);
pct->sec = ts.tv_sec;
pct->nsec = ts.tv_nsec;
pct++;
@@ -230,7 +230,7 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg)
pct->nsec = ts.tv_nsec;
pct++;
}
- getnstimeofday64(&ts);
+ ktime_get_real_ts64(&ts);
pct->sec = ts.tv_sec;
pct->nsec = ts.tv_nsec;
if (copy_to_user((void __user *)arg, sysoff, sizeof(*sysoff)))
diff --git a/drivers/ptp/ptp_qoriq.c b/drivers/ptp/ptp_qoriq.c
index 1468a1642b49..e8652c148c52 100644
--- a/drivers/ptp/ptp_qoriq.c
+++ b/drivers/ptp/ptp_qoriq.c
@@ -374,7 +374,7 @@ static int qoriq_ptp_probe(struct platform_device *dev)
pr_err("ioremap ptp registers failed\n");
goto no_ioremap;
}
- getnstimeofday64(&now);
+ ktime_get_real_ts64(&now);
ptp_qoriq_settime(&qoriq_ptp->caps, &now);
tmr_ctrl =
--
2.9.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ptp: replace getnstimeofday64() with ktime_get_real_ts64()
2018-06-18 14:20 [PATCH] ptp: replace getnstimeofday64() with ktime_get_real_ts64() Arnd Bergmann
@ 2018-06-18 18:26 ` Richard Cochran
2018-06-19 1:59 ` Y.b. Lu
2018-06-19 23:00 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Richard Cochran @ 2018-06-18 18:26 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Yangbo Lu, y2038, David S. Miller, Fabio Estevam, netdev, linux-kernel
On Mon, Jun 18, 2018 at 04:20:39PM +0200, Arnd Bergmann wrote:
> getnstimeofday64() is deprecated and getting replaced throughout
> the kernel with ktime_get_*() based helpers for a more consistent
> interface.
>
> The two functions do the exact same thing, so this is just
> a cosmetic change.
Acked-by: Richard Cochran <richardcochran@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] ptp: replace getnstimeofday64() with ktime_get_real_ts64()
2018-06-18 14:20 [PATCH] ptp: replace getnstimeofday64() with ktime_get_real_ts64() Arnd Bergmann
2018-06-18 18:26 ` Richard Cochran
@ 2018-06-19 1:59 ` Y.b. Lu
2018-06-19 23:00 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Y.b. Lu @ 2018-06-19 1:59 UTC (permalink / raw)
To: Arnd Bergmann, Richard Cochran
Cc: y2038, David S. Miller, Fabio Estevam, netdev, linux-kernel
> -----Original Message-----
> From: Arnd Bergmann [mailto:arnd@arndb.de]
> Sent: Monday, June 18, 2018 10:21 PM
> To: Richard Cochran <richardcochran@gmail.com>; Y.b. Lu
> <yangbo.lu@nxp.com>
> Cc: y2038@lists.linaro.org; Arnd Bergmann <arnd@arndb.de>; David S. Miller
> <davem@davemloft.net>; Fabio Estevam <fabio.estevam@nxp.com>;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] ptp: replace getnstimeofday64() with ktime_get_real_ts64()
>
> getnstimeofday64() is deprecated and getting replaced throughout the kernel
> with ktime_get_*() based helpers for a more consistent interface.
>
> The two functions do the exact same thing, so this is just a cosmetic change.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[Y.b. Lu] Acked-by: Yangbo Lu <yangbo.lu@nxp.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ptp: replace getnstimeofday64() with ktime_get_real_ts64()
2018-06-18 14:20 [PATCH] ptp: replace getnstimeofday64() with ktime_get_real_ts64() Arnd Bergmann
2018-06-18 18:26 ` Richard Cochran
2018-06-19 1:59 ` Y.b. Lu
@ 2018-06-19 23:00 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-06-19 23:00 UTC (permalink / raw)
To: arnd
Cc: richardcochran, yangbo.lu, y2038, fabio.estevam, netdev, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 18 Jun 2018 16:20:39 +0200
> getnstimeofday64() is deprecated and getting replaced throughout
> the kernel with ktime_get_*() based helpers for a more consistent
> interface.
>
> The two functions do the exact same thing, so this is just
> a cosmetic change.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-06-19 23:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-18 14:20 [PATCH] ptp: replace getnstimeofday64() with ktime_get_real_ts64() Arnd Bergmann
2018-06-18 18:26 ` Richard Cochran
2018-06-19 1:59 ` Y.b. Lu
2018-06-19 23:00 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).