summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDavid Gow <davidgow@google.com>2024-02-21 12:27:19 +0300
committerSasha Levin <sashal@kernel.org>2024-03-27 01:16:28 +0300
commitbe63556e8c0ec74385d191f3d5b1cba9c495e182 (patch)
treec7d770e0341d16bce3c5eb7738c042ff48edbd23 /net
parentcd36414115a472d1ee026b502744e6105b3e9b22 (diff)
downloadlinux-be63556e8c0ec74385d191f3d5b1cba9c495e182.tar.xz
net: test: Fix printf format specifier in skb_segment kunit test
[ Upstream commit ff3b96f2c9e5c24fca12239cd519a8a18569e687 ] 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: b3098d32ed6e ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/core/gso_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/gso_test.c b/net/core/gso_test.c
index 4c2e77bd12f4..358c44680d91 100644
--- a/net/core/gso_test.c
+++ b/net/core/gso_test.c
@@ -225,7 +225,7 @@ static void gso_test_func(struct kunit *test)
segs = skb_segment(skb, features);
if (IS_ERR(segs)) {
- KUNIT_FAIL(test, "segs error %lld", PTR_ERR(segs));
+ KUNIT_FAIL(test, "segs error %pe", segs);
goto free_gso_skb;
} else if (!segs) {
KUNIT_FAIL(test, "no segments");