Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4675763iob; Sun, 8 May 2022 21:34:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2veexkvQUklhLIA7zPdlvjNrrkfyGriQt0zbKJzNWTDB1KKI5UWYXN9OrdunhsSfl6JhG X-Received: by 2002:a17:902:ec88:b0:15e:c17d:b092 with SMTP id x8-20020a170902ec8800b0015ec17db092mr14722725plg.88.1652070886618; Sun, 08 May 2022 21:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652070886; cv=none; d=google.com; s=arc-20160816; b=MNljuo9/MxWxvEhiX0biA3RZHcBJ09N6eP0C8NdlIMW2ujyz4J1t6RDdBw69BYp3tO W67e/6hy+5vgVbK0khdwykFqWywJx+KChHhUfOsVZduA82OM/YFJLKy+5hsQ3zbtQ/MY /6UX5BqAdkk0vaj2C4rdrdFH+9Z/Vhfp+/1yr4h9rHGxeteCv4WoTy4PexGSc7/9kKqd 5YfM/fiLfaAjzbuCLBdzNcdwTpSx0q/1CW0dcpO6UH6Dki+dJ+vVzO29AtyO/CV+XCv+ fp9d3/ghO4HG0GcwUzrsMl20ivEzpqjddpitzIpFOPIG7C5V5QdMfcmVhytgKy5z99FB Q+2A== 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=40/a2HKQQMurNLA4xNO+qLKuyGWRwnq4jg7SfIv0kwE=; b=rRSULEVTc5wW1+u3xPeva+PR7QN6R1jd/U5WJJNk4qP9zzK61qBwj9wbLzsRe6qN3U fRVLhIC7btOoTGwCK8KHv23MvYw9cvc89IfXoc7UoWN9GlxQKYLhSLlX++nqDKPQXEOQ D7i6+8hy28g1+L88I9tCs/lZSVPRRBT1IWQZa+eN7POYWPky6Nq2pGEaBYw1qqUXASmH iQELzUfjHTX+vQyrGgIT5F8ta8DX0hlZvGNDL6KzBLDR3mG9sLfqb/KGc4cmqGXkRoe0 5awizX1DJMu6QOEBe3BbD1q8YEGdPH+J0X2Pb+q3i/aamnqMpjH6Y2qcK8eRLvdz0rDW X9Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AL5j6Arh; 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 v191-20020a6389c8000000b003c5e4c2f727si12510426pgd.521.2022.05.08.21.34.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 21:34:46 -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=AL5j6Arh; 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 F0F3711990F; Sun, 8 May 2022 21:34:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443403AbiEFQJn (ORCPT + 99 others); Fri, 6 May 2022 12:09:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443508AbiEFQJG (ORCPT ); Fri, 6 May 2022 12:09:06 -0400 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 571C56EB25 for ; Fri, 6 May 2022 09:04:43 -0700 (PDT) Received: by mail-oi1-x233.google.com with SMTP id n24so7921367oie.12 for ; Fri, 06 May 2022 09:04:43 -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=40/a2HKQQMurNLA4xNO+qLKuyGWRwnq4jg7SfIv0kwE=; b=AL5j6ArhMileBaHRS5KPVGutmKZfOu6EjnO+4RG6jiKVHROSEQfMtt2YIjNKy5Ucce b1c4q5q2v+fcdvSUiekIJFT9Fu1ZdgP/EYzorv9bfnUpb5+KVONU8X8jUWlSjCvx6S9Q hk29JpShWmfG/A67hcgFt7ch03WvA45djO8a1Jkf9cZarY1w1X1Qyqach0LuX92EsqeE ITkn2zmWptxwtXd7Ta3jX9MBBvQzpJQYQQXVpQfWDs0O4snobmiRjsWDEsC6px6gejbF VpLCjkg3JRl6Uty/77xCyB6NFIrbylBCuSxEpZMbElvkOu4iCR856r1xogNdL6fb6D3l PKBQ== 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=40/a2HKQQMurNLA4xNO+qLKuyGWRwnq4jg7SfIv0kwE=; b=tTqnQg7HjJOsXtVOaRbXd3Kcdm98H+Ey5LRi22yroZGle3VHmJCsKpZL/zmPwpp7R1 k/qo87DIwC0mcrLcuzm9/0n1JFfxTD+pge3Kol1wFrWKqTfQf8YCyQYUWZq4arHqa33f tHlWp24xAfUlxB4q2V4quxKFfJL6z+7+o7NOIX0+abazoiuqFNf4OCQSHXCWdvUlIvHx SgVaL2BIUcVHsIo2Cf87nR20RiBFz7ogMW5tICnIdga/X4CYfSBLTL5IbrOh9WRW8QM8 7bPP6PgbOxcMdSGMR03XVvNbIQrNlhOx0iuy7XJyPAVZyVuh+P8lkp8xs0XIOtchPEi7 0D1A== X-Gm-Message-State: AOAM532JgJkyVO5kGU4+EZMWddPytxN4h/lhGxd6P7gAhbxFektTDPHo QdjQDK8QkYQ5almeLUac8bnQo8R6+hho77g4Mio= X-Received: by 2002:a05:6808:f8d:b0:325:1e81:ffe5 with SMTP id o13-20020a0568080f8d00b003251e81ffe5mr1801284oiw.253.1651853082632; Fri, 06 May 2022 09:04:42 -0700 (PDT) MIME-Version: 1.0 References: <20220505232312.129997-1-yang.lee@linux.alibaba.com> In-Reply-To: From: Alex Deucher Date: Fri, 6 May 2022 12:04:31 -0400 Message-ID: Subject: Re: [PATCH -next 2/2] drm/amdkfd: Return true/false (not 1/0) from bool functions To: Yang Li Cc: "Deucher, Alexander" , Dave Airlie , "Kuehling, Felix" , xinhui pan , Abaci Robot , LKML , amd-gfx list , Maling list - DRI developers , Christian Koenig 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 Applied. Thanks! On Fri, May 6, 2022 at 12:04 PM Alex Deucher wrote: > > Series is: > Reviewed-by: Alex Deucher > > On Thu, May 5, 2022 at 7:28 PM Yang Li 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 > > Signed-off-by: Yang Li > > --- > > 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 > >