Re: [PATCH v6 4/7] rust: time: add Delta::to_jiffies_timeout() for timeout conversion
FUJITA Tomonori <[email protected]>
| Newsgroups | org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 11 Aug 2026 08:54:07 +0200 Miguel Ojeda <[email protected]> wrote: > On Sat, Aug 8, 2026 at 9:48 AM FUJITA Tomonori <[email protected]> wrote: >> >> + // CAST: `__msecs_to_jiffies()` returns a value in `0..=MAX_JIFFY_OFFSET`, i.e. >> + // `((LONG_MAX >> 1) - 1)`, which is non-negative and well within `isize`. > > I don't think I can pick up this one, because this comment isn't true > for arm32 `HZ=1000`, i.e. `__msecs_to_jiffies()` can be higher than > `MAX_JIFFY_OFFSET` and can actually reach `isize::MAX`. You are right, thanks. I'll fix the saturation, the comment and the commit message in the next version. > Could the documentation clarify what the saturation is? And add some > doctests? (Also to the previous patch's function if possible). Sure, for both functions. As we discussed before, I'll add examples too: https://lore.kernel.org/rust-for-linux/[email protected]/