[PATCH] drm/amdkfd: fix comparison warning with min() macro

Felix Kuehling felix.kuehling at amd.com
Thu Mar 24 22:46:44 UTC 2022


Am 2022-03-24 um 17:31 schrieb Alex Deucher:
> Properly case to u32 to fix the warning.
>
> Fixes: 83f1287c57228f ("drm/amdkfd: Fix Incorrect VMIDs passed to HWS")
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

Reviewed-by: Felix Kuehling <Felix.Kuehling at amd.com>


> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_device.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> index d70f787369a0..62aa6c9d5123 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> @@ -484,7 +484,7 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
>   
>   	/* Verify module parameters regarding mapped process number*/
>   	if (hws_max_conc_proc >= 0)
> -		kfd->max_proc_per_quantum = min(hws_max_conc_proc, kfd->vm_info.vmid_num_kfd);
> +		kfd->max_proc_per_quantum = min((u32)hws_max_conc_proc, kfd->vm_info.vmid_num_kfd);
>   	else
>   		kfd->max_proc_per_quantum = kfd->vm_info.vmid_num_kfd;
>   


More information about the amd-gfx mailing list