Skip to contentSkip to conversation

amdgpu/dc: remove redundant assignment to variable 'option'

PATCH Applied Colin King 2 participants 2 messages Apr 24, 2020

Subsystems (4)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 amdgpu/dc: remove redundant assignment to variable 'option'

From: Colin Ian King <[email protected]>

The variable option is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c +1 -1
index 4245e1f818a3..e096d2b95ef9 100644
@@ -679,8 +679,7 @@ void dce110_opp_v_set_csc_default(
 	if (default_adjust->force_hw_default = false) {
 		const struct out_csc_color_matrix *elm;
 		/* currently parameter not in use */
-		enum grph_color_adjust_option option -			GRPH_COLOR_MATRIX_HW_DEFAULT;
+		enum grph_color_adjust_option option;
 		uint32_t i;
 		/*
 		 * HW default false we program locally defined matrix
Signature · 1 line
2.25.1
Applied
#1 lore raw
Quoted 9 lines · Colin King

From: Colin Ian King <[email protected]>

The variable option is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")

Applied. Thanks!

Alex

Quoted 24 lines
---
 drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c +1 -2
index 4245e1f818a3..e096d2b95ef9 100644
@@ -679,8 +679,7 @@ void dce110_opp_v_set_csc_default(
        if (default_adjust->force_hw_default = false) {
                const struct out_csc_color_matrix *elm;
                /* currently parameter not in use */
-               enum grph_color_adjust_option option > -                       GRPH_COLOR_MATRIX_HW_DEFAULT;
+               enum grph_color_adjust_option option;
                uint32_t i;
                /*
                 * HW default false we program locally defined matrix
--

2.25.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel