Skip to content

Commit 8d5fbb8

Browse files
GnurouDanilo Krummrich
authored andcommitted
gpu: nova-core: use absolute paths in register!() macro
Fix the paths that were not absolute to prevent a potential local module from being picked up. Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://lore.kernel.org/r/20250619-nova-frts-v6-6-ecf41ef99252@nvidia.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
1 parent 06a9319 commit 8d5fbb8

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/gpu/nova-core/regs/macros.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ macro_rules! register {
114114
}
115115
}
116116

117-
impl core::ops::BitOr for $name {
117+
impl ::core::ops::BitOr for $name {
118118
type Output = Self;
119119

120120
fn bitor(self, rhs: Self) -> Self::Output {
@@ -161,7 +161,7 @@ macro_rules! register {
161161
(@check_field_bounds $hi:tt:$lo:tt $field:ident as bool) => {
162162
#[allow(clippy::eq_op)]
163163
const _: () = {
164-
kernel::build_assert!(
164+
::kernel::build_assert!(
165165
$hi == $lo,
166166
concat!("boolean field `", stringify!($field), "` covers more than one bit")
167167
);
@@ -172,7 +172,7 @@ macro_rules! register {
172172
(@check_field_bounds $hi:tt:$lo:tt $field:ident as $type:tt) => {
173173
#[allow(clippy::eq_op)]
174174
const _: () = {
175-
kernel::build_assert!(
175+
::kernel::build_assert!(
176176
$hi >= $lo,
177177
concat!("field `", stringify!($field), "`'s MSB is smaller than its LSB")
178178
);
@@ -234,7 +234,7 @@ macro_rules! register {
234234
@leaf_accessor $name:ident $hi:tt:$lo:tt $field:ident as $type:ty
235235
{ $process:expr } $to_type:ty => $res_type:ty $(, $comment:literal)?;
236236
) => {
237-
kernel::macros::paste!(
237+
::kernel::macros::paste!(
238238
const [<$field:upper>]: ::core::ops::RangeInclusive<u8> = $lo..=$hi;
239239
const [<$field:upper _MASK>]: u32 = ((((1 << $hi) - 1) << 1) + 1) - ((1 << $lo) - 1);
240240
const [<$field:upper _SHIFT>]: u32 = Self::[<$field:upper _MASK>].trailing_zeros();
@@ -246,7 +246,7 @@ macro_rules! register {
246246
)?
247247
#[inline]
248248
pub(crate) fn $field(self) -> $res_type {
249-
kernel::macros::paste!(
249+
::kernel::macros::paste!(
250250
const MASK: u32 = $name::[<$field:upper _MASK>];
251251
const SHIFT: u32 = $name::[<$field:upper _SHIFT>];
252252
);
@@ -255,7 +255,7 @@ macro_rules! register {
255255
$process(field)
256256
}
257257

258-
kernel::macros::paste!(
258+
::kernel::macros::paste!(
259259
$(
260260
#[doc="Sets the value of this field:"]
261261
#[doc=$comment]

0 commit comments

Comments
 (0)