Skip to content

Commit b84111c

Browse files
johnhubbardshuahkh
authored andcommitted
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: Muhammad Usama Anjum <[email protected]> Signed-off-by: John Hubbard <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent 7d17b29 commit b84111c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tools/testing/selftests/x86/sigreturn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ static void sigtrap(int sig, siginfo_t *info, void *ctx_void)
487487
greg_t asm_ss = ctx->uc_mcontext.gregs[REG_CX];
488488
if (asm_ss != sig_ss && sig == SIGTRAP) {
489489
/* Sanity check failure. */
490-
printf("[FAIL]\tSIGTRAP: ss = %hx, frame ss = %hx, ax = %llx\n",
490+
printf("[FAIL]\tSIGTRAP: ss = %hx, frame ss = %x, ax = %llx\n",
491491
ss, *ssptr(ctx), (unsigned long long)asm_ss);
492492
nerrs++;
493493
}

tools/testing/selftests/x86/test_vsyscall.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ static void test_getcpu(int cpu)
247247

248248
if (ret_sys == 0) {
249249
if (cpu_sys != cpu)
250-
ksft_print_msg("syscall reported CPU %hu but should be %d\n",
250+
ksft_print_msg("syscall reported CPU %u but should be %d\n",
251251
cpu_sys, cpu);
252252

253253
have_node = true;
@@ -265,10 +265,10 @@ static void test_getcpu(int cpu)
265265

266266
if (cpu_vdso != cpu || node_vdso != node) {
267267
if (cpu_vdso != cpu)
268-
ksft_print_msg("vDSO reported CPU %hu but should be %d\n",
268+
ksft_print_msg("vDSO reported CPU %u but should be %d\n",
269269
cpu_vdso, cpu);
270270
if (node_vdso != node)
271-
ksft_print_msg("vDSO reported node %hu but should be %hu\n",
271+
ksft_print_msg("vDSO reported node %u but should be %u\n",
272272
node_vdso, node);
273273
ksft_test_result_fail("Wrong values\n");
274274
} else {
@@ -290,10 +290,10 @@ static void test_getcpu(int cpu)
290290

291291
if (cpu_vsys != cpu || node_vsys != node) {
292292
if (cpu_vsys != cpu)
293-
ksft_print_msg("vsyscall reported CPU %hu but should be %d\n",
293+
ksft_print_msg("vsyscall reported CPU %u but should be %d\n",
294294
cpu_vsys, cpu);
295295
if (node_vsys != node)
296-
ksft_print_msg("vsyscall reported node %hu but should be %hu\n",
296+
ksft_print_msg("vsyscall reported node %u but should be %u\n",
297297
node_vsys, node);
298298
ksft_test_result_fail("Wrong values\n");
299299
} else {

0 commit comments

Comments
 (0)