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 AEF85303C97 for ; Fri, 30 Jan 2026 21:13:57 +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=1769807637; cv=none; b=RQ7lWEMYLVlX40yJyPoeXPi8nMs6vzky5527xvgThK+gYmMJvP7jxXHz09p335rvH3Xov1M019Ot9q6nq2cjoEwZDrQ9Wp25JNs8a3pt6MiRsujkcWW4+Sf3IqTW9x+eYIefErDU/eJq6MZvkH9SKiTbsa7b4I1rrmvuV0W9mJY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769807637; c=relaxed/simple; bh=vRnFCzbTkvTPd2osuQemKh4aEr2ihcJEQC7zYRZZAGA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=JZtOa/2zdciOtQ6Fh8TwtXC76VDh7y56fqwp86jl8JTQ5AVnIUXtvhEOfOckCTKPuanuEBNeZfGmAAj/EFYpht7kmsj9Jufsy2SF6lNlEeWSRLMDc8FXVcqg6cfTIz/G+j86gYwW7xTpkOVSXYUxDMVk63ZObQLfIuuFkvoIsVc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=epDAHpqr; 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="epDAHpqr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6109C4CEF7; Fri, 30 Jan 2026 21:13:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769807637; bh=vRnFCzbTkvTPd2osuQemKh4aEr2ihcJEQC7zYRZZAGA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=epDAHpqrVki7a6Xl8AJE0703L/d2ZBRB2Bgk8b5ML1bytTwvM86WkD4UACqfcOCBT r8uk3Ty8FYQKO1/uyt695qlCpPbW1UgZSTszvZnO+nTfhqBxGfygJQKSUEI3h3hUZx CfQB5keNaqifXFNhpsvIXoFUUB5JCgpIbqL9Ex1IvNNhvmoB2aUjK3VC4qmGCBk5XO jmQxWjKe7aKIy40YyyhIUPI1R3xwTlXzLEtJ1UOx9It/NwnCgvmtLPHwUa2BJGMT7Z MC8WTIStxznqjDHgRVvLBzQLh+4HttzlbhZsVFWVJUvsSMlvXCtMufuCrZcI1x81on sOTTg1650wEMA== From: Thomas Gleixner To: Mark Brown , Jinjie Ruan Cc: jstultz@google.com, sboyd@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kunit: time: use is_leap_year() helper In-Reply-To: References: <20260123080940.335474-1-ruanjinjie@huawei.com> Date: Fri, 30 Jan 2026 22:13:53 +0100 Message-ID: <87h5s2hkha.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Fri, Jan 30 2026 at 19:39, Mark Brown wrote: > On Fri, Jan 30, 2026 at 03:11:17PM +0000, Mark Brown wrote: >> On Fri, Jan 23, 2026 at 04:09:40PM +0800, Jinjie Ruan wrote: >> >> > Use the is_leap_year() helper from rtc.h instead of >> > writing it by hand > >> This patch introduces a regression: > >> > -static bool is_leap(long year) > >> gets replaced by is_leap_year() which is: > >> static inline bool is_leap_year(unsigned int year) > >> which looks like it ought to work out the same from a quick look >> although it is written less clearly. I'll look properly later when I've >> got through the rest of the pile of regressions. > > The issue here is, of course, the change from using long for the new to > using unsigned long. The test is considering times up to 8000 years > before 1970 which results in us trying to convert a negative year to a > positive value before testing if it's a leap year which gives us the > wrong answer. I'll send a revert. Duh. Don't send anything I just zapped the commit from timers/core