Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2458912pxb; Mon, 23 Aug 2021 22:54:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhDsAUYaeOfZCm1Xqo7QVLXJtW+Z7Br2ongYxA7eVVdZ2V4Sk3ewwOPT3ZTptMfJkjlI4G X-Received: by 2002:a17:906:fa10:: with SMTP id lo16mr10618266ejb.342.1629784493902; Mon, 23 Aug 2021 22:54:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629784493; cv=none; d=google.com; s=arc-20160816; b=W9I2aDHPIsqVkiY7NLC6ByYRvBKNoza9TBwLX5jgJUPpcdp+4GLq5e0a6OKxi1uVMh QwWitBblO1mm5ZATW09UDeScdqV5xXLgyF5eplRdKSrRtsKrRU4LDTbld9OJ0AUBU71H 8RMDWgj7k37ltBA2sgRZe1olJ97b+GG957vP5Ms+1HG/3J3/oHp+GCaqUxpLk1/FDGh/ +ubxzwWbumFbk4S4vo0dw4Snxe08u0gUJtX6NHcS5f/e2FeH03peuVVx2PuEMJWttmrJ K+fsCh0ymf1rTJo3MIIq74l53lj0amzW/pk7+MfTIovEWskfYvwfNj+Nn2uWS3a9xxpB s6zw== 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:dkim-signature; bh=aKoGOwtJBCz+YXwcucsOTN0b2bJIHpImilJMkwC9Tbs=; b=kB4nfTeyhXumbeNF2cTx7wlHPOwKxvcrC711DINrGuV+/VpEt246SUwhgYGDCqA1F9 Bu4j+c20UMMf7fS7mcEuWu1eoWgOUI//5BpHiikqogBO9fRC9MzSEexpGR97xFKuTLxl Smb7w/f1R708AsBE591pfPi95g/1wz4wULD0DTywyeZCsFyyL2YjLiNvi/DnUZTYlB5g q3GU8jbYjhb2UrhK+ntQmHXods1x7VftCgDl3vku/6RPSbDGMA8pj4pDHAYjWJDRrGOy jq4SCRcuEQ9q2Yeq2IpdA1SOi53TZD8uwBAGvlnuIUqLBqsP/QPY03b4LLigj7D6Jmn/ rYkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gLenX77a; 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 y2si16492453ejr.90.2021.08.23.22.54.29; Mon, 23 Aug 2021 22:54:53 -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=gLenX77a; 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 S230235AbhHXFxZ (ORCPT + 99 others); Tue, 24 Aug 2021 01:53:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229925AbhHXFxZ (ORCPT ); Tue, 24 Aug 2021 01:53:25 -0400 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ACACC061575 for ; Mon, 23 Aug 2021 22:52:41 -0700 (PDT) Received: by mail-qt1-x831.google.com with SMTP id u21so12903079qtw.8 for ; Mon, 23 Aug 2021 22:52:41 -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:mime-version :content-transfer-encoding; bh=aKoGOwtJBCz+YXwcucsOTN0b2bJIHpImilJMkwC9Tbs=; b=gLenX77aB/Q5UkP2JB1FOsPKOnSyJci46eOvlG69RwyJUXdA4oDt2TV10t3e9DgZKo BZfSfunPQI3TdPoDdp/XwTahlPEweI3EhSaYxY/SrPj8FmHF7SaOkx0ZhPZUR4YF6XPS JckTo3V0cFVN+PJYZ5Rudf8rXm2mHv1Yr9ZrNcXP7mNhOr0s19FMkqN2oCn28770nTqL yhd3pE0619o6R/ss2u9F94a0pjwO5SSFJs7icsWDiOamsPAzb/MygWPe9apghN/5s1PR uD0iiBgrADIKvCcrwhDQGBdlM8SRKGP+gJeZWp7DpkDCb1HQqfZtczXUxOB0kFe4Lezn zIfw== 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:mime-version :content-transfer-encoding; bh=aKoGOwtJBCz+YXwcucsOTN0b2bJIHpImilJMkwC9Tbs=; b=DUE0udB6HBUwX5rJ+JgCAZxRytqVr8zfDVjCP/xeMNYKUDDs5u4Nmej+UXIBfF5iBS 30UzNW8sdWL1zbPBZluLaRDOvY4NfaOfP+W77tmWxVMWOvUp/DOX50bxW8zDR3l5JFya 9SmpnSpuW0bVhrRUyGb/H2BxlwD6s07S5VV176cp+L7nsSHY9Z3st79nX5Z2Yu7IluX6 D+FsXSn41fw6ZYO3vL+ysxQmWgJHRf8mwnYCr66tdoPQitiurogbmr31/k2p9Ael3Uip DaL+KOUcOp4I9L17Nq3AacajDfLqSC7TBmRGNrlZMw+/8dmC5E9cFoCHVvUZ0xSaEECi NGow== X-Gm-Message-State: AOAM5316ZZEt+Vjn7+H4v1qpa4h+XlWJZzK5TQkd5ityIUZelJalRSiz Les9aHPLh5rH8j6EPs1GnP4= X-Received: by 2002:ac8:46cd:: with SMTP id h13mr33116824qto.369.1629784360771; Mon, 23 Aug 2021 22:52:40 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id u22sm10141603qkj.123.2021.08.23.22.52.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Aug 2021 22:52:40 -0700 (PDT) From: CGEL X-Google-Original-From: CGEL To: Harry Wentland Cc: Leo Li , Alex Deucher , David Airlie , Nicholas Kazlauskas , Huang Rui , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jing Yangyang , Zeal Robot Subject: [PATCH linux-next] drm:dcn31: fix boolreturn.cocci warnings Date: Mon, 23 Aug 2021 22:52:32 -0700 Message-Id: <20210824055232.58653-1-deng.changcheng@zte.com.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jing Yangyang ./drivers/gpu/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c:112:9-10:WARNING: return of 0/1 in function 'dcn31_is_panel_backlight_on' with return type bool ./drivers/gpu/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c:122:9-10:WARNING: return of 0/1 in function 'dcn31_is_panel_powered_on' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Reported-by: Zeal Robot Signed-off-by: Jing Yangyang --- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c b/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c index 7db268d..3b37213 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c +++ b/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c @@ -109,7 +109,7 @@ bool dcn31_is_panel_backlight_on(struct panel_cntl *panel_cntl) union dmub_rb_cmd cmd; if (!dcn31_query_backlight_info(panel_cntl, &cmd)) - return 0; + return false; return cmd.panel_cntl.data.is_backlight_on; } @@ -119,7 +119,7 @@ bool dcn31_is_panel_powered_on(struct panel_cntl *panel_cntl) union dmub_rb_cmd cmd; if (!dcn31_query_backlight_info(panel_cntl, &cmd)) - return 0; + return false; return cmd.panel_cntl.data.is_powered_on; } -- 1.8.3.1