amd/amdkfd: remove unused parameter
authorEric Huang <jinhuieric.huang@amd.com>
Wed, 28 Feb 2024 14:59:26 +0000 (09:59 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 28 Feb 2024 22:10:53 +0000 (17:10 -0500)
The adev can be found from bo by amdgpu_ttm_adev(bo->tbo.bdev),
and adev is also not used in the function
amdgpu_amdkfd_map_gtt_bo_to_gart().

Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c

index 4fb32d86cd0e98efa5ad3ed7af861a56bb0e105a..0ef223c2affb6174a36d4d1e96dcbc017fcb51e2 100644 (file)
@@ -320,7 +320,7 @@ int amdgpu_amdkfd_gpuvm_map_gtt_bo_to_kernel(struct kgd_mem *mem,
                                             void **kptr, uint64_t *size);
 void amdgpu_amdkfd_gpuvm_unmap_gtt_bo_from_kernel(struct kgd_mem *mem);
 
-int amdgpu_amdkfd_map_gtt_bo_to_gart(struct amdgpu_device *adev, struct amdgpu_bo *bo);
+int amdgpu_amdkfd_map_gtt_bo_to_gart(struct amdgpu_bo *bo);
 
 int amdgpu_amdkfd_gpuvm_restore_process_bos(void *process_info,
                                            struct dma_fence __rcu **ef);
index 5cd84f72bf26ef5a6896f7ea853c654b55e8569d..14dc9d2d8d53ad0e4085fb137b42d9b2967f3b33 100644 (file)
@@ -2189,13 +2189,12 @@ int amdgpu_amdkfd_gpuvm_sync_memory(
 
 /**
  * amdgpu_amdkfd_map_gtt_bo_to_gart - Map BO to GART and increment reference count
- * @adev: Device to which allocated BO belongs
  * @bo: Buffer object to be mapped
  *
  * Before return, bo reference count is incremented. To release the reference and unpin/
  * unmap the BO, call amdgpu_amdkfd_free_gtt_mem.
  */
-int amdgpu_amdkfd_map_gtt_bo_to_gart(struct amdgpu_device *adev, struct amdgpu_bo *bo)
+int amdgpu_amdkfd_map_gtt_bo_to_gart(struct amdgpu_bo *bo)
 {
        int ret;
 
index 824e660283b2add23effa0fb102fe235fc0bd747..f030cafc5a0aea5f8c5eb7a05f659083a9e2638e 100644 (file)
@@ -371,7 +371,7 @@ static int kfd_ioctl_create_queue(struct file *filep, struct kfd_process *p,
                        goto err_wptr_map_gart;
                }
 
-               err = amdgpu_amdkfd_map_gtt_bo_to_gart(dev->adev, wptr_bo);
+               err = amdgpu_amdkfd_map_gtt_bo_to_gart(wptr_bo);
                if (err) {
                        pr_err("Failed to map wptr bo to GART\n");
                        goto err_wptr_map_gart;