From: Nam Cao <namcao@linutronix.de>
To: Anna-Maria Behnsen <anna-maria@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Andreas Hindborg <a.hindborg@kernel.org>,
Alice Ryhl <aliceryhl@google.com>,
Miguel Ojeda <ojeda@kernel.org>, Kees Cook <kees@kernel.org>,
linux-kernel@vger.kernel.org
Cc: Nam Cao <namcao@linutronix.de>, Jens Axboe <axboe@kernel.dk>
Subject: [PATCH 05/12] io_uring: Use helper function hrtimer_update_function()
Date: Mon, 28 Oct 2024 08:35:49 +0100 [thread overview]
Message-ID: <e8fbdf7bd54e2fd7f17c1d5ec75914787df7f96b.1729865740.git.namcao@linutronix.de> (raw)
In-Reply-To: <cover.1729865740.git.namcao@linutronix.de>
There is a new helper function hrtimer_update_function() to change the
hrtimer's callback function, which also performs additional runtime check
that it is safe to change the callback.
Use the helper function instead of accessing 'function' directly.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Jens Axboe <axboe@kernel.dk>
---
io_uring/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 0842aa3f60e7..5a3c2d647467 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -2423,7 +2423,7 @@ static enum hrtimer_restart io_cqring_min_timer_wakeup(struct hrtimer *timer)
goto out_wake;
}
- iowq->t.function = io_cqring_timer_wakeup;
+ hrtimer_update_function(&iowq->t, io_cqring_timer_wakeup);
hrtimer_set_expires(timer, iowq->timeout);
return HRTIMER_RESTART;
out_wake:
--
2.39.5
next prev parent reply other threads:[~2024-10-28 7:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-28 7:35 [PATCH 00/12] hrtimers: Switch to new hrtimer interface functions (5/5) Nam Cao
2024-10-28 7:35 ` [PATCH 01/12] hrtimers: Delete hrtimer_init() Nam Cao
2024-10-28 7:35 ` [PATCH 02/12] hrtimers: Switch to use __htimer_setup() Nam Cao
2024-10-28 7:35 ` [PATCH 03/12] hrtimers: Merge __hrtimer_init() into __hrtimer_setup() Nam Cao
2024-10-28 7:35 ` [PATCH 04/12] serial: xilinx_uartps: Use helper function hrtimer_update_function() Nam Cao
2024-10-28 7:35 ` Nam Cao [this message]
2024-10-28 7:35 ` [PATCH 06/12] wifi: rt2x00: Switch to use hrtimer_update_function() Nam Cao
2024-10-28 7:35 ` [PATCH 07/12] hrtimers: Make callback function pointer private Nam Cao
2024-10-28 7:35 ` [PATCH 08/12] hrtimers: Remove unnecessary NULL check in hrtimer_start_range_ns() Nam Cao
2024-10-28 7:35 ` [PATCH 09/12] hrtimers: Rename __hrtimer_init_sleeper() to __hrtimer_setup_sleeper() Nam Cao
2024-10-28 7:35 ` [PATCH 10/12] hrtimers: Rename debug_init() to debug_setup() Nam Cao
2024-10-28 7:35 ` [PATCH 11/12] hrtimers: Rename debug_init_on_stack() to debug_setup_on_stack() Nam Cao
2024-10-28 7:35 ` [PATCH 12/12] tracing/timers: Rename hrtimer_init event to hrtimer_setup Nam Cao
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=e8fbdf7bd54e2fd7f17c1d5ec75914787df7f96b.1729865740.git.namcao@linutronix.de \
--to=namcao@linutronix.de \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=anna-maria@linutronix.de \
--cc=axboe@kernel.dk \
--cc=frederic@kernel.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®