From patchwork Wed Feb 21 09:27:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gow X-Patchwork-Id: 13565171 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8BB03C48BF6 for ; Wed, 21 Feb 2024 09:28:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D6B510E50B; Wed, 21 Feb 2024 09:28:29 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="OR8PHALc"; dkim-atps=neutral Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) by gabe.freedesktop.org (Postfix) with ESMTPS id DA11810E67E for ; Wed, 21 Feb 2024 09:28:28 +0000 (UTC) Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-607838c0800so82851497b3.1 for ; Wed, 21 Feb 2024 01:28:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708507708; x=1709112508; darn=lists.freedesktop.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=l+N/x8q0XM6q/oxl++oFE/zLIduvg/H3kbNqGrSm6L0=; b=OR8PHALcSxYjX18FxooasIFjpGF9KP1DEBNR6CL51ztNvgJJsH2cbekPYu7taco5zI MzUr6oy8yVnzdv+gDFDnUSEwUdaaErm/gIq2s1fmWoAxsRQJjKJ3WUpdZ03CcZTxc7i6 sZLcXlVB0Egw2BynmfvxlB+R0b5BSMe1JjxI/SO5SUwz7PU1n7+a0MxdDYl8mn7XbR9H kkyFhmOIBzhB0lrroKxmKe5gJed6A9IoH+WuwVKQEp+yTuCfbOHXuz69VGXq+MjcYYk3 EsFSeaAL+/ky8GcGWk7hBUFxhUv8TVZn7lz0cLJKnvKBTqOpv+9uRkkW5qRmJ3DHd0Ec HXHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708507708; x=1709112508; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=l+N/x8q0XM6q/oxl++oFE/zLIduvg/H3kbNqGrSm6L0=; b=Kbf0LzHiey5RUdFK2yWkU/znsTzNsVdx0FPFvCDWnX7DSpGDZpe5tkmP0m6ZLTaat+ TkISakWl8auEraSilzT+wEUWwdmlwI2K2H+GqtmwaHbK02qFS6KypSuk7l7Hrz7H5z84 UYinWdTugCe2phHYLfRyHmlygNlAh9LShIvx06TaIiWnff/VTyb+xaiYgSzuEUOZnjbq pDXS9xHp+uo7TL3tepE8S2jNKv9kyA0c2SXUS6R7+myQu/dzJBtKlg/jEGbnxJ3k6Htu KYLjmjwuopzPEyA4Nr0FjDVLdARtbpgXnReJst5Rsc4btm8k/DP30xOZf1VIqfBORd7h Q5PQ== X-Forwarded-Encrypted: i=1; AJvYcCWi4OjF3X5X9Qd509j+b9WcKHjDamsthf8Gzd6AFj1vttiAu1PUa9z3S09tKVVxc3CcaDWxMGXKq5HOeHaX25Rd+NhQakSICadRFnRV+N+W X-Gm-Message-State: AOJu0Yw5Hw3HRT+og+Vh8ARWlXML1MlwniPOpkzBI6I4qnEFOny/TJK+ 6ykgFKXbBy1o6a4DNuAfrUHdO+pRHzJ0atswq17L3TFsFheR3HGL3FWJMRldoZyEs/XfVzLXvjj 7T4ubzTQeDg== X-Google-Smtp-Source: AGHT+IGujiTgGmrs6aB7MYtXNm4zgRA3Zr4vV9toQOw9f+upbD+oRsb+6ooQYjPHHocWRD49vELQV317edlmfg== X-Received: from slicestar.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:20a1]) (user=davidgow job=sendgmr) by 2002:a05:6902:1081:b0:dc2:2e5c:a21d with SMTP id v1-20020a056902108100b00dc22e5ca21dmr5584522ybu.6.1708507707855; Wed, 21 Feb 2024 01:28:27 -0800 (PST) Date: Wed, 21 Feb 2024 17:27:19 +0800 In-Reply-To: <20240221092728.1281499-1-davidgow@google.com> Mime-Version: 1.0 References: <20240221092728.1281499-1-davidgow@google.com> X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog Message-ID: <20240221092728.1281499-7-davidgow@google.com> Subject: [PATCH 6/9] net: test: Fix printf format specifier in skb_segment kunit test From: David Gow To: Linus Torvalds , Shuah Khan , Guenter Roeck , Rae Moar , Matthew Auld , Arunpravin Paneer Selvam , " =?utf-8?q?C?= =?utf-8?q?hristian_K=C3=B6nig?= " , Kees Cook , " =?utf-8?q?Ma=C3=ADra_Canal?= " , Rodrigo Vivi , Matthew Brost , Willem de Bruijn , Florian Westphal , Cassio Neri , Javier Martinez Canillas , Arthur Grillo Cc: David Gow , Brendan Higgins , Daniel Latypov , Stephen Boyd , David Airlie , Maxime Ripard , "David S . Miller" , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, intel-xe@lists.freedesktop.org, linux-rtc@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-hardening@vger.kernel.org, netdev@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Tested-by: Guenter Roeck Reviewed-by: Justin Stitt --- net/core/gso_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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");