From patchwork Wed Feb 21 09:27:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gow X-Patchwork-Id: 13565169 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 3B898C48BF6 for ; Wed, 21 Feb 2024 09:28:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 63A6A10E674; Wed, 21 Feb 2024 09:28:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="UB906qPN"; dkim-atps=neutral Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) by gabe.freedesktop.org (Postfix) with ESMTPS id B81FB10E674 for ; Wed, 21 Feb 2024 09:28:19 +0000 (UTC) Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dcbee93a3e1so8081183276.3 for ; Wed, 21 Feb 2024 01:28:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708507699; x=1709112499; 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=Z9U7+OVqCU0rhDEd8d2z0lAB4Gret4PnmLwRYwmvgX8=; b=UB906qPNLh2MnJA0IPbLDtC0BD1D4tf2t3U3koPtMXrigrFYhoj6KDn032UXm8L9hA 6+ayGOl7O0JIANaIBH/7jygd/a0vbgHudRHAh74qreNBhrtldPI2DCRItSE/xSmMkXhr KB2D4yUPO52K4P+mx7PJ2lRneVp5sQhYqirTh6ZAiSJAn08ygOAyERgsoAIVVIv0a7MH wL/jgLOXs0NnzE5QUNYFF1R7b3XnnjyamHXXsMM5yl1wjZpYEe99DLl2llX7S4bJV25u JfQcrha3F5SlpgkM3G3WVqIct7mn9Q1FUvMPYFwGUIddJZAVCY5QSjVnnYzLVBNmrnHu QLtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708507699; x=1709112499; 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=Z9U7+OVqCU0rhDEd8d2z0lAB4Gret4PnmLwRYwmvgX8=; b=J7sXuAyNW6fsDckB0n4mf9WkYd6eBq9fAYk6bcUdvnpB3ogxOClx4xUpil7KhYDcYR 2KTpre5cvwest5IainpY9kbJC3DrTqeqwlf3+kKF7Kf0zicRqqyJGx8qynjMq31X15Gp 3Wg87qaHiMb+/R3uvGPhCLznFfHRFHraP44gE0susbquUf00T9eVUWJ15SkpZSnHOI7/ Vv1xWODNpisBwA7r7Wl2cnogaDhmrLXsZ/rAmm5HDM54OwSLQNNu7Vx0vmp/5HUTkxUM kGNMStX65Q4mZoln/UPwYpjTtY0fLz5KT2K55nqkYji/s2+VyUyCffjLP53wmkx5vfEr SdBA== X-Forwarded-Encrypted: i=1; AJvYcCUpa1OjQnra0RwFPV4kPneyZDFGVutIDJoRBAmOScwCbHEk8zcF3JizbID+KGhnWa/xM7pGvAoUqbjzZSaoaZzr9q7j6IPmmZO/SPq/oo/e X-Gm-Message-State: AOJu0YxYL14ZB3wKV9XcWx7PwFNCbZ1OGDLqXLZpzNjdwN887xmo5m1+ jXHoIp8VaPKAARRGINLIw5Xp0VXRb7hJNf9/AazVmbpCeVoQmoM5GN9LU1y0TCTCmrYzYAV/0aP C0Rch0iWBqg== X-Google-Smtp-Source: AGHT+IHQmEZgvDehwTVbCeyhhzp67M3ZAq3QtZNAjC+xaNviI3L4AtsF+O/jA3jQTZUOnw086+ZCDp3kuUdK4Q== X-Received: from slicestar.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:20a1]) (user=davidgow job=sendgmr) by 2002:a25:69c4:0:b0:dcc:9f24:692b with SMTP id e187-20020a2569c4000000b00dcc9f24692bmr1016456ybc.13.1708507698808; Wed, 21 Feb 2024 01:28:18 -0800 (PST) Date: Wed, 21 Feb 2024 17:27:17 +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-5-davidgow@google.com> Subject: [PATCH 4/9] time: test: Fix incorrect format specifier 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" 'days' is a s64 (from div_s64), and so should use a %lld specifier. This was found by extending KUnit's assertion macros to use gcc's __printf attribute. Fixes: 276010551664 ("time: Improve performance of time64_to_tm()") Signed-off-by: David Gow Tested-by: Guenter Roeck Reviewed-by: Justin Stitt --- kernel/time/time_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/time_test.c b/kernel/time/time_test.c index ca058c8af6ba..3e5d422dd15c 100644 --- a/kernel/time/time_test.c +++ b/kernel/time/time_test.c @@ -73,7 +73,7 @@ static void time64_to_tm_test_date_range(struct kunit *test) days = div_s64(secs, 86400); - #define FAIL_MSG "%05ld/%02d/%02d (%2d) : %ld", \ + #define FAIL_MSG "%05ld/%02d/%02d (%2d) : %lld", \ year, month, mdday, yday, days KUNIT_ASSERT_EQ_MSG(test, year - 1900, result.tm_year, FAIL_MSG);