drm/amd/display: Remove useless else if
Subsystems (3)
PATCH 1/1 drm/amd/display: Remove useless else if
The assignment of the else and else if branches is the same, so the else if here is redundant, so we remove it and add a comment to make the code here readable.
Eliminate the follow coccicheck warning:
./drivers/comedi/drivers/das1800.c:1300:8-10: WARNING: possible condition with no effect (if == else).
Reported-by Abaci Robot <[email protected]>
Signed-off-by Jiapeng Chong <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c +2 -2
@@ -2132,10 +2132,10 @@ 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 +/* This branch contains condition '(dc->ctx->dce_environment == DCE_ENV_FPGA_MAXIMUS)' */ dc->debug = debug_defaults_diags; +// Init the vm_helper if (dc->vm_helper)vm_helper_init (dc->vm_helper,16 );
Signature · 1 line
2.20.1.7.g153144c