Re: [Y2038] [PATCH 7/7] [RFC] [media] introduce v4l2_timespec type for timestamps

2015-09-15 Thread Arnd Bergmann
On Tuesday 15 September 2015 18:32:36 Hans Verkuil wrote: > > > > - ktime_get_ts(); > > + ktime_get_ts64(); > > + vts.tv_sec = timestamp.tv_sec; > > + vts.tv_nsec = timestamp.tv_nsec; > > I prefer to take this opportunity to create a v4l2_get_timespec helper > function, just

Re: [PATCH 7/7] [RFC] [media] introduce v4l2_timespec type for timestamps

2015-09-15 Thread Hans Verkuil
On 09/15/2015 05:49 PM, Arnd Bergmann wrote: > The v4l2 event queue uses a 'struct timespec' to pass monotonic > timestamps. This is not a problem by itself, but it breaks when user > space redefines timespec to use 'long long' on 32-bit systems. > > To avoid that problem, we define our own

[PATCH 7/7] [RFC] [media] introduce v4l2_timespec type for timestamps

2015-09-15 Thread Arnd Bergmann
The v4l2 event queue uses a 'struct timespec' to pass monotonic timestamps. This is not a problem by itself, but it breaks when user space redefines timespec to use 'long long' on 32-bit systems. To avoid that problem, we define our own replacement for timespec here, using 'long' tv_sec and

Re: [PATCH 7/7] [RFC] [media] introduce v4l2_timespec type for timestamps

2015-09-15 Thread Hans Verkuil
On 09/15/2015 05:49 PM, Arnd Bergmann wrote: > The v4l2 event queue uses a 'struct timespec' to pass monotonic > timestamps. This is not a problem by itself, but it breaks when user > space redefines timespec to use 'long long' on 32-bit systems. > > To avoid that problem, we define our own

[PATCH 7/7] [RFC] [media] introduce v4l2_timespec type for timestamps

2015-09-15 Thread Arnd Bergmann
The v4l2 event queue uses a 'struct timespec' to pass monotonic timestamps. This is not a problem by itself, but it breaks when user space redefines timespec to use 'long long' on 32-bit systems. To avoid that problem, we define our own replacement for timespec here, using 'long' tv_sec and

Re: [Y2038] [PATCH 7/7] [RFC] [media] introduce v4l2_timespec type for timestamps

2015-09-15 Thread Arnd Bergmann
On Tuesday 15 September 2015 18:32:36 Hans Verkuil wrote: > > > > - ktime_get_ts(); > > + ktime_get_ts64(); > > + vts.tv_sec = timestamp.tv_sec; > > + vts.tv_nsec = timestamp.tv_nsec; > > I prefer to take this opportunity to create a v4l2_get_timespec helper > function, just