* [PATCH] drm/amdkfd: Use true and false for boolean values @ 2018-08-05 0:27 Gustavo A. R. Silva 2018-08-07 5:28 ` Huang Rui 0 siblings, 1 reply; 3+ messages in thread From: Gustavo A. R. Silva @ 2018-08-05 0:27 UTC (permalink / raw) To: Oded Gabbay, Alex Deucher, Christian König, David (ChunMing) Zhou, David Airlie Cc: dri-devel, amd-gfx, linux-kernel, Gustavo A. R. Silva 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@embeddedor.com> --- 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdkfd: Use true and false for boolean values 2018-08-05 0:27 [PATCH] drm/amdkfd: Use true and false for boolean values Gustavo A. R. Silva @ 2018-08-07 5:28 ` Huang Rui 2018-08-07 10:27 ` Russell, Kent 0 siblings, 1 reply; 3+ messages in thread From: Huang Rui @ 2018-08-07 5:28 UTC (permalink / raw) To: Gustavo A. R. Silva, Felix Kuehling Cc: Oded Gabbay, Alex Deucher, Christian K�nig, David (ChunMing) Zhou, David Airlie, amd-gfx, dri-devel, linux-kernel 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@embeddedor.com> Looks good for me. Reviewed-by: Huang Rui <ray.huang@amd.com> 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@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] drm/amdkfd: Use true and false for boolean values 2018-08-07 5:28 ` Huang Rui @ 2018-08-07 10:27 ` Russell, Kent 0 siblings, 0 replies; 3+ messages in thread From: Russell, Kent @ 2018-08-07 10:27 UTC (permalink / raw) To: Huang, Ray, Gustavo A. R. Silva, Kuehling, Felix Cc: Oded Gabbay, Zhou, David(ChunMing), David Airlie, linux-kernel, amd-gfx, dri-devel, Deucher, Alexander, Koenig, Christian Thanks for that! Reviewed-by: Kent Russell <kent.russell@amd.com> -----Original Message----- From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Huang Rui Sent: Tuesday, August 07, 2018 1:28 AM To: Gustavo A. R. Silva <gustavo@embeddedor.com>; Kuehling, Felix <Felix.Kuehling@amd.com> Cc: Oded Gabbay <oded.gabbay@gmail.com>; Zhou, David(ChunMing) <David1.Zhou@amd.com>; David Airlie <airlied@linux.ie>; linux-kernel@vger.kernel.org; amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com> 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@embeddedor.com> Looks good for me. Reviewed-by: Huang Rui <ray.huang@amd.com> 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@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-07 10:27 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-08-05 0:27 [PATCH] drm/amdkfd: Use true and false for boolean values Gustavo A. R. Silva 2018-08-07 5:28 ` Huang Rui 2018-08-07 10:27 ` Russell, Kent
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome