Re: [PATCH] drm/amd/amdkfd/kfd_int_process_v9: Use true and false for boolean values

From: Huang Rui
Date: Tue Aug 07 2018 - 01:18:41 EST


On Sat, Aug 04, 2018 at 07:30:45PM -0500, Gustavo A. R. Silva wrote:
> Return statements in functions returning bool should use true or false
> instead of an integer value.
>
> This code was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx>

Reviewed-by: Huang Rui <ray.huang@xxxxxxx>

Also add Felix for his awareness.

Thanks,
Ray

> ---
> drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c
> index f836897..42e92e3 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c
> @@ -37,12 +37,12 @@ static bool event_interrupt_isr_v9(struct kfd_dev *dev,
> vmid = SOC15_VMID_FROM_IH_ENTRY(ih_ring_entry);
> if (vmid < dev->vm_info.first_vmid_kfd ||
> vmid > dev->vm_info.last_vmid_kfd)
> - return 0;
> + return false;
>
> /* If there is no valid PASID, it's likely a firmware bug */
> pasid = SOC15_PASID_FROM_IH_ENTRY(ih_ring_entry);
> if (WARN_ONCE(pasid == 0, "FW bug: No PASID in KFD interrupt"))
> - return 0;
> + return false;
>
> source_id = SOC15_SOURCE_ID_FROM_IH_ENTRY(ih_ring_entry);
> client_id = SOC15_CLIENT_ID_FROM_IH_ENTRY(ih_ring_entry);
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx