Skip to contentSkip to conversation

drm/amd/display: remove useless else if

PATCH Applied Tian Tao 2 participants 2 messages Dec 21, 2020 – Jan 4, 2021

Subsystems (3)
lore
Share & tools
lore

Tian Tao

author
#0 lore raw

PATCH 1/1 drm/amd/display: remove useless else if

Fix the following coccinelle report:
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c:1357:6-8:
WARNING: possible condition with no effect (if == else)

---
 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c +0 -2
index 808c4dc..504f2a4 100644
@@ -1354,8 +1354,6 @@ static bool dcn302_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;
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Applied
#1 lore raw
Quoted 6 lines · Tian Tao

Fix the following coccinelle report:
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c:1357:6-8:
WARNING: possible condition with no effect (if == else)

Applied. Thanks!

Alex

Quoted 20 lines
---
 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c +0 -3
index 808c4dc..504f2a4 100644
@@ -1354,8 +1354,6 @@ static bool dcn302_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;
 
--

2.7.4

Quoted 4 lines

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

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