[PATCH] drm/amdgpu: fix compile warning in amdgpu_kms.c

Christian König deathsimple at vodafone.de
Mon Jan 2 10:19:17 UTC 2017


Am 02.01.2017 um 10:23 schrieb Rex Zhu:
> warning:
> comparison of distinct pointer types lacks a cast
>   min((size_t)size, bios_size - bios_offset))
>
> Change-Id: Ib77eac5b15d09d169d2e95cff7608b395fb0f64c
> Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>.

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index 3273d8c..47bc8e1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -561,7 +561,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
>   
>   			bios = adev->bios + bios_offset;
>   			return copy_to_user(out, bios,
> -				min((size_t)size, bios_size - bios_offset))
> +				min(size, bios_size - bios_offset))
>   					? -EFAULT : 0;
>   		}
>   		default:




More information about the amd-gfx mailing list