Commit 8d5fbb8d authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Danilo Krummrich
Browse files

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: default avatarLyude Paul <lyude@redhat.com>
Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Link: https://lore.kernel.org/r/20250619-nova-frts-v6-6-ecf41ef99252@nvidia.com


Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
parent 06a93197
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
            }
        }

        impl core::ops::BitOr for $name {
        impl ::core::ops::BitOr for $name {
            type Output = Self;

            fn bitor(self, rhs: Self) -> Self::Output {
@@ -161,7 +161,7 @@ impl $name {
    (@check_field_bounds $hi:tt:$lo:tt $field:ident as bool) => {
        #[allow(clippy::eq_op)]
        const _: () = {
            kernel::build_assert!(
            ::kernel::build_assert!(
                $hi == $lo,
                concat!("boolean field `", stringify!($field), "` covers more than one bit")
            );
@@ -172,7 +172,7 @@ impl $name {
    (@check_field_bounds $hi:tt:$lo:tt $field:ident as $type:tt) => {
        #[allow(clippy::eq_op)]
        const _: () = {
            kernel::build_assert!(
            ::kernel::build_assert!(
                $hi >= $lo,
                concat!("field `", stringify!($field), "`'s MSB is smaller than its LSB")
            );
@@ -234,7 +234,7 @@ impl $name {
        @leaf_accessor $name:ident $hi:tt:$lo:tt $field:ident as $type:ty
            { $process:expr } $to_type:ty => $res_type:ty $(, $comment:literal)?;
    ) => {
        kernel::macros::paste!(
        ::kernel::macros::paste!(
        const [<$field:upper>]: ::core::ops::RangeInclusive<u8> = $lo..=$hi;
        const [<$field:upper _MASK>]: u32 = ((((1 << $hi) - 1) << 1) + 1) - ((1 << $lo) - 1);
        const [<$field:upper _SHIFT>]: u32 = Self::[<$field:upper _MASK>].trailing_zeros();
@@ -246,7 +246,7 @@ impl $name {
        )?
        #[inline]
        pub(crate) fn $field(self) -> $res_type {
            kernel::macros::paste!(
            ::kernel::macros::paste!(
            const MASK: u32 = $name::[<$field:upper _MASK>];
            const SHIFT: u32 = $name::[<$field:upper _SHIFT>];
            );
@@ -255,7 +255,7 @@ pub(crate) fn $field(self) -> $res_type {
            $process(field)
        }

        kernel::macros::paste!(
        ::kernel::macros::paste!(
        $(
        #[doc="Sets the value of this field:"]
        #[doc=$comment]