]> git.baikalelectronics.ru Git - kernel.git/commit
kcsan: use u64 instead of cycles_t
authorHeiko Carstens <hca@linux.ibm.com>
Thu, 29 Jul 2021 14:28:11 +0000 (16:28 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Fri, 30 Jul 2021 15:09:02 +0000 (17:09 +0200)
commit95d793fd810c4e0f0d55262f4e7ccb899a11502e
tree1a9fd184a124c30f300ffdae589fcb4c04cad71e
parenta044f669518dd7a4378309d324b1d0d240125b73
kcsan: use u64 instead of cycles_t

cycles_t has a different type across architectures: unsigned int,
unsinged long, or unsigned long long. Depending on architecture this
will generate this warning:

kernel/kcsan/debugfs.c: In function ‘microbenchmark’:
./include/linux/kern_levels.h:5:25: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘cycles_t’ {aka ‘long unsigned int’} [-Wformat=]

To avoid this simply change the type of cycle to u64 in microbenchmark(),
since u64 is of type unsigned long long for all architectures.

Acked-by: Marco Elver <elver@google.com>
Link: https://lore.kernel.org/r/20210729142811.1309391-1-hca@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
kernel/kcsan/debugfs.c