Commit b84111cd authored by John Hubbard's avatar John Hubbard Committed by Shuah Khan

selftests/x86: fix printk warnings reported by clang

These warnings are all of the form, "the format specified a short
(signed or unsigned) int, but the value is a full length int".
Acked-by: default avatarMuhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 7d17b29b
...@@ -487,7 +487,7 @@ static void sigtrap(int sig, siginfo_t *info, void *ctx_void) ...@@ -487,7 +487,7 @@ static void sigtrap(int sig, siginfo_t *info, void *ctx_void)
greg_t asm_ss = ctx->uc_mcontext.gregs[REG_CX]; greg_t asm_ss = ctx->uc_mcontext.gregs[REG_CX];
if (asm_ss != sig_ss && sig == SIGTRAP) { if (asm_ss != sig_ss && sig == SIGTRAP) {
/* Sanity check failure. */ /* Sanity check failure. */
printf("[FAIL]\tSIGTRAP: ss = %hx, frame ss = %hx, ax = %llx\n", printf("[FAIL]\tSIGTRAP: ss = %hx, frame ss = %x, ax = %llx\n",
ss, *ssptr(ctx), (unsigned long long)asm_ss); ss, *ssptr(ctx), (unsigned long long)asm_ss);
nerrs++; nerrs++;
} }
......
...@@ -247,7 +247,7 @@ static void test_getcpu(int cpu) ...@@ -247,7 +247,7 @@ static void test_getcpu(int cpu)
if (ret_sys == 0) { if (ret_sys == 0) {
if (cpu_sys != cpu) if (cpu_sys != cpu)
ksft_print_msg("syscall reported CPU %hu but should be %d\n", ksft_print_msg("syscall reported CPU %u but should be %d\n",
cpu_sys, cpu); cpu_sys, cpu);
have_node = true; have_node = true;
...@@ -265,10 +265,10 @@ static void test_getcpu(int cpu) ...@@ -265,10 +265,10 @@ static void test_getcpu(int cpu)
if (cpu_vdso != cpu || node_vdso != node) { if (cpu_vdso != cpu || node_vdso != node) {
if (cpu_vdso != cpu) if (cpu_vdso != cpu)
ksft_print_msg("vDSO reported CPU %hu but should be %d\n", ksft_print_msg("vDSO reported CPU %u but should be %d\n",
cpu_vdso, cpu); cpu_vdso, cpu);
if (node_vdso != node) if (node_vdso != node)
ksft_print_msg("vDSO reported node %hu but should be %hu\n", ksft_print_msg("vDSO reported node %u but should be %u\n",
node_vdso, node); node_vdso, node);
ksft_test_result_fail("Wrong values\n"); ksft_test_result_fail("Wrong values\n");
} else { } else {
...@@ -290,10 +290,10 @@ static void test_getcpu(int cpu) ...@@ -290,10 +290,10 @@ static void test_getcpu(int cpu)
if (cpu_vsys != cpu || node_vsys != node) { if (cpu_vsys != cpu || node_vsys != node) {
if (cpu_vsys != cpu) if (cpu_vsys != cpu)
ksft_print_msg("vsyscall reported CPU %hu but should be %d\n", ksft_print_msg("vsyscall reported CPU %u but should be %d\n",
cpu_vsys, cpu); cpu_vsys, cpu);
if (node_vsys != node) if (node_vsys != node)
ksft_print_msg("vsyscall reported node %hu but should be %hu\n", ksft_print_msg("vsyscall reported node %u but should be %u\n",
node_vsys, node); node_vsys, node);
ksft_test_result_fail("Wrong values\n"); ksft_test_result_fail("Wrong values\n");
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment