Received: from flow-a4-smtp.messagingengine.com (flow-a4-smtp.messagingengine.com [103.168.172.139]) (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 0B69F3002C8 for ; Tue, 11 Aug 2026 15:02:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.139 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786460527; cv=none; b=Rra626KTxbuu6XPTadV41w5W7fWoj4CyDQKKnT9h+/tnWretGbEz0zSuUdT6qIfHSMCEriUFPSpmhBKgIo2aLV2iDkosWmwooQxn/NpZdcp29schUhcghJ1Er7G6U4frLNUt6vyy/XWLtYHXcj/5SLSWRpRD93CZs3SW1UXbc1c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786460527; c=relaxed/simple; bh=iZ7RtHuI/3mg+E7gwPOErtg7K3WLcF+5T6NWc2YeFVo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rZoDiZ6BN8ket0dId/Be49m+w2vcKMlT4bLQPpuV66+NCo5kpnOto/VxlI6wSFawvvrjLYIGJ0T1XLuyr7qQ/XiK5DgzxKcdiAzvf0nFjwr1oDPhfnHtnycoFXyN31ONnDtl3flgoE4cWPl0EGPFFffYAkwQ1T9eNbjtQb15z6Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=flapping.org; spf=pass smtp.mailfrom=flapping.org; dkim=pass (2048-bit key) header.d=flapping.org header.i=@flapping.org header.b=U76QZi2O; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=N+GRhws2; arc=none smtp.client-ip=103.168.172.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=flapping.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flapping.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flapping.org header.i=@flapping.org header.b="U76QZi2O"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="N+GRhws2" Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50]) by mailflow.phl.internal (Postfix) with ESMTP id F40D513804B7; Tue, 11 Aug 2026 11:02:04 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-10.internal (MEProxy); Tue, 11 Aug 2026 11:02:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flapping.org; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm2; t=1786460524; x=1786464124; bh=P/d6qwPyOO8XZmt1FighG TI0B1cUc8t+TOfU1c9OTUY=; b=U76QZi2OA8jIvZHpLrlyDyI5OqeMpR/yfVDAq 7ifsOjPR44O8DXHvZSy8U8GcuyUp7dB1MZNH2kvAZCbYGnIJx6K4HUcI1cZzOXE1 hHPGQbR2bKPtbEnvIjYbtNN33Bg5IbqESmMdPi+78utXklrTuZcLW7DRf04QELVz zZz5+94r6budb0DWq0bXqr+Ed4Xozb2XiNTU/y9SIU5LqxEXJ+dpsHbEo/uD+bW4 QmhOKfJicnFmGoBCuZQyg3c+7ejP+4oLf/KLOv5ulIQTOuraBDFh8uxSEcIETcex TT2iuYog9xxytP5gHQUDlPWlCKnytbDvF2NpvxT4EddqqJt9w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1786460524; x=1786464124; bh=P/d6qwPyOO8XZmt1FighGTI0B1cUc8t+TOf U1c9OTUY=; b=N+GRhws2J1epjiP0cIiSFnGSH1gVQjlC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messagingengine.com (Postfix) with ESMTPA; Tue, 11 Aug 2026 11:01:58 -0400 (EDT) From: FUJITA Tomonori To: a.hindborg@kernel.org, ojeda@kernel.org Cc: acourbot@nvidia.com, aliceryhl@google.com, anna-maria@linutronix.de, bjorn3_gh@protonmail.com, boqun@kernel.org, dakr@kernel.org, daniel.almeida@collabora.com, frederic@kernel.org, gary@garyguo.net, jstultz@google.com, lossin@kernel.org, lyude@redhat.com, sboyd@kernel.org, tamird@kernel.org, tglx@kernel.org, tmgross@umich.edu, work@onurozkan.dev, rust-for-linux@vger.kernel.org, FUJITA Tomonori Subject: [PATCH v1 0/2] Add Delta::to_jiffies_timeout() with tests Date: Wed, 12 Aug 2026 00:01:45 +0900 Message-ID: <20260811150147.1360102-1-tomo@flapping.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: FUJITA Tomonori The first patch is new. It adds an example and a KUnit test for Delta::as_millis_ceil(), which Miguel asked for [1]. The second patch was previously posted as patch 4 of [2]; patches 1-3 of that series have been applied. It has been reworked to fix the bug Miguel reported [1]: on 32 bit with HZ=1000, to_jiffies_timeout() could return a value larger than MAX_JIFFY_OFFSET. Both patches follow the format agreed in [3]: the examples show the behaviour, while the boundary inputs live in `#[test]` KUnit tests, with the magic numbers as named constants local to the test module rather than part of the exported API. [1] https://lore.kernel.org/rust-for-linux/CANiq72kHP1s7bGr4=xfJGR8KY=aUpjOB4OwLEG5E=TKULXg5Rg@mail.gmail.com/ [2] https://lore.kernel.org/rust-for-linux/20260808062839.1159990-1-tomo@flapping.org/ [3] https://lore.kernel.org/rust-for-linux/874ihxgxy0.fsf@kernel.org/ FUJITA Tomonori (2): rust: time: add example and KUnit test for Delta::as_millis_ceil() rust: time: add Delta::to_jiffies_timeout() for timeout conversion rust/kernel/Kconfig.test | 10 ++++ rust/kernel/time.rs | 108 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) base-commit: 8fe5e5f62bdb9660999449a4b5eaebcc37d7f842 -- 2.43.0