Message ID | 20220424090640.1865-1-guozhengkui@vivo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/amd/display: fix if == else warning | expand |
[AMD Official Use Only - General] > -----Original Message----- > From: Guo Zhengkui <guozhengkui@vivo.com> > Sent: 2022/April/24, Sunday 5:06 AM > To: Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo) > <Sunpeng.Li@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; > Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian > <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; David Airlie > <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>; Liu, Charlene > <Charlene.Liu@amd.com>; Lei, Jun <Jun.Lei@amd.com>; Guo Zhengkui > <guozhengkui@vivo.com>; Liu, Zhan <Zhan.Liu@amd.com>; José Expósito > <jose.exposito89@gmail.com>; open list:AMD DISPLAY CORE <amd- > gfx@lists.freedesktop.org>; open list:DRM DRIVERS <dri- > devel@lists.freedesktop.org>; open list <linux-kernel@vger.kernel.org> > Cc: zhengkui_guo@outlook.com > Subject: [PATCH] drm/amd/display: fix if == else warning > > Fix the following coccicheck warning: > > drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c:98:8-10: > WARNING: possible condition with no effect (if == else) > > Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com> Thanks a lot for fixing this warning. Reviewed-by: Zhan Liu <zhan.liu@amd.com> > --- > drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c > b/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c > index fe22530242d2..05b3fba9ccce 100644 > --- a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c > +++ b/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c > @@ -95,8 +95,6 @@ static void gpu_addr_to_uma(struct dce_hwseq *hwseq, > } else if (hwseq->fb_offset.quad_part <= addr->quad_part && > addr->quad_part <= hwseq->uma_top.quad_part) { > is_in_uma = true; > - } else if (addr->quad_part == 0) { > - is_in_uma = false; > } else { > is_in_uma = false; > } > -- > 2.20.1
Applied. Thanks! Alex On Sun, Apr 24, 2022 at 4:15 PM Liu, Zhan <Zhan.Liu@amd.com> wrote: > > [AMD Official Use Only - General] > > > -----Original Message----- > > From: Guo Zhengkui <guozhengkui@vivo.com> > > Sent: 2022/April/24, Sunday 5:06 AM > > To: Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo) > > <Sunpeng.Li@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; > > Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian > > <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; David Airlie > > <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>; Liu, Charlene > > <Charlene.Liu@amd.com>; Lei, Jun <Jun.Lei@amd.com>; Guo Zhengkui > > <guozhengkui@vivo.com>; Liu, Zhan <Zhan.Liu@amd.com>; José Expósito > > <jose.exposito89@gmail.com>; open list:AMD DISPLAY CORE <amd- > > gfx@lists.freedesktop.org>; open list:DRM DRIVERS <dri- > > devel@lists.freedesktop.org>; open list <linux-kernel@vger.kernel.org> > > Cc: zhengkui_guo@outlook.com > > Subject: [PATCH] drm/amd/display: fix if == else warning > > > > Fix the following coccicheck warning: > > > > drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c:98:8-10: > > WARNING: possible condition with no effect (if == else) > > > > Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com> > > Thanks a lot for fixing this warning. > > Reviewed-by: Zhan Liu <zhan.liu@amd.com> > > > --- > > drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c > > b/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c > > index fe22530242d2..05b3fba9ccce 100644 > > --- a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c > > +++ b/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c > > @@ -95,8 +95,6 @@ static void gpu_addr_to_uma(struct dce_hwseq *hwseq, > > } else if (hwseq->fb_offset.quad_part <= addr->quad_part && > > addr->quad_part <= hwseq->uma_top.quad_part) { > > is_in_uma = true; > > - } else if (addr->quad_part == 0) { > > - is_in_uma = false; > > } else { > > is_in_uma = false; > > } > > -- > > 2.20.1 >
diff --git a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c index fe22530242d2..05b3fba9ccce 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c @@ -95,8 +95,6 @@ static void gpu_addr_to_uma(struct dce_hwseq *hwseq, } else if (hwseq->fb_offset.quad_part <= addr->quad_part && addr->quad_part <= hwseq->uma_top.quad_part) { is_in_uma = true; - } else if (addr->quad_part == 0) { - is_in_uma = false; } else { is_in_uma = false; }
Fix the following coccicheck warning: drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c:98:8-10: WARNING: possible condition with no effect (if == else) Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com> --- drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c | 2 -- 1 file changed, 2 deletions(-)