public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Benno Lossin" <lossin@kernel.org>
To: "Danilo Krummrich" <dakr@kernel.org>
Cc: "Alice Ryhl" <aliceryhl@google.com>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rust: irq: add `'static` bounds to irq callbacks
Date: Sat, 14 Feb 2026 13:49:19 +0100	[thread overview]
Message-ID: <DGEP3X3WQROR.26BFH2XI3XO0R@kernel.org> (raw)
In-Reply-To: <DGEOG8J4CF1U.3EVS9UT98ORYF@kernel.org>

On Sat Feb 14, 2026 at 1:18 PM CET, Danilo Krummrich wrote:
> On Sat Feb 14, 2026 at 12:56 PM CET, Benno Lossin wrote:
>> Oh yeah I forgot about that, good catch. I think it should be
>>
>>     Fixes: 29e16fcd67ee ("rust: irq: add &Device<Bound> argument to irq callbacks")
>>
>> Since that introduces the usage of the `[Threaded]Registration` types
>> in the function bodies.
>>
>> It can also be backported further, but then it needs to be split into
>> threaded and non-threaded variants:
>
> All commits were introduced in v6.18, so technically there is no "backported
> further".
>
> But IIUC, with a fixed compiler, it also would not compile without commit
> 29e16fcd67ee ("rust: irq: add &Device<Bound> argument to irq callbacks"),
> correct? I.e.  the two commits below are the correct Fixes: tags.
>
>> - 135d40523244 ("rust: irq: add support for threaded IRQs and handlers")
>> - 0851d34a8cc3 ("rust: irq: add support for non-threaded IRQs and handlers")

With a fixed compiler these two would also still compile. It's just that
the callbacks will only ever be called with `T: 'static`, since that is
a bound on `[Threaded]Registration`, which stores these functions in the
C side. So from a purely no-compile-error perspective, 29e16fcd67ee is
the correct fixes. But from a "good API design" perspective, we could
choose the two other commits.

But since all commits are in v6.18, it doesn't matter all that much.

Cheers,
Benno

  reply	other threads:[~2026-02-14 12:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-14  9:27 [PATCH] rust: irq: add `'static` bounds to irq callbacks Benno Lossin
2026-02-14  9:34 ` Gary Guo
2026-02-14 10:23 ` Danilo Krummrich
2026-02-14 11:56   ` Benno Lossin
2026-02-14 12:18     ` Danilo Krummrich
2026-02-14 12:49       ` Benno Lossin [this message]
2026-02-14 13:51         ` Danilo Krummrich
2026-02-15 12:12 ` Alice Ryhl
2026-02-18 20:36 ` Danilo Krummrich
2026-02-19  8:37 ` Miguel Ojeda

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=DGEP3X3WQROR.26BFH2XI3XO0R@kernel.org \
    --to=lossin@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /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