Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp33600imn; Thu, 28 Jul 2022 21:17:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR5GBH6tXSSSurvd+E3gLKwnN8wahTqJuVfdLVMzkb0C6BAsAHtDp0smo3iNKSqh7smrR11b X-Received: by 2002:a17:902:ce05:b0:16b:e725:6f6c with SMTP id k5-20020a170902ce0500b0016be7256f6cmr2032115plg.110.1659068220874; Thu, 28 Jul 2022 21:17:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659068220; cv=none; d=google.com; s=arc-20160816; b=g9Isdi1mvObgyHYjKgyoHE/jYUgHwldWoUNivZIl2j00oZ+m3dGmIwCcnPS8Mtcf6e xaH90FJOdusb4XSEKOG/eI5SON59qzrrhE0VPLW5FAR0/7ywn+TTy9RSrgFMqYQ1A3xZ A7SkQFyYrpAAM10SYlnOa+OZnhcnl3wEixmnDr/wq/1rvjoMwp/HInFqq3M6eph60wF+ DWttvrd5EnDJTahIioHyT3M8L1/6GZfCeFS9W9Aft323kjVzg4Pchd+fByTbuSnDs5gx TPMlE2WoIKZySCyBMQpzoN1t2D6zG1IqR4+phOARUduINaxXD7WzN9llGURzR3zUx0ry w5wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=vJXSkFa7qmvwub75tcbfe34H6WQjmbXxE3Nlk2LQp3Y=; b=UbSgCSJMkqn7o99CdxujQj8wozVgvqsiSemOwnwXhY3vYIzGss5PT59Dwb3oJzT1sy vEias3/8SJCA9/vsProZOB6+Gs1W3jMWZaCYc+kYpwK4DDs+mYjOJWchADNT4k7hgiKn UZxgzuMrMj+F6EZjvPrasnsdDafHyPF5F6emiSU38Uzvi5OoZN4Dp5abym0qUxmupigW 0O+YBx9amVgnYGMVucv7/9dkTGAa6YcqjPCl2HFfW/Qo6tFvoI5Hc45qKCQGsbiPv8B/ 4rmyJvb/c4UfGtsoF+IMH5lPMb7hJUBmtn7xQjUywQdseqx2T3Nms6Sh11yJgX3s2RfX KMhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n3-20020a634d43000000b003ff3d0bc82asi2637977pgl.325.2022.07.28.21.16.45; Thu, 28 Jul 2022 21:17:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232739AbiG2DmO (ORCPT + 99 others); Thu, 28 Jul 2022 23:42:14 -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: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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/drivers/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( 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); -- 2.20.1.7.g153144c