From: sashiko-bot@kernel.org
To: "Alexandre Courbot" <acourbot@nvidia.com>
Cc: ojeda@kernel.org, "Danilo Krummrich" <dakr@kernel.org>,
dri-devel@lists.freedesktop.org,
"Alexandre Courbot" <acourbot@nvidia.com>
Subject: Re: [PATCH 3/8] rust: io: register: use path fragment for alias destination
Date: Tue, 21 Jul 2026 11:07:56 +0000 [thread overview]
Message-ID: <20260721110757.229381F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260721-registers_fix-v1-3-3711b2317e1f@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Incomplete macro parser update preventing the use of qualified paths for fixed and indexed alias destinations.
--
--- Patch [3]: [PATCH 3/8] rust: io: register: use path fragment for alias destination ---
commit 2d0652e05a1a9983e77fe52bcfa5cbaeead4c274
Author: Alexandre Courbot <acourbot@nvidia.com>
rust: io: register: use path fragment for alias destination
This commit updates the register! macro to use a path fragment instead of
ident for alias destinations. This aims to allow referencing registers using
a qualified path instead of only identifiers visible from the current module.
> diff --git a/rust/kernel/io/register.rs b/rust/kernel/io/register.rs
> index 82f674aea45a2..1e0e23e4233fa 100644
> --- a/rust/kernel/io/register.rs
> +++ b/rust/kernel/io/register.rs
> @@ -809,7 +809,7 @@ macro_rules! register {
> $(#[$attr:meta])* $vis:vis $name:ident ($storage:ty)
> $([ $size:expr $(, stride = $stride:expr)? ])?
> $(@ $($base:ident +)? $offset:literal)?
> - $(=> $alias:ident $(+ $alias_offset:ident)? $([$alias_idx:expr])? )?
> + $(=> $alias:ident $(+ $alias_offset:path)? $([$alias_idx:expr])? )?
[Severity: Medium]
Does this top-level rule unintentionally restrict fixed and indexed aliases?
While the inner @reg rules were updated to use $alias:path, this main parsing
rule still captures $alias as an ident. Because of this, it appears that
using a qualified path (like => module::ALIAS) for fixed or indexed aliases
will fail to match here and result in a compilation error.
Should $alias:ident also be changed to $alias:path in this top-level
match pattern so that fixed and indexed aliases can fully benefit from this
update?
> { $($fields:tt)* }
> )*
> ) => {
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260721-registers_fix-v1-0-3711b2317e1f@nvidia.com?part=3
next prev parent reply other threads:[~2026-07-21 11:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 11:00 [PATCH 0/8] rust: io: register: allow paths for relative register bases Alexandre Courbot
2026-07-21 11:00 ` [PATCH 1/8] rust: io: register: dispatch fixed array shortcut internally Alexandre Courbot
2026-07-21 14:17 ` Gary Guo
2026-07-21 14:24 ` Gary Guo
2026-07-21 11:00 ` [PATCH 2/8] rust: io: register: remove unused rule arguments Alexandre Courbot
2026-07-21 11:00 ` [PATCH 3/8] rust: io: register: use path fragment for alias destination Alexandre Courbot
2026-07-21 11:07 ` sashiko-bot [this message]
2026-07-21 11:00 ` [PATCH 4/8] rust: io: register: use path fragment in relative internal rules Alexandre Courbot
2026-07-21 11:41 ` Alexandre Courbot
2026-07-21 11:00 ` [PATCH 5/8] rust: io: register: allow paths for relative register bases Alexandre Courbot
2026-07-21 11:14 ` sashiko-bot
2026-07-21 11:00 ` [PATCH 6/8] rust: io: register: use new relative base syntax in doc and examples Alexandre Courbot
2026-07-21 11:40 ` sashiko-bot
2026-07-21 11:00 ` [PATCH 7/8] gpu: nova-core: convert relative registers to new syntax Alexandre Courbot
2026-07-21 11:00 ` [PATCH 8/8] rust: io: register: remove deprecated relative register rule Alexandre Courbot
2026-07-21 14:34 ` [PATCH 0/8] rust: io: register: allow paths for relative register bases Gary Guo
2026-07-21 15:02 ` Alexandre Courbot
2026-07-21 15:06 ` Gary Guo
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=20260721110757.229381F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=acourbot@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.