Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3099511iob; Fri, 6 May 2022 18:47:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxH7WSKKCI7ghMBQZRqh2B2cUdk9p+cck2H7ttRsq6dAnJz4TrinkryX/423axsej30KiPG X-Received: by 2002:a17:906:5d09:b0:6f4:4407:a422 with SMTP id g9-20020a1709065d0900b006f44407a422mr5359957ejt.576.1651888048994; Fri, 06 May 2022 18:47:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651888048; cv=none; d=google.com; s=arc-20160816; b=vLYNqgaTySSKD9QLo4JfrQ5d595iAETpce0vIgVR6t0xl91yR/wZsQmiGYnjX/szFc QBgqGNnWG+D6eLtlLnu2GQtmU7wgGtu4YfEv0cANAQvfkdHR64EZFMdD9oVEK17osemB vbd/kx7X9LSJs5nFyOqtyouGfAEcLY3le9AtEWdLgj7I9JEcrDJsolMXf5PdRswOVidC 5jU2YJWVAHfW/wYZ23XjxXSH3bqNagWM8UUWlQUi5+i7Tj+XkCD4RFrsPpqmHPF3m9y3 pNEkQU+adLXI6OzJlN1iraSCC09g4LwSKdaHvCxpF0DWlkyfYlszrcIa+lg1OEFcTBic lcZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=7RM5jJBiRFwHYB34kMkeOR2uQWksQVdVdU9Cz28Ixng=; b=CHiWuvUC0nfc7oTgCvqMkY7VRJwPBl29TdVCJOO7ESyqdFLZ6EFt3tIssMyveHXvc/ kbFvIQSTtfAytyiLjJ8ktBNteQoknaUa0+Lp2iL5QtzxclwM6f5MVBcakXXgP/beCQCW BenUH6FSOvEzPJaaJ0efK3gBW2bvFOQosbRNdxicNe5jUsJS68J+Qjs59XofF6nrAfHP 7ZhBw7rlgsM8PBB9a+H5KfFe3PWhMgNY0ezj5ahKcxAkrmuduyC/8fWHmxR/RJCzBTDX /UjpbqXJLrsH1KpvZirbqpSABxbBLBkM0H+oNpfiuD8DeZtil9+Y1tcxh42B696PyXO3 +xVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lc17-20020a170906dff100b006f3ac80590dsi5417109ejc.526.2022.05.06.18.47.05; Fri, 06 May 2022 18:47:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386729AbiEEX1A (ORCPT + 99 others); Thu, 5 May 2022 19:27:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231941AbiEEX07 (ORCPT ); Thu, 5 May 2022 19:26:59 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7F2B606EE for ; Thu, 5 May 2022 16:23:17 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R301e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0VCP5hnC_1651792994; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VCP5hnC_1651792994) by smtp.aliyun-inc.com(127.0.0.1); Fri, 06 May 2022 07:23:14 +0800 From: Yang Li To: alexander.deucher@amd.com Cc: christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie, daniel@ffwll.ch, Felix.Kuehling@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next 2/2] drm/amdkfd: Return true/false (not 1/0) from bool functions Date: Fri, 6 May 2022 07:23:11 +0800 Message-Id: <20220505232312.129997-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham 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 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