Skip to content

Commit 1761d9a

Browse files
amd-jherichuangalexdeucher
authored andcommitted
amd/amdkfd: remove unused parameter
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>
1 parent b485b89 commit 1761d9a

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ int amdgpu_amdkfd_gpuvm_map_gtt_bo_to_kernel(struct kgd_mem *mem,
320320
void **kptr, uint64_t *size);
321321
void amdgpu_amdkfd_gpuvm_unmap_gtt_bo_from_kernel(struct kgd_mem *mem);
322322

323-
int amdgpu_amdkfd_map_gtt_bo_to_gart(struct amdgpu_device *adev, struct amdgpu_bo *bo);
323+
int amdgpu_amdkfd_map_gtt_bo_to_gart(struct amdgpu_bo *bo);
324324

325325
int amdgpu_amdkfd_gpuvm_restore_process_bos(void *process_info,
326326
struct dma_fence __rcu **ef);

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2189,13 +2189,12 @@ int amdgpu_amdkfd_gpuvm_sync_memory(
21892189

21902190
/**
21912191
* amdgpu_amdkfd_map_gtt_bo_to_gart - Map BO to GART and increment reference count
2192-
* @adev: Device to which allocated BO belongs
21932192
* @bo: Buffer object to be mapped
21942193
*
21952194
* Before return, bo reference count is incremented. To release the reference and unpin/
21962195
* unmap the BO, call amdgpu_amdkfd_free_gtt_mem.
21972196
*/
2198-
int amdgpu_amdkfd_map_gtt_bo_to_gart(struct amdgpu_device *adev, struct amdgpu_bo *bo)
2197+
int amdgpu_amdkfd_map_gtt_bo_to_gart(struct amdgpu_bo *bo)
21992198
{
22002199
int ret;
22012200

drivers/gpu/drm/amd/amdkfd/kfd_chardev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ static int kfd_ioctl_create_queue(struct file *filep, struct kfd_process *p,
371371
goto err_wptr_map_gart;
372372
}
373373

374-
err = amdgpu_amdkfd_map_gtt_bo_to_gart(dev->adev, wptr_bo);
374+
err = amdgpu_amdkfd_map_gtt_bo_to_gart(wptr_bo);
375375
if (err) {
376376
pr_err("Failed to map wptr bo to GART\n");
377377
goto err_wptr_map_gart;

0 commit comments

Comments
 (0)