]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests/x86: fix printk warnings reported by clang
authorJohn Hubbard <jhubbard@nvidia.com>
Thu, 4 Jul 2024 07:24:31 +0000 (00:24 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 11 Jul 2024 17:23:55 +0000 (11:23 -0600)
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 <usama.anjum@collabora.com>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/x86/sigreturn.c
tools/testing/selftests/x86/test_vsyscall.c

index 5d7961a5f7f6ef05abd81c8d341f9caefcf0311b..0b75b29f794b7127b246d0f2484747d1a90f62eb 100644 (file)
@@ -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];
        if (asm_ss != sig_ss && sig == SIGTRAP) {
                /* 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);
                nerrs++;
        }
index 1c9895cfc660b417881ae1529a169073d8c4c7fb..6de11b4df4583b54f16b0e3656f67c402a661130 100644 (file)
@@ -247,7 +247,7 @@ static void test_getcpu(int cpu)
 
        if (ret_sys == 0) {
                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);
 
                have_node = true;
@@ -265,10 +265,10 @@ static void test_getcpu(int cpu)
 
                        if (cpu_vdso != cpu || node_vdso != node) {
                                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);
                                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);
                                ksft_test_result_fail("Wrong values\n");
                        } else {
@@ -290,10 +290,10 @@ static void test_getcpu(int cpu)
 
                        if (cpu_vsys != cpu || node_vsys != node) {
                                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);
                                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);
                                ksft_test_result_fail("Wrong values\n");
                        } else {