drm/amdgpu: Update min() to min_t() in 'amdgpu_info_ioctl'
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Sun, 23 Jul 2023 06:59:14 +0000 (12:29 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Jul 2023 17:47:26 +0000 (13:47 -0400)
commita0cc8e1512ad72c9f97cdcb76d42715730adaf62
treeb24ade3dc4e93b130d48ac118e5adf569cc751d2
parentce83aa7bad8327830a1b907b4544e302ef09c2cf
drm/amdgpu: Update min() to min_t() in 'amdgpu_info_ioctl'

Fixes the following:

WARNING: min() should probably be min_t(size_t, size, sizeof(ip))
+               ret = copy_to_user(out, &ip, min((size_t)size, sizeof(ip)));

And other style fixes:

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
WARNING: Missing a blank line after declarations

Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c