From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95E0A1FF5D7; Sun, 24 Mar 2024 23:02:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321375; cv=none; b=Q4luDohRkrKwqrgASi3oezfvX3eGyy0rR69lSg1aGm0HeSvBG2yccN7yv4YXF1TnKqWw5LsuAhtsw+4hSvR4QQqs+HaYxd++evFim6JPJzK6/wvexJgjYQ/3bLiLHRXlT7bNInAOWHl6s7KgKaXue4pZSQGKnrX1Z6Uf43f9UPs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321375; c=relaxed/simple; bh=5C+htp1cj21cUDOBsDFxDwPW3yx1GRI9GjuFvV4teBA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bqLjy8DH4uPUCFGePpbUB07dC25sVJFvpwoM2NyeTknbR1iYucYzgbNmkZUzb6+fH5EijDyY32jFT2tVuClbbB4drK1uqWEndBBkQdiakRZMFi3ESlLBI9Z06A+uVKHmJL3d2WFu9gD7yX3dPcWYrBEjVsolVsE+Lb00h8+/iaw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BmR48/hy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BmR48/hy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8946CC433F1; Sun, 24 Mar 2024 23:02:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711321374; bh=5C+htp1cj21cUDOBsDFxDwPW3yx1GRI9GjuFvV4teBA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BmR48/hyUebQR3tds3kNVqqQruJ5xjEjtPneg2K6euUZJ8diRf8g29PDvAaIZ4dWn WDF3McGGRXHKcKyBZmNSfRsorN2Ge+rIfh5YVgbXW70+OXcRREweQguYGQYIroS9rj djXJp35vvGf4WpxsIAqZAo4rGXBvugs3MPchy9Eq2DzCLzKUVfAcjoYZXMpGrpSE8v XHO0J5foj7W7OzDbZbt77XJEynE1ISpTnKKtruUr3okqSiMRouRljmAH2eAB/qRQlq J2hf4XMvNmzwavgKUnC9phEkODYxX4Em+UO8pJ0Otd/b4OZmZOdkakFDcFwmindI6b leuIy+iUoh8QQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: David Gow , Guenter Roeck , Justin Stitt , Alexandre Belloni , Shuah Khan , Sasha Levin Subject: [PATCH 6.6 098/638] rtc: test: Fix invalid format specifier. Date: Sun, 24 Mar 2024 18:52:15 -0400 Message-ID: <20240324230116.1348576-99-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324230116.1348576-1-sashal@kernel.org> References: <20240324230116.1348576-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: David Gow [ Upstream commit 8a904a3caa88118744062e872ae90f37748a8fd8 ] '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: 1d1bb12a8b18 ("rtc: Improve performance of rtc_time64_to_tm(). Add tests.") Signed-off-by: David Gow Tested-by: Guenter Roeck Reviewed-by: Justin Stitt Acked-by: Alexandre Belloni Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin --- drivers/rtc/lib_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/lib_test.c b/drivers/rtc/lib_test.c index d5caf36c56cdc..225c859d6da55 100644 --- a/drivers/rtc/lib_test.c +++ b/drivers/rtc/lib_test.c @@ -54,7 +54,7 @@ static void rtc_time64_to_tm_test_date_range(struct kunit *test) days = div_s64(secs, 86400); - #define FAIL_MSG "%d/%02d/%02d (%2d) : %ld", \ + #define FAIL_MSG "%d/%02d/%02d (%2d) : %lld", \ year, month, mday, yday, days KUNIT_ASSERT_EQ_MSG(test, year - 1900, result.tm_year, FAIL_MSG); -- 2.43.0