]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests: kselftest: Fix the wrong format specifier
authorzhang jiao <zhangjiao2@cmss.chinamobile.com>
Mon, 2 Dec 2024 04:31:11 +0000 (12:31 +0800)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 15 Jan 2025 00:06:31 +0000 (17:06 -0700)
The format specifier of "unsigned int" in printf()
should be "%u", not "%d".

Link: https://lore.kernel.org/r/20241202043111.3888-1-zhangjiao2@cmss.chinamobile.com
Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/kselftest.h

index 5263961db51f92fb8acac5a92bd0fdc4e9b2fd8b..cdf91b0ca40fbdc4fb825b86d4dc547b5afa673c 100644 (file)
@@ -427,7 +427,7 @@ static inline __noreturn __printf(1, 2) void ksft_exit_skip(const char *msg, ...
         */
        if (ksft_plan || ksft_test_num()) {
                ksft_cnt.ksft_xskip++;
-               printf("ok %d # SKIP ", 1 + ksft_test_num());
+               printf("ok %u # SKIP ", 1 + ksft_test_num());
        } else {
                printf("1..0 # SKIP ");
        }