Re: [PATCH v3] rust: time: warn and assert out-of-range input in fsleep() and udelay()
Andreas Hindborg <[email protected]> Wed, 05 Aug 2026 12:42:47 +0200
| Newsgroups | org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <[email protected]> |
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). Best regards, Andreas Hindborg