[PATCH v2] mtd: test: Replace timeval with ktime_t in speedtest.c and torturetest.c
Arnd Bergmann
arnd at linaro.org
Tue Dec 2 05:28:55 PST 2014
On Tuesday 02 December 2014 19:22:34 Chunyan Zhang wrote:
> This patch changes the 32-bit time type (timeval) to the 64-bit one
> (ktime_t), since 32-bit time types will break in the year 2038.
>
> I use ktime_t instead of timeval to define 'start' and 'finish'
> which are used to get the time for tow points.
>
> This patch also changes do_gettimeofday() to ktime_get() accordingly,
> since ktime_get returns a ktime_t, but do_gettimeofday returns a
> struct timeval, and the other reason is that ktime_get() uses
> the monotonic clock.
>
> Signed-off-by: Chunyan Zhang <zhang.chunyan at linaro.org>
> ---
> Changes since v1:
> - Add including <linux/ktime.h> in torturetest.c
Looks good to me,
Reviewed-by: Arnd Bergmann <arnd at arndb.de>
More information about the linux-mtd
mailing list