Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10381539rwl; Wed, 11 Jan 2023 19:29:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXuclf8GjaZonG2+031gp6Yaz0TGW59ACNp3cGeroUnT5/tJ+G8bl7E5UZnzj6HPa7wp3uU6 X-Received: by 2002:a17:90a:7341:b0:225:f7b3:aebf with SMTP id j1-20020a17090a734100b00225f7b3aebfmr59194456pjs.30.1673494176426; Wed, 11 Jan 2023 19:29:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673494176; cv=none; d=google.com; s=arc-20160816; b=eYWUIzLv3E1IKovF01L/KuC5T9tkpGtE1ASkSXftStjQ+kjSRN69b/VVQSE3po+RKb 1DcB7Oc5q586OYXedJc+/uDZPKltvneHhvSfdSQZ14Uahn0tApTXTaDkfYTLfYVIcSo3 rG5pXmu3sTTvXvMn2Qbi1YZMt6W26iyHm5TATNA1S6Zadkin2B8B/D00EmkbkzB0lyMi Rr/jioQgyMGt+sZTpqkfzakDKuMvtIYaPsIEDGRp/7eW3ZTM8Ot/OCEw3hrksVQ0IRwc M4xFaEfeRTL9sBDZC5wP59lkb1lWHPPlra4aPpHcLua5VQTEvolWLG/esogEBVDL+xG/ 5jxw== 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=XKDtzsEGfX5cpYNFC9roidL7w9JVcHlKvd+nPV7vv78=; b=TsZxSQJzhVw/vF7+KvXxYsK4tdY8WzwHHx2uVyNBFfn9tVs0HLpHKWYOykklVPwjjA xMmVOEuaV/jJaN92e6O6OB0IueKOXpkHWJG1XWt5wi4PeLkDN57i0VRaarqFM5g2ltgd iEWPx5t6/uBArLnsS4bETEQoiye95IyOjmVIHLdx+KuPdia7XOQlecM5kQW5fu/rbOxd zeUNZrX0hB5i9xnL9pw1SnoKHAs7gtiGkWBP12kAeyXmFG2QeeZOEDHaUmW8XM/8Lg0A Msp9garv7POsUkUtBAkEVUqsOHHKC82Oe041NNs6WAMZFDH/lCtGGdbhhrqwMA45iVH/ /SFA== 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 h71-20020a63834a000000b0047c9e9084c8si4115672pge.855.2023.01.11.19.29.28; Wed, 11 Jan 2023 19:29:36 -0800 (PST) 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 S231690AbjALDV0 (ORCPT + 50 others); Wed, 11 Jan 2023 22:21:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230329AbjALDVY (ORCPT ); Wed, 11 Jan 2023 22:21:24 -0500 Received: from out30-6.freemail.mail.aliyun.com (out30-6.freemail.mail.aliyun.com [115.124.30.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B1FF9FF7 for ; Wed, 11 Jan 2023 19:21:23 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R961e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0VZPGIgC_1673493651; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VZPGIgC_1673493651) by smtp.aliyun-inc.com; Thu, 12 Jan 2023 11:21:16 +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@gmail.com, 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: Thu, 12 Jan 2023 11:20:49 +0800 Message-Id: <20230112032049.128610-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_MSPIKE_H2,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 if branches is the same, so the if else here is redundant, so we remove it. ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:1951:2-4: WARNING: possible condition with no effect (if == else). Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3719 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 4300ce98ce8d..aa3024e58d12 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1948,10 +1948,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev) dmub_asic = DMUB_ASIC_DCN21; break; case IP_VERSION(3, 0, 0): - if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 3, 0)) - dmub_asic = DMUB_ASIC_DCN30; - else - dmub_asic = DMUB_ASIC_DCN30; + dmub_asic = DMUB_ASIC_DCN30; break; case IP_VERSION(3, 0, 1): dmub_asic = DMUB_ASIC_DCN301; -- 2.20.1.7.g153144c