[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_PhsVRBMcV7065+6sgBJnjjrCnU6Eiph7d8mrRVZFFa0A@mail.gmail.com>
Date: Thu, 26 Aug 2021 16:25:24 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: CGEL <cgel.zte@...il.com>
Cc: Harry Wentland <harry.wentland@....com>,
Leo Li <sunpeng.li@....com>,
Alex Deucher <alexander.deucher@....com>,
David Airlie <airlied@...ux.ie>,
Nicholas Kazlauskas <nicholas.kazlauskas@....com>,
Huang Rui <ray.huang@....com>,
amd-gfx list <amd-gfx@...ts.freedesktop.org>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>,
LKML <linux-kernel@...r.kernel.org>,
Jing Yangyang <jing.yangyang@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH linux-next] drm:dcn31: fix boolreturn.cocci warnings
Applied. Thanks!
Alex
On Tue, Aug 24, 2021 at 1:52 AM CGEL <cgel.zte@...il.com> wrote:
>
> From: Jing Yangyang <jing.yangyang@....com.cn>
>
> ./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 <zealci@....com.cn>
> Signed-off-by: Jing Yangyang <jing.yangyang@....com.cn>
> ---
> 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
>
>
Powered by blists - more mailing lists