From nobody Wed Apr 15 00:01:20 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0B87C00144 for ; Fri, 29 Jul 2022 03:42:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231352AbiG2DmP (ORCPT ); Thu, 28 Jul 2022 23:42:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230483AbiG2DmM (ORCPT ); Thu, 28 Jul 2022 23:42:12 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92E1F56BBC for ; Thu, 28 Jul 2022 20:42:09 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0VKjhn3k_1659066123; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VKjhn3k_1659066123) by smtp.aliyun-inc.com; Fri, 29 Jul 2022 11:42:05 +0800 From: Jiapeng Chong To: harry.wentland@amd.com Cc: sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie, daniel@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] drm/amd/display: Remove useless else if Date: Fri, 29 Jul 2022 11:41:50 +0800 Message-Id: <20220729034150.72631-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 =3D=3D else). Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c b/driv= ers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c index 63861cdfb09f..02bea8f0c8c9 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c @@ -2132,10 +2132,10 @@ static bool dcn314_resource_construct( =20 if (dc->ctx->dce_environment =3D=3D DCE_ENV_PRODUCTION_DRV) dc->debug =3D debug_defaults_drv; - else if (dc->ctx->dce_environment =3D=3D DCE_ENV_FPGA_MAXIMUS) - dc->debug =3D debug_defaults_diags; else + /* This branch contains condition '(dc->ctx->dce_environment =3D=3D DCE_E= NV_FPGA_MAXIMUS)' */ dc->debug =3D debug_defaults_diags; + // Init the vm_helper if (dc->vm_helper) vm_helper_init(dc->vm_helper, 16); --=20 2.20.1.7.g153144c