lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 6 May 2022 12:04:20 -0400
From:   Alex Deucher <alexdeucher@...il.com>
To:     Yang Li <yang.lee@...ux.alibaba.com>
Cc:     "Deucher, Alexander" <alexander.deucher@....com>,
        Dave Airlie <airlied@...ux.ie>,
        "Kuehling, Felix" <Felix.Kuehling@....com>,
        xinhui pan <Xinhui.Pan@....com>,
        Abaci Robot <abaci@...ux.alibaba.com>,
        LKML <linux-kernel@...r.kernel.org>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        Maling list - DRI developers 
        <dri-devel@...ts.freedesktop.org>,
        Christian Koenig <christian.koenig@....com>
Subject: Re: [PATCH -next 2/2] drm/amdkfd: Return true/false (not 1/0) from
 bool functions

Series is:
Reviewed-by: Alex Deucher <alexander.deucher@....com>

On Thu, May 5, 2022 at 7:28 PM Yang Li <yang.lee@...ux.alibaba.com> wrote:
>
> Return boolean values ("true" or "false") instead of 1 or 0 from bool
> functions. This fixes the following warnings from coccicheck:
>
> ./drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c:244:9-10: WARNING:
> return of 0/1 in function 'event_interrupt_isr_v11' with return type
> bool
>
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> index c3919aaa76e6..1431f0961769 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> @@ -241,14 +241,14 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
>         if (/*!KFD_IRQ_IS_FENCE(client_id, source_id) &&*/
>             (vmid < dev->vm_info.first_vmid_kfd ||
>             vmid > dev->vm_info.last_vmid_kfd))
> -               return 0;
> +               return false;
>
>         pasid = SOC15_PASID_FROM_IH_ENTRY(ih_ring_entry);
>         context_id0 = SOC15_CONTEXT_ID0_FROM_IH_ENTRY(ih_ring_entry);
>
>         if ((source_id == SOC15_INTSRC_CP_END_OF_PIPE) &&
>             (context_id0 & AMDGPU_FENCE_MES_QUEUE_FLAG))
> -               return 0;
> +               return false;
>
>         pr_debug("client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw data:\n",
>                  client_id, source_id, vmid, pasid);
> @@ -258,7 +258,7 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
>
>         /* If there is no valid PASID, it's likely a bug */
>         if (WARN_ONCE(pasid == 0, "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.20.1.7.g153144c
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ