drm/amd/display: Remove redundant initialization of dpg_width
Subsystems (3)
PATCH 1/1 drm/amd/display: Remove redundant initialization of dpg_width
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].
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1 -1
@@ -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++;
Signature · 1 line
2.20.1.7.g153144c
Alex Deucher
AppliedApplied. Thanks!
Quoted 33 lines · Jiapeng Chong
dpg_widthis being initialized to width but this is never read asdpg_widthis 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 <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1
-2@@ -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