From nobody Mon Sep 15 12:58:02 2025 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 2C922C63797 for ; Thu, 12 Jan 2023 03:21:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235109AbjALDV1 (ORCPT ); Wed, 11 Jan 2023 22:21:27 -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: 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 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: poss= ible condition with no effect (if =3D=3D else). Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3D3719 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/gp= u/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 *ade= v) dmub_asic =3D DMUB_ASIC_DCN21; break; case IP_VERSION(3, 0, 0): - if (adev->ip_versions[GC_HWIP][0] =3D=3D IP_VERSION(10, 3, 0)) - dmub_asic =3D DMUB_ASIC_DCN30; - else - dmub_asic =3D DMUB_ASIC_DCN30; + dmub_asic =3D DMUB_ASIC_DCN30; break; case IP_VERSION(3, 0, 1): dmub_asic =3D DMUB_ASIC_DCN301; --=20 2.20.1.7.g153144c