* [PATCH] HSI: cmt_speech: use timespec64 instead of timespec
@ 2017-11-27 11:42 Arnd Bergmann
2017-12-01 15:35 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-11-27 11:42 UTC (permalink / raw)
To: Sebastian Reichel
Cc: y2038, Arnd Bergmann, Ross Zwisler, Ingo Molnar, Dave Jiang,
Andrew Morton, linux-kernel
struct timespec should no longer be used because of the y2038
overflow problem. This code does not suffer from the overflow,
but it's trivial to change it to use timespec64 without changing
the interface, so let's do that.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/hsi/clients/cmt_speech.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c
index 727f968ac1cb..05b80723d39d 100644
--- a/drivers/hsi/clients/cmt_speech.c
+++ b/drivers/hsi/clients/cmt_speech.c
@@ -451,11 +451,11 @@ static void cs_hsi_read_on_control_complete(struct hsi_msg *msg)
dev_dbg(&hi->cl->device, "Read on control: %08X\n", cmd);
cs_release_cmd(msg);
if (hi->flags & CS_FEAT_TSTAMP_RX_CTRL) {
- struct timespec tspec;
+ struct timespec64 tspec;
struct cs_timestamp *tstamp =
&hi->mmap_cfg->tstamp_rx_ctrl;
- ktime_get_ts(&tspec);
+ ktime_get_ts64(&tspec);
tstamp->tv_sec = (__u32) tspec.tv_sec;
tstamp->tv_nsec = (__u32) tspec.tv_nsec;
--
2.9.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] HSI: cmt_speech: use timespec64 instead of timespec
2017-11-27 11:42 [PATCH] HSI: cmt_speech: use timespec64 instead of timespec Arnd Bergmann
@ 2017-12-01 15:35 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2017-12-01 15:35 UTC (permalink / raw)
To: Arnd Bergmann
Cc: y2038, Ross Zwisler, Ingo Molnar, Dave Jiang, Andrew Morton,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]
Hi Arnd,
On Mon, Nov 27, 2017 at 12:42:34PM +0100, Arnd Bergmann wrote:
> struct timespec should no longer be used because of the y2038
> overflow problem. This code does not suffer from the overflow,
> but it's trivial to change it to use timespec64 without changing
> the interface, so let's do that.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
Thanks, queued.
-- Sebastian
> drivers/hsi/clients/cmt_speech.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c
> index 727f968ac1cb..05b80723d39d 100644
> --- a/drivers/hsi/clients/cmt_speech.c
> +++ b/drivers/hsi/clients/cmt_speech.c
> @@ -451,11 +451,11 @@ static void cs_hsi_read_on_control_complete(struct hsi_msg *msg)
> dev_dbg(&hi->cl->device, "Read on control: %08X\n", cmd);
> cs_release_cmd(msg);
> if (hi->flags & CS_FEAT_TSTAMP_RX_CTRL) {
> - struct timespec tspec;
> + struct timespec64 tspec;
> struct cs_timestamp *tstamp =
> &hi->mmap_cfg->tstamp_rx_ctrl;
>
> - ktime_get_ts(&tspec);
> + ktime_get_ts64(&tspec);
>
> tstamp->tv_sec = (__u32) tspec.tv_sec;
> tstamp->tv_nsec = (__u32) tspec.tv_nsec;
> --
> 2.9.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-01 15:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-27 11:42 [PATCH] HSI: cmt_speech: use timespec64 instead of timespec Arnd Bergmann
2017-12-01 15:35 ` Sebastian Reichel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®