Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Remove useless assignments

[WHAT & HOW]
"split_pipe" are assigned to test_pipe and then immediately are updated
to other values. The same also applies to "status" as well.

Similarly, "id", "dwb" and "unused_dpps" are assigned but the functions
immediately return, and thus they have no effects.

As a results, the assignments removed.

This fixes 5 UNUSED_VALUE issues reported by Coverity.

Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Alex Hung and committed by
Alex Deucher
e421808c 9237c950

-7
-2
drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c
··· 209 209 p->cur_display_config->output.OutputEncoder[0], p->cur_mode_support_info->DSCEnabled[0]) - 1; 210 210 211 211 if (odms_needed <= unused_dpps) { 212 - unused_dpps -= odms_needed; 213 - 214 212 if (odms_needed == 1) { 215 213 p->new_policy->ODMUse[0] = dml_odm_use_policy_combine_2to1; 216 214 optimization_done = true;
-1
drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c
··· 443 443 case GPIO_ID_GPIO_PAD: 444 444 break; 445 445 default: 446 - id = GPIO_ID_HPD; 447 446 ASSERT_CRITICAL(false); 448 447 return NULL; 449 448 }
-1
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
··· 3453 3453 r2 = test_pipe->plane_res.scl_data.recout; 3454 3454 r2_r = r2.x + r2.width; 3455 3455 r2_b = r2.y + r2.height; 3456 - split_pipe = test_pipe; 3457 3456 3458 3457 /** 3459 3458 * There is another half plane on same layer because of
-1
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
··· 486 486 } 487 487 /*following is the original: warmup each DWB's mcif buffer*/ 488 488 for (i = 0; i < num_dwb; i++) { 489 - dwb = dc->res_pool->dwbc[wb_info[i].dwb_pipe_inst]; 490 489 mcif_wb = dc->res_pool->mcif_wb[wb_info[i].dwb_pipe_inst]; 491 490 /*warmup is for VM mode only*/ 492 491 if (wb_info[i].mcif_buf_params.p_vmid == 0)
-1
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
··· 1068 1068 r2 = test_pipe->plane_res.scl_data.recout; 1069 1069 r2_r = r2.x + r2.width; 1070 1070 r2_b = r2.y + r2.height; 1071 - split_pipe = test_pipe; 1072 1071 1073 1072 /** 1074 1073 * There is another half plane on same layer because of