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 12:56:44 +0100	[thread overview]
Message-ID: <DGENZNRDFU2U.34JH68EN7YK04@kernel.org> (raw)
In-Reply-To: <DGEM0E00MCEP.130GP2WIISA3V@kernel.org>

On Sat Feb 14, 2026 at 11:23 AM CET, Danilo Krummrich wrote:
> On Sat Feb 14, 2026 at 10:27 AM CET, Benno Lossin wrote:
>> These callback functions take a generic `T` that is used in the body as
>> the generic argument in `Registration` and `ThreadedRegistration`. Those
>> types require `T: 'static`, but due to a compiler bug this requirement
>> isn't propagated to the function. Thus add the bound. This was caught in
>> the upstream Rust CI [1].
>>
>> Signed-off-by: Benno Lossin <lossin@kernel.org>
>> Link: https://github.com/rust-lang/rust/pull/149389 [1]
>
> IIUC, the current code will not compile with a fixed compiler, right?

Correct.

> If this is correct, this needs to be backported; I can add the Fixes: tag and
> Cc: stable when I apply the patch.

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:

- 135d40523244 ("rust: irq: add support for threaded IRQs and handlers")
- 0851d34a8cc3 ("rust: irq: add support for non-threaded IRQs and handlers")

Cheers,
Benno

  reply	other threads:[~2026-02-14 11:56 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 [this message]
2026-02-14 12:18     ` Danilo Krummrich
2026-02-14 12:49       ` Benno Lossin
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=DGENZNRDFU2U.34JH68EN7YK04@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