From: Alexandre Courbot <acourbot@nvidia.com>
To: "Yury Norov" <yury.norov@gmail.com>,
"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>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>
Cc: John Hubbard <jhubbard@nvidia.com>,
Alistair Popple <apopple@nvidia.com>,
Timur Tabi <ttabi@nvidia.com>, Zhi Wang <zhiw@nvidia.com>,
Eliot Courtney <ecourtney@nvidia.com>,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
nova-gpu@lists.linux.dev, driver-core@lists.linux.dev,
Alexandre Courbot <acourbot@nvidia.com>
Subject: [PATCH v4 3/7] rust: bitfield: fully qualify types in macro
Date: Wed, 27 May 2026 21:51:57 +0900 [thread overview]
Message-ID: <20260527-bitfield-v4-3-e8821d4efbde@nvidia.com> (raw)
In-Reply-To: <20260527-bitfield-v4-0-e8821d4efbde@nvidia.com>
These types were not fully qualified, which could cause issues if the
local module shadows them.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
rust/kernel/bitfield.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rust/kernel/bitfield.rs b/rust/kernel/bitfield.rs
index b3ad5fdbfb23..2498107979dc 100644
--- a/rust/kernel/bitfield.rs
+++ b/rust/kernel/bitfield.rs
@@ -455,7 +455,7 @@ const fn [<__with_ $field>](
#[doc = "Returns the value of this field."]
#[inline(always)]
$vis fn $field(self) ->
- Result<
+ ::core::result::Result<
$try_into_type,
<$try_into_type as ::core::convert::TryFrom<
::kernel::num::Bounded<$storage, { $hi + 1 - $lo }>
@@ -508,7 +508,7 @@ const fn [<__with_ $field>](
self,
value: T,
) -> Self
- where T: Into<::kernel::num::Bounded<$storage, { $hi + 1 - $lo }>>,
+ where T: ::core::convert::Into<::kernel::num::Bounded<$storage, { $hi + 1 - $lo }>>,
{
self.[<__with_ $field>](value.into())
}
--
2.54.0
next prev parent reply other threads:[~2026-05-27 12:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 12:51 [PATCH v4 0/7] rust: add `bitfield!` macro Alexandre Courbot
2026-05-27 12:51 ` [PATCH v4 1/7] rust: extract `bitfield!` macro from `register!` Alexandre Courbot
2026-05-27 12:51 ` [PATCH v4 2/7] rust: bitfield: inline private accessors Alexandre Courbot
2026-05-27 12:51 ` Alexandre Courbot [this message]
2026-05-27 13:24 ` [PATCH v4 3/7] rust: bitfield: fully qualify types in macro Miguel Ojeda
2026-05-27 13:44 ` Alexandre Courbot
2026-05-27 20:51 ` Yury Norov
2026-05-27 12:51 ` [PATCH v4 4/7] rust: io: use the `bitfield!` macro in `register!` Alexandre Courbot
2026-05-27 12:51 ` [PATCH v4 5/7] gpu: nova-core: switch to kernel bitfield macro Alexandre Courbot
2026-05-27 12:52 ` [PATCH v4 6/7] gpu: nova-core: remove the driver-local `bitfield!` macro Alexandre Courbot
2026-05-27 12:52 ` [PATCH v4 7/7] rust: bitfield: Add KUnit tests for bitfield Alexandre Courbot
2026-05-27 20:48 ` Yury Norov
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=20260527-bitfield-v4-3-e8821d4efbde@nvidia.com \
--to=acourbot@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.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=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--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=tmgross@umich.edu \
--cc=ttabi@nvidia.com \
--cc=yury.norov@gmail.com \
--cc=zhiw@nvidia.com \
/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