drm/amd/display: remove variable active_disp
PATCH 1/1 drm/amd/display: remove variable active_disp
From: Colin Ian King <[email protected]>
The variable active_disp is being initialized with a value that is never read, it is being re-assigned immediately afterwards. Clean up the code by removing the need for variable active_disp.
Addresses-Coverity: ("Unused value")
--- drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c +1 -4
@@ -82,9 +82,6 @@ void bios_set_scratch_critical_state(uint32_t bios_get_vga_enabled_displays (struct dc_bios *bios) { -uint32_t active_disp =1 ; - - active_disp =REG_READ (BIOS_SCRATCH_3 ) &0XFFFF ; -return active_disp; +return REG_READ (BIOS_SCRATCH_3 ) &0XFFFF ; }
Signature · 1 line
2.31.1
Alex Deucher
AppliedApplied. Thanks!
Alex
Quoted 29 lines · Colin King
From: Colin Ian King <[email protected]>
The variable
active_dispis being initialized with a value that is never read, it is being re-assigned immediately afterwards. Clean up the code by removing the need for variableactive_disp.Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>--- drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c +1
-5@@ -82,9 +82,6 @@ void bios_set_scratch_critical_state(uint32_t bios_get_vga_enabled_displays (struct dc_bios *bios) { -uint32_t active_disp =1 ; - - active_disp =REG_READ (BIOS_SCRATCH_3 ) &0XFFFF ; -return active_disp; +return REG_READ (BIOS_SCRATCH_3 ) &0XFFFF ; } --
Quoted 2 lines
2.31.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx