Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp737755pxb; Thu, 26 Aug 2021 13:26:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwp5AsKM8kuKH6Im8b0TXpQLKhFK0/7V1SiS8PMdItO89dowDUdrC412YzlXb4vaDaDUgvx X-Received: by 2002:a05:6638:3805:: with SMTP id i5mr5045202jav.72.1630009589242; Thu, 26 Aug 2021 13:26:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630009589; cv=none; d=google.com; s=arc-20160816; b=m9uk9uwqm/jIYeEIkPjcbRCgXMwVDn+xXJxlRAV3CWzp65hTY5nDcF5p29aIorwywI lwxj/ERICZIenmgcB5BsUpeBzKeIV6R5pSUwLnzxrE4ZdyPOtDjULf1RkHNd4jSmB/O+ Tgrf4L3Rcwerq8j1EkeCmWWgQLd7WdgkHN882fFeTXlZOl+92xj1aRRtIvndUhaoylhs FtIng/0RpQwY8BRd9K/SJuWJPZg1iwM8Oy6MbYFNGrhffFuYQCFkbfKZ1cXt51uOUEAI 5ZQgRFaKVp4YXAPeDWaRTEvUwr1lNsf7kc4YcqvgRIxGhAqBlFc5GMjBP3aEsqOOm1oV GRPg== 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=+OwUj+s0HNattd+5fUEdf8kL9KlZKYth38XeOI86GBM=; b=rM3CBUCdoc/5L+G/aBdCaJ/hW2PuCbP99BUG+SviehCVYtfZKTMgAQ0+b4s09+voBm poWFBLtaxwP/+sV6rFynnZ6GAi5IKqBoLMrrB6lHT0w0t1yZ7PD59xN9LLcBWzJLra9l w8fuGlPq7Nt+mrp645xsrJJjpwiPRA3QIVkSklma424BjDxvWeryXhJY7sYR+6clqWVV qgfqkAN2PNEJW/dmaeXXBcKhq+Y/ne10j8NTHm4xP9X2uj3usemYMurEYmBx2lEMDaIk KHeGAyhkhV+a3A+RDo9muN9sIKUtvYwOktKvcclieIXZZCzqV03sBZMyNd7SLCGnilUe t7GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GvOiYGTx; 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 t10si4286647ilu.150.2021.08.26.13.26.17; Thu, 26 Aug 2021 13:26:29 -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=GvOiYGTx; 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 S232494AbhHZU0Y (ORCPT + 99 others); Thu, 26 Aug 2021 16:26:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229916AbhHZU0X (ORCPT ); Thu, 26 Aug 2021 16:26:23 -0400 Received: from mail-ot1-x32f.google.com (mail-ot1-x32f.google.com [IPv6:2607:f8b0:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E01BDC061757 for ; Thu, 26 Aug 2021 13:25:35 -0700 (PDT) Received: by mail-ot1-x32f.google.com with SMTP id v33-20020a0568300921b0290517cd06302dso5096393ott.13 for ; Thu, 26 Aug 2021 13:25:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+OwUj+s0HNattd+5fUEdf8kL9KlZKYth38XeOI86GBM=; b=GvOiYGTxzVJK2Z6Cyk6SXOuZS+W/wonzJWQtf6j8DkLIJ5ZaKFtZWfVs1D5CDlUfu4 o8fIBD4NzUYzjD2yrjHKoGG7CVfHr9jwSPIgazfKwTdRcjeRsBYv0N355Qp8FwB1+lRd EZ1MA29Pmyoe2a/dOAWC+r9IrpTf3NhvjqugJJJZH9M6FXPePVc6XUgZ+27Lzj5gVkiv s2qMQcseIjjHi5pt7Dy0GvZAOZGYkiJ2xULaHkT56rP39FuXMrxLC7zcg+2O0Pju5fqI 9p6pHdFTlqv0RKwyIb7Ad+LnUxaQqG+vrT0ZVf58lbUmz/5wBezAHB7tWFY8fPyJN/BF L3lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+OwUj+s0HNattd+5fUEdf8kL9KlZKYth38XeOI86GBM=; b=FFlHgWvOp/1iovJcR7qV8V2TXnLcrRK87xMvLhdaF/FEiQWPexF/iE5UTAXqoT2fXH M2v8qsJ2KeHf7AI759bn0dWmGQ4/JsqaV2QTeKy/JR6i1xku9UUS//nlE2QC34SrJP2y HLDlwlcGIthFeBilydlsQm8RlPzMBxblAhCms08NCmKkfkb9tjvKrOfBMpwlyfct4eY8 t3y2ju4E32ptbvwMFtePk+Qr+fJcDC3BitVBHzP3S1KT4XuXsZBhfYxE622/qFjryKL+ s4bRIA9KwkVA01+6AHVB1Weq1cgzpNlqMMC3cAMy0i9tEI+B7GQ8I3ayYKc6F8Pq/MrG xGBA== X-Gm-Message-State: AOAM532Hfw+WOjMOuMRW5miyBLU/Yk7nBSt2IOBREKfW9XnxJXRZbqxl 6QofTEDR8xMuC2OCGHCdfyAw1bPJ190AA+G42co= X-Received: by 2002:a05:6830:1c69:: with SMTP id s9mr5058633otg.132.1630009535275; Thu, 26 Aug 2021 13:25:35 -0700 (PDT) MIME-Version: 1.0 References: <20210824055232.58653-1-deng.changcheng@zte.com.cn> In-Reply-To: <20210824055232.58653-1-deng.changcheng@zte.com.cn> From: Alex Deucher Date: Thu, 26 Aug 2021 16:25:24 -0400 Message-ID: Subject: Re: [PATCH linux-next] drm:dcn31: fix boolreturn.cocci warnings To: CGEL Cc: Harry Wentland , Leo Li , Alex Deucher , David Airlie , Nicholas Kazlauskas , Huang Rui , amd-gfx list , Maling list - DRI developers , LKML , Jing Yangyang , Zeal Robot Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Tue, Aug 24, 2021 at 1:52 AM CGEL wrote: > > 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 > >