From: "Danilo Krummrich" <dakr@kernel.org>
To: "Alice Ryhl" <aliceryhl@google.com>
Cc: "Gary Guo" <gary@garyguo.net>, <airlied@gmail.com>,
<simona@ffwll.ch>, <daniel.almeida@collabora.com>,
<ojeda@kernel.org>, <boqun@kernel.org>,
<bjorn3_gh@protonmail.com>, <lossin@kernel.org>,
<a.hindborg@kernel.org>, <tmgross@umich.edu>, <tamird@kernel.org>,
<acourbot@nvidia.com>, <work@onurozkan.dev>,
<nova-gpu@lists.linux.dev>, <dri-devel@lists.freedesktop.org>,
<linux-kernel@vger.kernel.org>, <rust-for-linux@vger.kernel.org>
Subject: Re: [PATCH] rust: drm: remove DRM device private data
Date: Thu, 19 Nov 2026 18:28:07 +0100 [thread overview]
Message-ID: <DMZD4TXCZSRX.HN0ETV0FWFIY@kernel.org> (raw)
In-Reply-To: <CAH5fLghc63zD9c1F437pQiX+ohgSkYQe4nt3xP4gSTsqAVLzBA@mail.gmail.com>
On Thu Nov 19, 2026 at 12:49 PM CET, Alice Ryhl wrote:
> Good idea
Indeed, what do you think about this?
diff --git a/rust/kernel/drm/device.rs b/rust/kernel/drm/device.rs
index 774db3acb15a..8c48dcfdecec 100644
--- a/rust/kernel/drm/device.rs
+++ b/rust/kernel/drm/device.rs
@@ -158,7 +158,11 @@ const fn compute_features() -> u32 {
open: Some(drm::File::<T::File>::open_callback),
postclose: Some(drm::File::<T::File>::postclose_callback),
unload: None,
- release: None,
+ release: {
+ // The DRM core frees the device without running a Rust destructor.
+ const_assert!(!mem::needs_drop::<Device<T, Normal>>());
+ None
+ },
master_set: None,
master_drop: None,
debugfs_init: None,
prev parent reply other threads:[~2026-11-19 17:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 18:07 [PATCH] rust: drm: remove DRM device private data Danilo Krummrich
2026-11-19 11:17 ` Alice Ryhl
2026-11-19 11:24 ` Gary Guo
2026-11-19 11:49 ` Alice Ryhl
2026-11-19 17:28 ` Danilo Krummrich [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=DMZD4TXCZSRX.HN0ETV0FWFIY@kernel.org \
--to=dakr@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/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