drm/amd/display: avoid variable reinitialization

Message ID Y8PIId1k1TmIAo18@ubun2204.myguest.virtualbox.org
State New
Headers
Series drm/amd/display: avoid variable reinitialization |

Commit Message

Deepak R Varma Jan. 15, 2023, 9:32 a.m. UTC
  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.

Signed-off-by: Deepak R Varma <drv@mailo.com>
---
 drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Alex Deucher Jan. 16, 2023, 5:58 p.m. UTC | #1
This is already fixed.

Thanks,

Alex

On Sun, Jan 15, 2023 at 4:32 AM Deepak R Varma <drv@mailo.com> wrote:
>
> 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.
>
> Signed-off-by: Deepak R Varma <drv@mailo.com>
> ---
>  drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c
> index 41edbd64ea21..777d8efee977 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c
> @@ -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
>
>
>
  

Patch

diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c
index 41edbd64ea21..777d8efee977 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c
@@ -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,
 };