]> git.baikalelectronics.ru Git - kernel.git/commit
mmc_test: use ktime_get_ts64 for timestamps
authorArnd Bergmann <arnd@arndb.de>
Mon, 27 Nov 2017 11:53:22 +0000 (12:53 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 11 Dec 2017 11:48:06 +0000 (12:48 +0100)
commit5672900775a1e9d88f3449ac625cb8bc3320e12c
tree7327615525a7aed8b215941ff09fdc2509d6a144
parent3e43a5720f3bd3a016545c82cd6e17e29020aed7
mmc_test: use ktime_get_ts64 for timestamps

Calling getnstimeofday() can suffer from time jumps and from the
y2038 overflow, so it is not appropriate here. Using ktime_get_ts64()
solves both problems. Using ktime_get() with ktime_t timestamps would
also work, but it seems that we mainly want to print the times as
seconds+nanoseconds, so it would require an extra division in the output.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/mmc_test.c