Skip to content

Commit b91c26f

Browse files
cmuellnerpalmer-dabbelt
authored andcommitted
tools: selftests: riscv: Fix compile warnings in hwprobe
GCC prints a couple of format string warnings when compiling the hwprobe test. Let's follow the recommendation in Documentation/printk-formats.txt to fix these warnings. Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20231123185821.2272504-2-christoph.muellner@vrull.eu Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent b85ea95 commit b91c26f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • tools/testing/selftests/riscv/hwprobe

tools/testing/selftests/riscv/hwprobe/hwprobe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ int main(int argc, char **argv)
2929
/* Fail if the kernel claims not to recognize a base key. */
3030
if ((i < 4) && (pairs[i].key != i))
3131
ksft_exit_fail_msg("Failed to recognize base key: key != i, "
32-
"key=%ld, i=%ld\n", pairs[i].key, i);
32+
"key=%lld, i=%ld\n", pairs[i].key, i);
3333

3434
if (pairs[i].key != RISCV_HWPROBE_KEY_BASE_BEHAVIOR)
3535
continue;
3636

3737
if (pairs[i].value & RISCV_HWPROBE_BASE_BEHAVIOR_IMA)
3838
continue;
3939

40-
ksft_exit_fail_msg("Unexpected pair: (%ld, %ld)\n", pairs[i].key, pairs[i].value);
40+
ksft_exit_fail_msg("Unexpected pair: (%lld, %llu)\n", pairs[i].key, pairs[i].value);
4141
}
4242

4343
out = riscv_hwprobe(pairs, 8, 0, 0, 0);

0 commit comments

Comments
 (0)