On Thursday 22 October 2015 19:35:49 Shraddha Barke wrote:
Change the 32-bit time type timeval to the 64-bit time type ktime_t, since 32-bit systems using struct timeval will break in the year 2038. Correspondingly change do_gettimeofday() to ktime_get() since ktime_get returns a ktime_t, but do_gettimeofday returns a struct timeval.
Signed-off-by: Shraddha Barke shraddha.6596@gmail.com
The patch looks good to me, but please add a sentence to explain why you use ktime_get() instead of ktime_get_real(). It is the right choice here, but it may not be obvious to the reader that you now use monotonic times.
With that, please resend the patch and Cc the MTD maintainers.
How did you pick this driver? I thought I had originally given this task to someone else and not listed it in the y2038 wiki page. The other person has not worked on it over the last month, and it's a relatively simple patch, so don't worry about it.
Are we running out of simple tasks? I can always add a few more to the wiki as there are around 50 other drivers that need to be changed in a similar way.
Arnd