mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
rust: io: register: dispatch shortcut rules internally
A couple of shortcut rules redispatch an already normalized declaration through the public register! entry point. This is unneeded - the public rule should only be invoked by users. Dispatch directly to the appropriate internal @reg rule instead. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Gary Guo <gary@garyguo.net> Link: https://patch.msgid.link/20260724-registers_fix-v2-1-a0fb58b02185@nvidia.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
parent
f2687db25d
commit
ebb314763f
|
|
@ -888,7 +888,8 @@ macro_rules! register {
|
|||
{ $($fields:tt)* }
|
||||
) => {
|
||||
$crate::register!(
|
||||
$(#[$attr])* $vis $name($storage) [ $size, stride = ::core::mem::size_of::<$storage>() ]
|
||||
@reg $(#[$attr])* $vis $name($storage)
|
||||
[ $size, stride = ::core::mem::size_of::<$storage>() ]
|
||||
@ $offset { $($fields)* }
|
||||
);
|
||||
};
|
||||
|
|
@ -932,7 +933,8 @@ macro_rules! register {
|
|||
@ $base:ident + $offset:literal { $($fields:tt)* }
|
||||
) => {
|
||||
$crate::register!(
|
||||
$(#[$attr])* $vis $name($storage) [ $size, stride = ::core::mem::size_of::<$storage>() ]
|
||||
@reg $(#[$attr])* $vis $name($storage)
|
||||
[ $size, stride = ::core::mem::size_of::<$storage>() ]
|
||||
@ $base + $offset { $($fields)* }
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user