RE: [PATCH] drm/amdkfd: Use true and false for boolean values
From: Russell, Kent
Date: Tue Aug 07 2018 - 06:27:08 EST
Thanks for that!
Reviewed-by: Kent Russell <kent.russell@xxxxxxx>
-----Original Message-----
From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Huang Rui
Sent: Tuesday, August 07, 2018 1:28 AM
To: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx>; Kuehling, Felix <Felix.Kuehling@xxxxxxx>
Cc: Oded Gabbay <oded.gabbay@xxxxxxxxx>; Zhou, David(ChunMing) <David1.Zhou@xxxxxxx>; David Airlie <airlied@xxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx; amd-gfx@xxxxxxxxxxxxxxxxxxxxx; dri-devel@xxxxxxxxxxxxxxxxxxxxx; Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Koenig, Christian <Christian.Koenig@xxxxxxx>
Subject: Re: [PATCH] drm/amdkfd: Use true and false for boolean values
On Sat, Aug 04, 2018 at 07:27:02PM -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>
Looks good for me.
Reviewed-by: Huang Rui <ray.huang@xxxxxxx>
Add Felix for his awareness.
> ---
> drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c
> b/drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c
> index 5d2475d..16af9d1 100644
> --- a/drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c
> +++ b/drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c
> @@ -62,12 +62,12 @@ static bool cik_event_interrupt_isr(struct kfd_dev *dev,
> vmid = (ihre->ring_id & 0x0000ff00) >> 8;
> 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 = (ihre->ring_id & 0xffff0000) >> 16;
> if (WARN_ONCE(pasid == 0, "FW bug: No PASID in KFD interrupt"))
> - return 0;
> + return false;
>
> /* Interrupt types we care about: various signals and faults.
> * They will be forwarded to a work queue (see below).
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx