Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4642058iob; Sun, 8 May 2022 20:18:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZmVlfNF2vrcs7R8C0NROTukXaBDPcSlX5XlXwAJ3GNWAYIrvyeTMx564V/VWGTrxN1E7s X-Received: by 2002:aa7:8757:0:b0:50d:48a9:f021 with SMTP id g23-20020aa78757000000b0050d48a9f021mr14042946pfo.24.1652066308841; Sun, 08 May 2022 20:18:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652066308; cv=none; d=google.com; s=arc-20160816; b=mXgk5Dg3mAlddcnpCLIyMz3LqoYZJRk+WUREtR9FA62Jm0Np9TbWAu1Q9Gut7kVZKR 7dM7/y3vhgrhwToRA3zGub9HbC1/Nvfz9nSqqMptpe1rrewb7F0PuUR51kLfTyBu2EJg xqFgpXvuq+bAz0iOyZD4Kl77j8FflP5+rYlHsQ0a7mlH9idBu05x5DXHqwxjKEoQhkp8 v5hewtX8XybrbnocsnCWYprItO4NPF9VH0VkMP0tQ/yrJkVuJ75Lf0fATV8sEZMG8XL1 ZTo+doeeRnvmYrROmWBsMbvJsmnD+D9BZAlrNhUSqGWc+aF2KcRGIfUyQ3EHTTRgOnID K3Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=WFYD1jtv4MA5LyJp0wwZQbqa5q7DVbRBltnx1dOLS0M=; b=sFB6UBAEUGIdCMy/JTBIwj4OXV3D+lCnGMNXCfv2mE9J5bXPqnPh1HwgoDhP6OBVZN P1STSMVIquagMZYKq+UuJP7EF6HL0gcskKMkxBy31hpleBpQAXxiwV+HWIusvGWUP189 rD7voPXHKBKKZ7f7txFAYOJDHTr+EQ0T8N3gMwUm4dwsUPL7Ift3NCd+33ry17yB6urT V/rPS8k+0QRpLATAc9Xkke0W6Pj/h66ypiR33o+LJ002Pfdtc3ampstnD4XCUN1ittoY u1Be+AUBuoUbf1tU3vRtQQvAyvWBiCZBA/rKpG2BtKuLBlqnrZ8HGcD6PYPWuRBJpvgz t0TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Q6GMzu3y; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id om3-20020a17090b3a8300b001d2ab074879si19766661pjb.4.2022.05.08.20.18.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 20:18:28 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Q6GMzu3y; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5DA5C9548F; Sun, 8 May 2022 20:17:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443443AbiEFQKG (ORCPT + 99 others); Fri, 6 May 2022 12:10:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443431AbiEFQJt (ORCPT ); Fri, 6 May 2022 12:09:49 -0400 Received: from mail-oa1-x31.google.com (mail-oa1-x31.google.com [IPv6:2001:4860:4864:20::31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBF04A1A2 for ; Fri, 6 May 2022 09:06:05 -0700 (PDT) Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-e2fa360f6dso7649235fac.2 for ; Fri, 06 May 2022 09:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WFYD1jtv4MA5LyJp0wwZQbqa5q7DVbRBltnx1dOLS0M=; b=Q6GMzu3yDKdD2l/P8Rj2/FCcd55ZuvN3ETDxp95fGf5PnnibB7rU7MdAqR3pJEsY34 Stq5PX6X1kOx7lFSw9rlnYzyckX8AwFbICA/qsXLSs4Syq+pSKgozjQ6sIUyRRRvYBCa Iydt5yoDndp07Zaq1Ssi7Qqp0rEgAbcLQBBV7U+vQzPov2FT7WtfyRRshbYLwQAUdSo8 bntFfRgRXuhSdRouyAvEc1OvC0tZuveq3ymvxMrclsCkCweBUNeFFsnaMe5w58rgk48a AW5DxTTTG4RLz4NtblJ1swjwJakzDOId13RF3nDL2c1We7HqeRLOlMVx5RePupkAtTAz AkOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WFYD1jtv4MA5LyJp0wwZQbqa5q7DVbRBltnx1dOLS0M=; b=VbLV1uRHq6tERlOAiUnXnPbx18Sv2qutWrfbPTkm2egtF0Kl2FXRhx0T6rhCS6v9vR wfvMskxYvpjEweq9RL/isMFCK+EPcCcbne8PmG6PTQAoGU1d2Lb21zs8MAmw+BzeuLPc w+oso9o9JaGtsAOu/i7RHgWwvarXmnk7cNPgJ4oJ+r4fmp5Z+JIfI4w7Qjfe5cl2AtCe lhVPogF3RzpMGLZo7JiiplTYqVyWfUP2VRZWHUcvumgfKYTsYMnFFJtGU5TTsFdshR4Y G4L6gPXMFFH7WPZpeRGv5y+mANQIC9Lo8kN8Z9ktc7YSdGlrcUh898mwqDIk5eRqy0k2 zg3w== X-Gm-Message-State: AOAM5300yfPHjJMC0JIprc2YWkRQ6QJ+nZGm9WjzUoPCpl2nLrZnx7Qo 2rLQ8kiWC2xLOeC0lorNQqmwx1dIER0SLgLgE5g= X-Received: by 2002:a05:6870:d683:b0:de:eaa2:3550 with SMTP id z3-20020a056870d68300b000deeaa23550mr1649641oap.253.1651853165161; Fri, 06 May 2022 09:06:05 -0700 (PDT) MIME-Version: 1.0 References: <1651802677-10154-1-git-send-email-baihaowen@meizu.com> In-Reply-To: <1651802677-10154-1-git-send-email-baihaowen@meizu.com> From: Alex Deucher Date: Fri, 6 May 2022 12:05:54 -0400 Message-ID: Subject: Re: [PATCH] drm/amdkfd: Return true/false (not 1/0) from bool functions To: Haowen Bai Cc: Felix Kuehling , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Maling list - DRI developers , amd-gfx list , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 5, 2022 at 10:05 PM Haowen Bai wrote: > > Return boolean values ("true" or "false") instead of 1 or 0 from bool > functions. > > Signed-off-by: Haowen Bai Thanks, I just applied the same fix from someone else. Alex > --- > 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.7.4 >