]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: selftests: Remove unnecessary "%s" formatting of a constant string
authorSean Christopherson <seanjc@google.com>
Fri, 22 May 2026 17:21:51 +0000 (10:21 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 26 May 2026 19:23:36 +0000 (12:23 -0700)
Drop superfluous %s formatting from assertions in the guest_memfd overlap
testcases, as the string being printed doesn't require runtime formatting.

No functional change intended.

Reported-by: Ackerley Tng <ackerleytng@google.com>
Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://patch.msgid.link/20260522172151.3530267-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/set_memory_region_test.c

index be99c1ff5a5a99217d79d2f2e6eac00c233dad3b..e0800bfb11ebefd8ce445758eb54a56846b86f1d 100644 (file)
@@ -554,7 +554,7 @@ static void test_add_overlapping_private_memory_regions(void)
                                         MEM_REGION_GPA * 2 - MEM_REGION_SIZE,
                                         MEM_REGION_SIZE * 2,
                                         0, memfd, 0);
-       TEST_ASSERT(r == -1 && errno == EEXIST, "%s",
+       TEST_ASSERT(r == -1 && errno == EEXIST,
                    "Overlapping guest_memfd() bindings should fail with EEXIST");
 
        /* And now the back half of the other slot. */
@@ -562,7 +562,7 @@ static void test_add_overlapping_private_memory_regions(void)
                                         MEM_REGION_GPA * 2 + MEM_REGION_SIZE,
                                         MEM_REGION_SIZE * 2,
                                         0, memfd, 0);
-       TEST_ASSERT(r == -1 && errno == EEXIST, "%s",
+       TEST_ASSERT(r == -1 && errno == EEXIST,
                    "Overlapping guest_memfd() bindings should fail with EEXIST");
 
        close(memfd);