Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Abaci Robot <abaci@linux.alibaba.com>
Reviewed-by: Amos Kong <kongjianjun@gmail.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Yang Li and committed by
Alex Deucher
0de5472a 335aea75

+1 -2
+1 -2
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
··· 901 901 902 902 /* Disable SVM support capability */ 903 903 pgmap->type = 0; 904 - devm_release_mem_region(adev->dev, res->start, 905 - res->end - res->start + 1); 904 + devm_release_mem_region(adev->dev, res->start, resource_size(res)); 906 905 return PTR_ERR(r); 907 906 } 908 907