From: sashiko-bot@kernel.org
To: "FUJITA Tomonori" <tomo@flapping.org>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v3] rust: serdev: use Delta<Jiffy> for timeouts
Date: Tue, 03 Nov 2026 01:17:21 +0000 [thread overview]
Message-ID: <sashiko-outbox-194421@kernel.org> (raw)
In-Reply-To: <20261103011143.917147-1-tomo@flapping.org>
> 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>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261103011143.917147-1-tomo@flapping.org?part=1
prev parent reply other threads:[~2026-11-03 1:17 UTC|newest]
Thread overview: 2+ 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 [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=sashiko-outbox-194421@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tomo@flapping.org \
/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