From: Jens Axboe <[email protected]>
To: Dmitry Antipov <[email protected]>
Cc: Jeff Moyer <[email protected]>, [email protected]
Subject: Re: [PATCH] io_uring: avoid implicit conversion to ktime_t
Date: Fri, 14 Feb 2025 10:34:51 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 2/14/25 12:39 AM, Dmitry Antipov wrote:
> In 'io_get_ext_arg()', do not assume that 'min_wait_usec' of 'struct
> io_uring_getevents_arg' (which is '__u32') multiplied by NSEC_PER_USEC
> may be implicitly converted to 'ktime_t' but use the convenient
> 'us_to_ktime()' helper instead. Compile tested only.
>
> Suggested-by: Jeff Moyer <[email protected]>
> Signed-off-by: Dmitry Antipov <[email protected]>
> ---
> I didn't add Fixes: as per Jeff's remark at
> https://lore.kernel.org/io-uring/[email protected]/T/#t;
> if you think that it should be, most likely they are:
>
> aa00f67adc2c ("io_uring: add support for fixed wait regions")
> 7ed9e09e2d13 ("io_uring: wire up min batch wake timeout")
I don't think that's needed, as it's not really fixing anything.
Using us_to_ktime() is identical to the code that's already there.
--
Jens Axboe
prev parent reply other threads:[~2025-02-14 17:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 7:39 [PATCH] io_uring: avoid implicit conversion to ktime_t Dmitry Antipov
2025-02-14 8:08 ` lizetao
2025-02-14 17:34 ` Jens Axboe [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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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