Skip to content

Commit ff3b96f

Browse files
sulixshuahkh
authored andcommitted
net: test: Fix printf format specifier in skb_segment kunit test
KUNIT_FAIL() accepts a printf-style format string, but previously did not let gcc validate it with the __printf() attribute. The use of %lld for the result of PTR_ERR() is not correct. Instead, use %pe and pass the actual error pointer. printk() will format it correctly (and give a symbolic name rather than a number if available, which should make the output more readable, too). Fixes: b3098d3 ("net: add skb_segment kunit test") Signed-off-by: David Gow <davidgow@google.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Justin Stitt <justinstitt@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent 8a904a3 commit ff3b96f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/gso_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ static void gso_test_func(struct kunit *test)
225225

226226
segs = skb_segment(skb, features);
227227
if (IS_ERR(segs)) {
228-
KUNIT_FAIL(test, "segs error %lld", PTR_ERR(segs));
228+
KUNIT_FAIL(test, "segs error %pe", segs);
229229
goto free_gso_skb;
230230
} else if (!segs) {
231231
KUNIT_FAIL(test, "no segments");

0 commit comments

Comments
 (0)