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 and variables

[WHAT & HOW]
misc0, temp and split_pipe are assigned but immediately re-assigned
to other values. The early assignments are useless and are removed.
Unused variables are removed as well.

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: Tom Chung <chiahsuan.chung@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
b0814fa3 c56c0aca

-9
-1
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
··· 1013 1013 r2 = test_pipe->plane_res.scl_data.recout; 1014 1014 r2_r = r2.x + r2.width; 1015 1015 r2_b = r2.y + r2.height; 1016 - split_pipe = test_pipe; 1017 1016 1018 1017 /** 1019 1018 * There is another half plane on same layer because of
-2
drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c
··· 277 277 uint32_t misc1 = 0; 278 278 uint32_t h_blank; 279 279 uint32_t h_back_porch; 280 - uint8_t synchronous_clock = 0; /* asynchronous mode */ 281 280 uint8_t colorimetry_bpc; 282 281 uint8_t dynamic_range_rgb = 0; /*full range*/ 283 282 uint8_t dynamic_range_ycbcr = 1; /*bt709*/ ··· 379 380 break; 380 381 } 381 382 382 - misc0 = misc0 | synchronous_clock; 383 383 misc0 = colorimetry_bpc << 5; 384 384 385 385 if (REG(DP_MSA_TIMING_PARAM1)) {
-2
drivers/gpu/drm/amd/display/dc/dce110/dce110_mem_input_v.c
··· 76 76 mmUNP_GRPH_PRIMARY_SURFACE_ADDRESS_HIGH_C, 77 77 value); 78 78 79 - temp = 0; 80 79 value = 0; 81 80 temp = address.low_part >> 82 81 UNP_GRPH_PRIMARY_SURFACE_ADDRESS_C__GRPH_PRIMARY_SURFACE_ADDRESS_C__SHIFT; ··· 111 112 mmUNP_GRPH_PRIMARY_SURFACE_ADDRESS_HIGH_L, 112 113 value); 113 114 114 - temp = 0; 115 115 value = 0; 116 116 temp = address.low_part >> 117 117 UNP_GRPH_PRIMARY_SURFACE_ADDRESS_L__GRPH_PRIMARY_SURFACE_ADDRESS_L__SHIFT;
-2
drivers/gpu/drm/amd/display/dc/dio/dcn10/dcn10_stream_encoder.c
··· 255 255 uint32_t misc1 = 0; 256 256 uint32_t h_blank; 257 257 uint32_t h_back_porch; 258 - uint8_t synchronous_clock = 0; /* asynchronous mode */ 259 258 uint8_t colorimetry_bpc; 260 259 uint8_t dp_pixel_encoding = 0; 261 260 uint8_t dp_component_depth = 0; ··· 361 362 break; 362 363 } 363 364 364 - misc0 = misc0 | synchronous_clock; 365 365 misc0 = colorimetry_bpc << 5; 366 366 367 367 switch (output_color_space) {
-2
drivers/gpu/drm/amd/display/dc/dio/dcn401/dcn401_dio_stream_encoder.c
··· 447 447 uint32_t misc1 = 0; 448 448 uint32_t h_blank; 449 449 uint32_t h_back_porch; 450 - uint8_t synchronous_clock = 0; /* asynchronous mode */ 451 450 uint8_t colorimetry_bpc; 452 451 uint8_t dp_pixel_encoding = 0; 453 452 uint8_t dp_component_depth = 0; ··· 602 603 break; 603 604 } 604 605 605 - misc0 = misc0 | synchronous_clock; 606 606 misc0 = colorimetry_bpc << 5; 607 607 608 608 switch (output_color_space) {