Skip to contentSkip to conversation

drm/amd/display: avoid variable reinitialization

PATCH In review Deepak R Varma 2 participants 2 messages Jan 15, 2023 – Jan 16, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: avoid variable reinitialization

The member variable set_odm_combine is already initialized and hence the reinitialization instruction can be removed. Issue identified using the dubleinit.cocci Coccinelle semantic patch script.

---
 drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c +0 -1
index 41edbd64ea21..777d8efee977 100644
@@ -254,7 +254,6 @@ static struct timing_generator_funcs dcn314_tg_funcs = {
 		.get_hw_timing = optc1_get_hw_timing,
 		.init_odm = optc3_init_odm,
 		.set_odm_bypass = optc314_set_odm_bypass,
-		.set_odm_combine = optc314_set_odm_combine,
 		.set_h_timing_div_manual_mode = optc314_set_h_timing_div_manual_mode,
 };
 
Signature · 1 line
2.34.1
#1 lore raw

This is already fixed.

Thanks,

Alex

Quoted 27 lines · Deepak R Varma

The member variable set_odm_combine is already initialized and hence the reinitialization instruction can be removed. Issue identified using the dubleinit.cocci Coccinelle semantic patch script.

---
 drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c +0 -2
index 41edbd64ea21..777d8efee977 100644
@@ -254,7 +254,6 @@ static struct timing_generator_funcs dcn314_tg_funcs = {
                .get_hw_timing = optc1_get_hw_timing,
                .init_odm = optc3_init_odm,
                .set_odm_bypass = optc314_set_odm_bypass,
-               .set_odm_combine = optc314_set_odm_combine,
                .set_h_timing_div_manual_mode = optc314_set_h_timing_div_manual_mode,
 };
 
--

2.34.1