Re: [PATCH v3] rust: time: warn and assert out-of-range input in fsleep() and udelay()

Andreas Hindborg <[email protected]> Wed, 05 Aug 2026 14:43:25 +0200
Newsgroups org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
Andreas Hindborg <[email protected]> writes:

> Sang-Heon Jeon <[email protected]> writes:
>
>> fsleep() documents out-of-range input as a bug but does not check
>> it, unlike udelay(). Add `debug_assert!` calls to catch it in
>> debug builds.
>>
>> Also add `pr_warn_once!` calls in both fsleep() and udelay() so
>> the clamped path is observable at runtime.
>>
>> Reviewed-by: Onur Özkan <[email protected]>
>> Reviewed-by: Andreas Hindborg <[email protected]>
>> Signed-off-by: Sang-Heon Jeon <[email protected]>
>
> Just FYI, I plan to queue this after the next merge window (for v6.4).

v7.4 of course.

Best regards,
Andreas Hindborg