Commit 0de5472a authored by Yang Li's avatar Yang Li Committed by Alex Deucher

drm/amdkfd: fix resource_size.cocci warnings

Use resource_size function on resource object
instead of explicit computation.

Clean up coccicheck warning:
./drivers/gpu/drm/amd/amdkfd/kfd_migrate.c:905:10-13: ERROR: Missing
resource_size with res
Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Reviewed-by: default avatarAmos Kong <kongjianjun@gmail.com>
Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 335aea75
...@@ -901,8 +901,7 @@ int svm_migrate_init(struct amdgpu_device *adev) ...@@ -901,8 +901,7 @@ int svm_migrate_init(struct amdgpu_device *adev)
/* Disable SVM support capability */ /* Disable SVM support capability */
pgmap->type = 0; pgmap->type = 0;
devm_release_mem_region(adev->dev, res->start, devm_release_mem_region(adev->dev, res->start, resource_size(res));
res->end - res->start + 1);
return PTR_ERR(r); return PTR_ERR(r);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment