From: Lukas Bulwahn <lbulwahn@redhat.com>
To: "Danilo Krummrich" <dakr@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Lukas Bulwahn <lukas.bulwahn@redhat.com>
Subject: [PATCH] rust: drm: remove unneeded handling for config DRM_LEGACY
Date: Tue, 14 Oct 2025 08:41:20 +0200 [thread overview]
Message-ID: <20251014064120.263455-1-lukas.bulwahn@redhat.com> (raw)
From: Lukas Bulwahn <lukas.bulwahn@redhat.com>
Since commit 94f8f319cbcb ("drm: Remove Kconfig option for legacy support
(CONFIG_DRM_LEGACY)"), the special handling in the rust drm code for the
config DRM_LEGACY is not needed.
Remove the drm_legacy_fields macro and simply use bindings::drm_driver
unconditionally.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
---
rust/kernel/drm/device.rs | 33 +--------------------------------
1 file changed, 1 insertion(+), 32 deletions(-)
diff --git a/rust/kernel/drm/device.rs b/rust/kernel/drm/device.rs
index 3ce8f62a0056..a1d92d8922a4 100644
--- a/rust/kernel/drm/device.rs
+++ b/rust/kernel/drm/device.rs
@@ -16,37 +16,6 @@
};
use core::{alloc::Layout, mem, ops::Deref, ptr, ptr::NonNull};
-#[cfg(CONFIG_DRM_LEGACY)]
-macro_rules! drm_legacy_fields {
- ( $($field:ident: $val:expr),* $(,)? ) => {
- bindings::drm_driver {
- $( $field: $val ),*,
- firstopen: None,
- preclose: None,
- dma_ioctl: None,
- dma_quiescent: None,
- context_dtor: None,
- irq_handler: None,
- irq_preinstall: None,
- irq_postinstall: None,
- irq_uninstall: None,
- get_vblank_counter: None,
- enable_vblank: None,
- disable_vblank: None,
- dev_priv_size: 0,
- }
- }
-}
-
-#[cfg(not(CONFIG_DRM_LEGACY))]
-macro_rules! drm_legacy_fields {
- ( $($field:ident: $val:expr),* $(,)? ) => {
- bindings::drm_driver {
- $( $field: $val ),*
- }
- }
-}
-
/// A typed DRM device with a specific `drm::Driver` implementation.
///
/// The device is always reference-counted.
@@ -61,7 +30,7 @@ pub struct Device<T: drm::Driver> {
}
impl<T: drm::Driver> Device<T> {
- const VTABLE: bindings::drm_driver = drm_legacy_fields! {
+ const VTABLE: bindings::drm_driver = bindings::drm_driver {
load: None,
open: Some(drm::File::<T::File>::open_callback),
postclose: Some(drm::File::<T::File>::postclose_callback),
--
2.51.0
next reply other threads:[~2025-10-14 6:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 6:41 Lukas Bulwahn [this message]
2025-10-20 12:23 ` [PATCH] rust: drm: remove unneeded handling for config DRM_LEGACY Alice Ryhl
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=20251014064120.263455-1-lukas.bulwahn@redhat.com \
--to=lbulwahn@redhat.com \
--cc=a.hindborg@kernel.org \
--cc=airlied@gmail.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=lukas.bulwahn@redhat.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--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;
as well as URLs for NNTP newsgroup(s).