]> git.baikalelectronics.ru Git - kernel.git/commit
crc32: use ktime_get_ns() for measurement
authorArnd Bergmann <arnd@arndb.de>
Tue, 2 Aug 2016 21:04:16 +0000 (14:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 2 Aug 2016 23:35:08 +0000 (19:35 -0400)
commitb04321e1b9ac96bec749ebccf7e6b7ed50cf09ab
tree1c5981e2d274c3d3fb3b340724939fffb7747eb8
parent32772f67db1b883d3a86ef581a31f27c0edc17bf
crc32: use ktime_get_ns() for measurement

The crc32 test function measures the elapsed time in nanoseconds, but
uses 'struct timespec' for that.  We want to remove timespec from the
kernel for y2038 compatibility, and ktime_get_ns() also helps make the
code simpler here.

It is also slightly better to use monontonic time, as we are only
interested in the time difference.

Link: http://lkml.kernel.org/r/20160617143932.3289626-1-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: "David S . Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/crc32.c