Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2852547ybk; Mon, 18 May 2020 09:27:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwS0LSqS8UIgPHziAuccaJfGu942G+aANkIPyaJvMLND3JO3j7CTWyciV0Uw1QLJ3BxGqqF X-Received: by 2002:a17:906:584e:: with SMTP id h14mr15268261ejs.257.1589819244950; Mon, 18 May 2020 09:27:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589819244; cv=none; d=google.com; s=arc-20160816; b=X5MKaK8Om5lIoqCKhgZo2h3QlyaxVkr+WpV5SkCPSKFgC5SMv7gbz8n/a/HX/DKT/V TN9pmdo2duPl/s+YiMMhQdh1YWI8Qu2A6fbVMvVwFsd6l4IVa9XxLAGckxw3AYjbq5pL Dk60zuQfNyxJlXHMgsh7SXqL3MoqJl+SQvddbB28fuPoL3ZmrDU/cZMT2KOB5/0eYyl+ IziKKI2aZENdI/IXuZX2ulY/bbf5Hh3rRZ4Sv0h8UAGV9uTmSv/6/lERKAHzHJHUIM67 6LGaftAXJuHtAjPvhS0GPV2ON+aqv4ytQV3OUUFWDvsvLkkMu9XRWWqhDM0RemrVZNXV aFGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=K211i4h2u/TxQcxsieD51LxexrJexjO9Rx1FtdNootg=; b=Ed0/+l4W99IR83G+CJrWtyrgl5HDDgQAB7PuqELNp1AckOrBOSbmn9uxwVVVOF6bI5 pU+F6HAoN/Q8KfdKSaMlFumhqzYIy77RYxTQDvqV91lsLxpMDftn/fFhIc1BjiijRRsd vesH3tcXJuj2Dh0FhnN1mhTUSY0ZFoc2Vsyax6RxZyx3AAVSuqDmoaMPwaE09Xquayfi qWc0S7VseBL0lrFbJB1oFb7w1c9c5gBAhKdqC+20K1bddxbEYI0fD9sbAOkKfYeD8HgE x0FiS6QavOw6BZXxBDL47qFXfN6mDZRikKdc9WBs2pWztBmO5+5v0EpaiwhoNm4g2GP4 0BOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZCxeUuua; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sd4si6641898ejb.221.2020.05.18.09.27.01; Mon, 18 May 2020 09:27:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZCxeUuua; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728463AbgERQXZ (ORCPT + 99 others); Mon, 18 May 2020 12:23:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727938AbgERQXY (ORCPT ); Mon, 18 May 2020 12:23:24 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DCF9C061A0C for ; Mon, 18 May 2020 09:23:23 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id t40so46199pjb.3 for ; Mon, 18 May 2020 09:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=K211i4h2u/TxQcxsieD51LxexrJexjO9Rx1FtdNootg=; b=ZCxeUuuaf+obk5I3yVMAoO21FuFn9ZnaajU4+BOQ99SaS5pj2jagOJ/JOGl+8RsUII rvwLVEZZIkzXNr6+b5GK8kBK5CwmCLz1LU0DPBurnFBaDT4RSxCswhVllgphaQG+aZjj p/NUv/ujcSx2sF8dexJN5AdeFuomxgou0IRwg3hXoLKBdK/NS2+wU/KFY8//Q1WbOVzx zSuZB4Bs5Z+jwykwSB4wAhMcLrvVt6iGZlNfPN/l6Rb1XTrVmBKIOUjCY/D2PWfPmFXt /PzfwEXc5tl2MfRF3y+kOyECmkL7fRukDwcF+Ii3mXydS4jRBqnvfcTtirZxzQWmQRCT 0uRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=K211i4h2u/TxQcxsieD51LxexrJexjO9Rx1FtdNootg=; b=Z3gfYKlW681vzUMJ78GNMQ9URF/Ltoruk+NtTo6FDFSRTfB06LOQFJD3gQcA2tXlRa XymJEhXUUUf3QnDrdNXtq5SV45Oxe9Vvv5dQ2jLAwy9TP2o1eQNR6VMWnqKftJaj2L0B +DLscpH4+XY7adh+obCbYBbWM4KRs/VtAW3aq5tpY+xTL5w/OZBHRONePLEdJWBQYZvk pDff3enVBM7dH5vihNU8mQkKx3Y0mfZBPK+iuaF/or0DuUTgXtBtJ7hNq974K6sGMzGd a4PEt7/qQJl+Gn3hgcPs15ncd9HJWksaFnfbVlH8e1hYWYh1ipenMORyV5CwIP7Fhdn5 EhZA== X-Gm-Message-State: AOAM531sjwA1GwSLkXnSKp0JIosldGi1U7S+YFDlw2ddktHxMpGw1pmk tNyGus4J0jOl63hDgWhUSCSbMPYvo94= X-Received: by 2002:a17:902:7587:: with SMTP id j7mr17207481pll.81.1589819002963; Mon, 18 May 2020 09:23:22 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:418:e389:7149:74ab:b584:ecf8]) by smtp.gmail.com with ESMTPSA id s63sm44882pjj.16.2020.05.18.09.23.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 09:23:22 -0700 (PDT) From: Aishwarya Ramakrishnan To: Felix Kuehling , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: aishwaryarj100@gmail.com Subject: [PATCH] drm/amdkfd: Fix boolreturn.cocci warnings Date: Mon, 18 May 2020 21:53:12 +0530 Message-Id: <20200518162312.18059-1-aishwaryarj100@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return statements in functions returning bool should use true/false instead of 1/0. drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c:40:9-10: WARNING: return of 0/1 in function 'event_interrupt_isr_v9' with return type bool Generated by: scripts/coccinelle/misc/boolreturn.cocci Signed-off-by: Aishwarya Ramakrishnan --- drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c index e05d75ecda21..fce6ccabe38b 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c @@ -37,7 +37,7 @@ static bool event_interrupt_isr_v9(struct kfd_dev *dev, vmid = SOC15_VMID_FROM_IH_ENTRY(ih_ring_entry); if (vmid < dev->vm_info.first_vmid_kfd || vmid > dev->vm_info.last_vmid_kfd) - return 0; + return false; source_id = SOC15_SOURCE_ID_FROM_IH_ENTRY(ih_ring_entry); client_id = SOC15_CLIENT_ID_FROM_IH_ENTRY(ih_ring_entry); @@ -69,7 +69,7 @@ static bool event_interrupt_isr_v9(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.17.1