[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_NNTmyPs4KL1LgaZntAurjm1vx_m9UH95tMOkojCAtLxw@mail.gmail.com>
Date: Tue, 7 Sep 2021 13:07:45 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Cc: "Wentland, Harry" <harry.wentland@....com>,
"Leo (Sunpeng) Li" <sunpeng.li@....com>,
"Deucher, Alexander" <alexander.deucher@....com>,
Christian Koenig <christian.koenig@....com>,
xinhui pan <Xinhui.Pan@....com>,
Dave Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
amd-gfx list <amd-gfx@...ts.freedesktop.org>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/amd/display: Fix warning comparing pointer to 0
Applied. Thanks!
Alex
On Mon, Sep 6, 2021 at 5:23 AM Jiapeng Chong
<jiapeng.chong@...ux.alibaba.com> wrote:
>
> From: chongjiapeng <jiapeng.chong@...ux.alibaba.com>
>
> Fix the following coccicheck warning:
>
> ./drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c:643:35-36:
> WARNING comparing pointer to 0.
>
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: chongjiapeng <jiapeng.chong@...ux.alibaba.com>
> ---
> drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
> index 4a4894e..15491e3 100644
> --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
> +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
> @@ -640,7 +640,7 @@ void dcn31_clk_mgr_construct(
> sizeof(struct dcn31_watermarks),
> &clk_mgr->smu_wm_set.mc_address.quad_part);
>
> - if (clk_mgr->smu_wm_set.wm_set == 0) {
> + if (!clk_mgr->smu_wm_set.wm_set) {
> clk_mgr->smu_wm_set.wm_set = &dummy_wms;
> clk_mgr->smu_wm_set.mc_address.quad_part = 0;
> }
> --
> 1.8.3.1
>
Powered by blists - more mailing lists