Re: [PATCH 1/2] drm/amdgpu: fix kernel-doc in amdgpu_ualink.c

From: Alex Deucher

Date: Wed Nov 11 2026 - 11:27:31 EST


On Thu, Nov 5, 2026 at 9:11 AM Aryan Sinha <sinha.aryan03@xxxxxxxxx> wrote:
>
> The two comments do not describe what follows them. The one above
> amdgpu_ualink_npa_vm_unmap_range() is missing the ualink prefix, and the other one for amdgpu_ualink_gart_npa_addr() sits above two defines instead of the function, so kernel-doc attaches it to the first defined one.
>
> hence, Move the defines up and fix the name.
> The description also had a stray blank line splitting it in two and said dst_accid_id where it meant dst_accel_id, so join & fix it back up.
>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/r/202609241952.zFr1FYRB-lkp@xxxxxxxxx/
> Signed-off-by: Aryan Sinha <sinha.aryan03@xxxxxxxxx>

Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>
for patch 1. I'm skipping patch 2 because I find str_enable_disable()
harder to understand and just as long to write as the current code.

Thanks!

Alex

> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c | 17 +++++++----------
> 1 file changed, 7 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
> index 6cd3927a7..f875209e5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
> @@ -4631,7 +4631,7 @@ static int amdgpu_ualink_npa_vm_map_range(struct amdgpu_device *adev, struct amd
> }
>
> /**
> - * amdgpu_npa_vm_unmap_range - Unmap a range from the NPA VM
> + * amdgpu_ualink_npa_vm_unmap_range - Unmap a range from the NPA VM
> * @adev: amdgpu device pointer
> * @bo: buffer object backing the mapping
> * @pte_flags: page table entry flags
> @@ -4727,6 +4727,9 @@ static u64 amdgpu_ualink_npa_addr(struct amdgpu_device *adev, u32 type,
> return npa;
> }
>
> +#define AMDGPU_UALINK_GART_NPA_ADDR_GPUID_SHIFT 41
> +#define AMDGPU_UALINK_GART_NPA_ADDR_GPUID_MASK GENMASK_ULL(50, 41)
> +
> /**
> * amdgpu_ualink_gart_npa_addr - Get GART-mapped NPA address for ring buffer
> * @adev: amdgpu device pointer
> @@ -4734,18 +4737,12 @@ static u64 amdgpu_ualink_npa_addr(struct amdgpu_device *adev, u32 type,
> * @src_accel_id: Source accelerator ID
> * @dst_accel_id: Destination accelerator ID
> *
> - * Computes the NPA address suitable for GART mapping by adding dst_accid_id to
> - * NPA address to access remote by SDMA.
> -
> - * clears the source GPU ID bits from the NPA address which is set for
> - * address-identification mode.
> + * Computes the NPA address suitable for GART mapping by adding dst_accel_id to
> + * NPA address to access remote by SDMA. It also clears the source GPU ID bits
> + * from the NPA address which is set for address-identification mode.
> *
> * Return: NPA address adjusted for GART mapping
> */
> -
> -#define AMDGPU_UALINK_GART_NPA_ADDR_GPUID_SHIFT 41
> -#define AMDGPU_UALINK_GART_NPA_ADDR_GPUID_MASK GENMASK_ULL(50, 41)
> -
> static u64 amdgpu_ualink_gart_npa_addr(struct amdgpu_device *adev, u32 type,
> u32 src_accel_id, u32 dst_accel_id)
> {
> --
> 2.46.0
>