amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: fix if == else warning
@ 2022-04-24  9:06 Guo Zhengkui
  2022-04-24 20:15 ` Liu, Zhan
  0 siblings, 1 reply; 3+ messages in thread
From: Guo Zhengkui @ 2022-04-24  9:06 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	Charlene Liu, Jun Lei, Guo Zhengkui, Zhan Liu,
	José Expósito, open list:AMD DISPLAY CORE,
	open list:DRM DRIVERS, open list
  Cc: zhengkui_guo

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(-)

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] drm/amd/display: fix if == else warning
  2022-04-24  9:06 [PATCH] drm/amd/display: fix if == else warning Guo Zhengkui
@ 2022-04-24 20:15 ` Liu, Zhan
  2022-04-25 21:55   ` Alex Deucher
  0 siblings, 1 reply; 3+ messages in thread
From: Liu, Zhan @ 2022-04-24 20:15 UTC (permalink / raw)
  To: Guo Zhengkui, Wentland, Harry, Li, Sun peng (Leo),
	Siqueira, Rodrigo, Deucher, Alexander, Koenig, Christian, Pan,
	Xinhui, David Airlie, Daniel Vetter, Liu, Charlene, Lei, Jun,
	José Expósito, open list:AMD DISPLAY CORE,
	open list:DRM DRIVERS, open list
  Cc: zhengkui_guo

[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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amd/display: fix if == else warning
  2022-04-24 20:15 ` Liu, Zhan
@ 2022-04-25 21:55   ` Alex Deucher
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2022-04-25 21:55 UTC (permalink / raw)
  To: Liu, Zhan
  Cc: Liu, Charlene, Guo Zhengkui, Li, Sun peng (Leo),
	zhengkui_guo, Pan, Xinhui, Siqueira, Rodrigo, open list,
	open list:AMD DISPLAY CORE, David Airlie, open list:DRM DRIVERS,
	Daniel Vetter, Deucher, Alexander, José Expósito, Lei,
	Jun, Wentland, Harry, Koenig, Christian

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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-25 21:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-24  9:06 [PATCH] drm/amd/display: fix if == else warning Guo Zhengkui
2022-04-24 20:15 ` Liu, Zhan
2022-04-25 21:55   ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).