From: Gary Guo <gary@garyguo.net>
To: "Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Abdiel Janulgue" <abdiel.janulgue@gmail.com>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Robin Murphy" <robin.murphy@arm.com>
Cc: Alexandre Courbot <acourbot@nvidia.com>,
rust-for-linux@vger.kernel.org, driver-core@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] rust: dma: remove old dma_{read,write} macro compatibility syntax
Date: Sat, 14 Feb 2026 13:33:41 +0800 [thread overview]
Message-ID: <20260214053344.1994776-5-gary@garyguo.net> (raw)
In-Reply-To: <20260214053344.1994776-1-gary@garyguo.net>
With users converted, the old compatibility syntax can be removed.
Signed-off-by: Gary Guo <gary@garyguo.net>
---
rust/kernel/dma.rs | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/rust/kernel/dma.rs b/rust/kernel/dma.rs
index 2338dc6b9374..f55033264849 100644
--- a/rust/kernel/dma.rs
+++ b/rust/kernel/dma.rs
@@ -706,18 +706,6 @@ unsafe impl<T: AsBytes + FromBytes + Send> Send for CoherentAllocation<T> {}
/// ```
#[macro_export]
macro_rules! dma_read {
- // Compatibility for old syntax.
- ($dma:ident [ $idx:expr ] $($proj:tt)* ) => {
- (|| -> ::core::result::Result<_, $crate::error::Error> {
- ::core::result::Result::Ok($crate::dma_read!($dma, [$idx]? $($proj)*))
- })
- };
- ($($dma:ident).* [ $idx:expr ] $($proj:tt)* ) => {
- (|| -> ::core::result::Result<_, $crate::error::Error> {
- ::core::result::Result::Ok($crate::dma_write!($($dma).*, [$idx]? $($proj)*))
- })
- };
-
($dma:expr, $($proj:tt)*) => {{
let ptr = $crate::project_pointer!(
$crate::dma::CoherentAllocation::as_ptr(&$dma), $($proj)*
@@ -754,14 +742,6 @@ macro_rules! dma_read {
/// ```
#[macro_export]
macro_rules! dma_write {
- // Compatibility for old syntax.
- ($dma:ident [ $idx:expr ] $(.$field:ident)* = $val:expr) => {
- (|| -> ::core::result::Result<_, $crate::error::Error> {
- $crate::dma_write!($dma, [$idx]? $(.$field)*, $val);
- ::core::result::Result::Ok(())
- })()
- };
-
(@parse [$dma:expr] [$($proj:tt)*] [, $val:expr]) => {
let ptr = $crate::project_pointer!(
mut $crate::dma::CoherentAllocation::as_mut_ptr(&$dma), $($proj)*
--
2.51.2
next prev parent reply other threads:[~2026-02-14 5:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260214053344.1994776-1-gary@garyguo.net>
2026-02-14 5:33 ` [PATCH 1/4] rust: add projection infrastructure Gary Guo
2026-02-14 9:53 ` Benno Lossin
2026-02-14 10:36 ` Gary Guo
2026-02-14 14:48 ` Benno Lossin
2026-02-14 10:27 ` Danilo Krummrich
2026-02-22 0:57 ` Benno Lossin
2026-02-22 10:52 ` Gary Guo
2026-02-14 5:33 ` [PATCH 2/4] rust: dma: generalize `dma_{read,write}` macro Gary Guo
2026-02-14 10:04 ` Benno Lossin
2026-02-14 10:46 ` Gary Guo
2026-02-14 14:53 ` Benno Lossin
2026-02-14 5:33 ` [PATCH 3/4] gpu: nova-core: convert to use new `dma_write!` syntax Gary Guo
2026-02-14 10:06 ` Benno Lossin
2026-02-14 5:33 ` Gary Guo [this message]
2026-02-14 10:05 ` [PATCH 4/4] rust: dma: remove old dma_{read,write} macro compatibility syntax Benno Lossin
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=20260214053344.1994776-5-gary@garyguo.net \
--to=gary@garyguo.net \
--cc=a.hindborg@kernel.org \
--cc=abdiel.janulgue@gmail.com \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=driver-core@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=robin.murphy@arm.com \
--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
all inboxes | Powered by JetHome®