From: "Danilo Krummrich" <dakr@kernel.org>
To: "FUJITA Tomonori" <tomo@flapping.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>
Cc: <markus.probst@posteo.de>, <ojeda@kernel.org>,
<a.hindborg@kernel.org>, <acourbot@nvidia.com>,
<aliceryhl@google.com>, <bjorn3_gh@protonmail.com>,
<boqun@kernel.org>, <daniel.almeida@collabora.com>,
<gary@garyguo.net>, <lossin@kernel.org>, <tamird@kernel.org>,
<tmgross@umich.edu>, <work@onurozkan.dev>,
<linux-serial@vger.kernel.org>, <rust-for-linux@vger.kernel.org>,
<fujita.tomonori@gmail.com>
Subject: Re: [PATCH v3] rust: serdev: use Delta<Jiffy> for timeouts
Date: Tue, 17 Nov 2026 15:39:22 +0100 [thread overview]
Message-ID: <DMXKAJKEIMFA.X1EWOKG0JRWG@kernel.org> (raw)
In-Reply-To: <20261117.200726.1503876918333666825.tomo@flapping.org>
(Cc: Greg, Jiri)
On Tue Nov 17, 2026 at 12:07 PM CET, FUJITA Tomonori wrote:
> On Tue, 3 Nov 2026 10:11:43 +0900
> FUJITA Tomonori <tomo@flapping.org> wrote:
>
>> From: FUJITA Tomonori <fujita.tomonori@gmail.com>
>>
>> write_all() and wait_until_sent() take the timeout as a raw Jiffies,
>> which is a c_ulong alias. The type does not show the unit.
>>
>> Take the timeout as Delta<Jiffy> instead.
>>
>> The C side treats a timeout of 0 as "wait indefinitely". The Rust API
>> does not keep that meaning. A timeout of 0 or negative is rounded up
>> to one jiffy. A caller that wants to wait indefinitely passes
>> Delta::from_jiffies(isize::MAX). That value is MAX_SCHEDULE_TIMEOUT.
>> The C side replaces 0 with MAX_SCHEDULE_TIMEOUT before it waits, so
>> this gives the same wait as a timeout of 0 did before.
>>
>> Reviewed-by: Markus Probst <markus.probst@posteo.de>
>> Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
>
> Gentle ping.
>
> Danilo, could you take this through driver-core? It applies cleanly to
> driver-core-next.
I think serdev stuff usually goes through TTY.
Greg, can you please pick this up?
Thanks,
Danilo
prev parent reply other threads:[~2026-11-17 14:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 1:11 [PATCH v3] rust: serdev: use Delta<Jiffy> for timeouts FUJITA Tomonori
2026-11-03 1:17 ` sashiko-bot
2026-11-17 11:07 ` FUJITA Tomonori
2026-11-17 14:39 ` Danilo Krummrich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DMXKAJKEIMFA.X1EWOKG0JRWG@kernel.org \
--to=dakr@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=fujita.tomonori@gmail.com \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=markus.probst@posteo.de \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=tomo@flapping.org \
--cc=work@onurozkan.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox