Skip to contentSkip to conversation

drm/amd: remove possible condition with no effect (if == else)

PATCH Applied Bernard Zhao 2 participants 2 messages Aug 23, 2022 – Aug 25, 2022

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

PATCH 1/1 drm/amd: remove possible condition with no effect (if == else)

This patch fix cocci warning:
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c:1816:6-8:
WARNING: possible condition with no effect (if == else).

---
 drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c +0 -2
index 85f32206a766..dccc9794e6a2 100644
@@ -1813,8 +1813,6 @@ static bool dcn314_resource_construct(
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
-	else if (dc->ctx->dce_environment == DCE_ENV_FPGA_MAXIMUS)
-		dc->debug = debug_defaults_diags;
 	else
 		dc->debug = debug_defaults_diags;
 	// Init the vm_helper
Signature · 1 line
2.33.1
Applied
#1 lore raw

Applied. Thanks!

Quoted 26 lines · Bernard Zhao

This patch fix cocci warning:
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c:1816:6-8:
WARNING: possible condition with no effect (if == else).

---
 drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c +0 -3
index 85f32206a766..dccc9794e6a2 100644
@@ -1813,8 +1813,6 @@ static bool dcn314_resource_construct(
 
        if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
                dc->debug = debug_defaults_drv;
-       else if (dc->ctx->dce_environment == DCE_ENV_FPGA_MAXIMUS)
-               dc->debug = debug_defaults_diags;
        else
                dc->debug = debug_defaults_diags;
        // Init the vm_helper
--

2.33.1