All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Remove redundant initialization of dpg_width
@ 2022-01-14 10:43 ` Jiapeng Chong
  0 siblings, 0 replies; 4+ messages in thread
From: Jiapeng Chong @ 2022-01-14 10:43 UTC (permalink / raw)
  To: alexander.deucher@amd.comalexander.deucher
  Cc: , Jiapeng Chong, Xinhui.Pan, Abaci Robot, linux-kernel, amd-gfx, ,
	dri-devel, christian.koenig

dpg_width is being initialized to width but this is never read
as dpg_width is overwritten later on. Remove the redundant
initialization.

Cleans up the following clang-analyzer warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:6020:8:
warning: Value stored to 'dpg_width' during its initialization is never
read [clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index 497470513e76..1f8831156bc4 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -6017,7 +6017,7 @@ static void set_crtc_test_pattern(struct dc_link *link,
 		else if (link->dc->hwss.set_disp_pattern_generator) {
 			struct pipe_ctx *odm_pipe;
 			int opp_cnt = 1;
-			int dpg_width = width;
+			int dpg_width;
 
 			for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe)
 				opp_cnt++;
-- 
2.20.1.7.g153144c


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

* [PATCH] drm/amd/display: Remove redundant initialization of dpg_width
@ 2022-01-14 10:43 ` Jiapeng Chong
  0 siblings, 0 replies; 4+ messages in thread
From: Jiapeng Chong @ 2022-01-14 10:43 UTC (permalink / raw)
  To: alexander.deucher@amd.comalexander.deucher
  Cc: , Jiapeng Chong, Xinhui.Pan, Abaci Robot, linux-kernel, amd-gfx, ,
	dri-devel, daniel, christian.koenig

dpg_width is being initialized to width but this is never read
as dpg_width is overwritten later on. Remove the redundant
initialization.

Cleans up the following clang-analyzer warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:6020:8:
warning: Value stored to 'dpg_width' during its initialization is never
read [clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index 497470513e76..1f8831156bc4 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -6017,7 +6017,7 @@ static void set_crtc_test_pattern(struct dc_link *link,
 		else if (link->dc->hwss.set_disp_pattern_generator) {
 			struct pipe_ctx *odm_pipe;
 			int opp_cnt = 1;
-			int dpg_width = width;
+			int dpg_width;
 
 			for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe)
 				opp_cnt++;
-- 
2.20.1.7.g153144c


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

* Re: [PATCH] drm/amd/display: Remove redundant initialization of dpg_width
  2022-01-14 10:43 ` Jiapeng Chong
@ 2022-01-14 22:22   ` Alex Deucher
  -1 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2022-01-14 22:22 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: xinhui pan, Abaci Robot, LKML, amd-gfx list,
	Maling list - DRI developers, Christian Koenig

Applied.  Thanks!

On Fri, Jan 14, 2022 at 5:44 AM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> dpg_width is being initialized to width but this is never read
> as dpg_width is overwritten later on. Remove the redundant
> initialization.
>
> Cleans up the following clang-analyzer warning:
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:6020:8:
> warning: Value stored to 'dpg_width' during its initialization is never
> read [clang-analyzer-deadcode.DeadStores].
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> index 497470513e76..1f8831156bc4 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> @@ -6017,7 +6017,7 @@ static void set_crtc_test_pattern(struct dc_link *link,
>                 else if (link->dc->hwss.set_disp_pattern_generator) {
>                         struct pipe_ctx *odm_pipe;
>                         int opp_cnt = 1;
> -                       int dpg_width = width;
> +                       int dpg_width;
>
>                         for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe)
>                                 opp_cnt++;
> --
> 2.20.1.7.g153144c
>

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

* Re: [PATCH] drm/amd/display: Remove redundant initialization of dpg_width
@ 2022-01-14 22:22   ` Alex Deucher
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2022-01-14 22:22 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: xinhui pan, Abaci Robot, LKML, Maling list - DRI developers,
	amd-gfx list, Christian Koenig

Applied.  Thanks!

On Fri, Jan 14, 2022 at 5:44 AM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> dpg_width is being initialized to width but this is never read
> as dpg_width is overwritten later on. Remove the redundant
> initialization.
>
> Cleans up the following clang-analyzer warning:
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:6020:8:
> warning: Value stored to 'dpg_width' during its initialization is never
> read [clang-analyzer-deadcode.DeadStores].
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> index 497470513e76..1f8831156bc4 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> @@ -6017,7 +6017,7 @@ static void set_crtc_test_pattern(struct dc_link *link,
>                 else if (link->dc->hwss.set_disp_pattern_generator) {
>                         struct pipe_ctx *odm_pipe;
>                         int opp_cnt = 1;
> -                       int dpg_width = width;
> +                       int dpg_width;
>
>                         for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe)
>                                 opp_cnt++;
> --
> 2.20.1.7.g153144c
>

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

end of thread, other threads:[~2022-01-14 22:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14 10:43 [PATCH] drm/amd/display: Remove redundant initialization of dpg_width Jiapeng Chong
2022-01-14 10:43 ` Jiapeng Chong
2022-01-14 22:22 ` Alex Deucher
2022-01-14 22:22   ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.