Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp730910rwb; Thu, 12 Jan 2023 11:30:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXsbpnsmbmrKokD+RV4mrmbIQh6JshSNjMglVCgNRQ2i7ownMD36YuO5l7qLZtGYc9zoowr5 X-Received: by 2002:a17:90b:3542:b0:227:22d1:5947 with SMTP id lt2-20020a17090b354200b0022722d15947mr7639288pjb.45.1673551859097; Thu, 12 Jan 2023 11:30:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673551859; cv=none; d=google.com; s=arc-20160816; b=JFG8XdMn+kTJpyD7GL+waQacA/BlXhUx3nlcRUOOqKE/l55L/fji02VWqLB/oip1Ts Ncbn8+T3rS59Ljjwu644I73rpkqT3blzQFpB4Th+djkc2lZ+TXDMHPLIe4sKVvAAlDEa WXWlKR+qjEVJxNU6VBEBHu8yvQit2yGN9t4v4a9RktJTmOMkt03TcwE06VgYDF0ZjnHR +JFgGmJCWrTnpowcM8iY6MuqOwsCkyRQl/CDdEpzQH5bTL6X5/2h1u9Zv2L1MpLmoihN J3ztbHP4JBinT89U99HgMbGaFbzwVk9jkALH/kNpBcxFz5BW2pv7wuOAVT6PCVzX2Neh aejQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GiJEsLNpkHnW+GAQ0NBigzoD8JOv1F6wdXxOX2ruxq0=; b=OjwSk1VjKFJWzHpN/lCt/GhOdWbcfXA3zURpaUlERYH1oy/hNmLMBM6gDQqB91seNm M98nU9uEKtIJCxSY+Tas+A844vUrvNCLUxts/MVB37HLSHCITR+uiTSi2Q8Cfww04SsJ mtCNCQhTSYJ+i7iKNnJqhS0opUekRwIPrmF+puL2G64UxyzLSP7Q8dJa9NB5InEH3x0f lURgwtsTZ34xt14iUfesr0ss0K4FcWCiacxfMQ80OsIR7eRz0tLD8T5kWiqXF/KUBNxC Zhv4gfP01gCG+Kk4IE+svWFK+O1+h6ZTFn6vmoSIOf9+YP3J7XOVkr/SIkmjLrW6QAKi Moxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Oheuo3BV; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w12-20020a63fb4c000000b004a9277c671csi18412436pgj.228.2023.01.12.11.30.52; Thu, 12 Jan 2023 11:30:59 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Oheuo3BV; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240425AbjALTUM (ORCPT + 50 others); Thu, 12 Jan 2023 14:20:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240362AbjALTTo (ORCPT ); Thu, 12 Jan 2023 14:19:44 -0500 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FF9BB9B for ; Thu, 12 Jan 2023 11:07:46 -0800 (PST) Received: by mail-oi1-x22d.google.com with SMTP id r130so16055512oih.2 for ; Thu, 12 Jan 2023 11:07:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=GiJEsLNpkHnW+GAQ0NBigzoD8JOv1F6wdXxOX2ruxq0=; b=Oheuo3BVTnqAZlN/6ElEIymARl5QOK1V5kY8iK6oj+KM7C4k7SjlcnaDljEFwlwcYm GOV8V0+Mkpgf72QV2JFVsrxOcUsWhwUS3c/JJofbAh0l+OwCr3i6Q02y/Eo342moqK+O oHs27IiX4biAXdNzZWFrp/RdzzirfxM8tDGjIJuIBOedKNJLOyVKYD0b4EN5NsNJ1PL7 3dvWW6s0MWS3LvEqwFxlRi5sjLB+xWggFjNnwepkvufPYVb1DFaRqHwvP+m1cmJUHAEr T9Z42IBFfdOCwii2BRkohu+ZeJQI4GQ/J2glQFmhrABacuWEwoC82rgueKv0Ss7rU0i7 MLLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GiJEsLNpkHnW+GAQ0NBigzoD8JOv1F6wdXxOX2ruxq0=; b=H+jcmmA2nbYE6smGCxc1awDoxILqD3oYxl3jEb0p7wpzXGXwCn9+JXkKsiohyyC6Xx ynSDT/8ESak8fVNuQBHxWTf6S3DrzEowyEEnn8jsQ5152VaACgOLeExlOwBatFxCqiVW dC2w1ndM0XsXhsEj4+AxdKuXvmyZy38+H3OHBWd8tOb07NBYXE8Xp7nQCwF7h5xRuDSB wB+clOhx5cgSa266vYQgarYQVxNetL3GQoC7ukHNEbBDeWPinbwexuEigJmV7H0y36Iv j2RwPNbCTwWxkNPu/3x2drkgEZLAQVjFoa2XmUV3THNhlr8T0jHoyS6Sfed8PmbnNdxK buFQ== X-Gm-Message-State: AFqh2korNu0PdKvVpQSuaH7PH3ggkqTNNrs6mSlQnpKcFRY9BmInQA0w y/5UsPhikvj8vMOmwjFmSQZ40mzW9OeDZkJ13Vw= X-Received: by 2002:a05:6808:2001:b0:35b:d93f:cbc4 with SMTP id q1-20020a056808200100b0035bd93fcbc4mr5087507oiw.96.1673550465717; Thu, 12 Jan 2023 11:07:45 -0800 (PST) MIME-Version: 1.0 References: <20230112032049.128610-1-jiapeng.chong@linux.alibaba.com> In-Reply-To: <20230112032049.128610-1-jiapeng.chong@linux.alibaba.com> From: Alex Deucher Date: Thu, 12 Jan 2023 14:07:34 -0500 Message-ID: Subject: Re: [PATCH] drm/amd/display: Remove useless else if To: Jiapeng Chong Cc: harry.wentland@amd.com, sunpeng.li@amd.com, Abaci Robot , Xinhui.Pan@amd.com, Rodrigo.Siqueira@amd.com, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, alexander.deucher@amd.com, christian.koenig@amd.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Applied. Thanks! On Wed, Jan 11, 2023 at 10:21 PM Jiapeng Chong wrote: > > 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 >