Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2059686rwb; Fri, 12 Aug 2022 11:10:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR5+FS5ng04umHeTJ0GHWAvfQhNWLENofltkpEJQppolyccmJSR9BvPN58yX/A5Ho8SlqJyV X-Received: by 2002:a17:907:a06b:b0:730:9496:4f63 with SMTP id ia11-20020a170907a06b00b0073094964f63mr3361546ejc.238.1660327830387; Fri, 12 Aug 2022 11:10:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660327830; cv=none; d=google.com; s=arc-20160816; b=REw7bR+KFWgEoj03mptOdUtN608hIJX3MaSfCHyZS91M/CvofCSS97KMPS77huDvD4 5JCwwmsmMf1DFVL9I27EzDdBCrE4OwOOZ0GEbpZzHyO1gKJ6YB2DDRHR8RGoM4A01eoC Oh10b/w52Zs6CZ66mv6Ihrpqf+UPiQmnxRZuyN4ZAlqDHgm+YUNXiZ+Y5ckTfpv1jAxl +JFUPZODsaysWN/MgFqaldDm2OhlB34asTz3LrAqVfiHXYJEiRCCbWrl8se8eNysDhpX zWe8kBYY5u2bUcVCn4uKz7cmQldSHTlf8KfspU793Y4Hm5yDKI6zrcIBhTlmHS+BMQim JhVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:reply-to :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=dizPcrD7xaXzAQLAnOvA/lJAJfB2ho1YY43Lw3GIZ2w=; b=OxkVa30qY3/PCeuhCbtpJc427+XUHl8GrGpqWhiIQkkHwx9kdIVa8aqiV4HU85uBHc C7hl/+t58Po4vHxG/GQFo6ksBFBBDNcUVLC2+RfxjiKt3gdm4NDnT2m103g283oKjXNl g2rsqpkf46kR/JZRoujwsKe5oknjAO1QND3cPuXxK2rNRvVRZBUvaD0KvIW3uWKcad7N ehMWMZPoE1u9+lebzlPOtJpxZGpLbnaht97S07pOGqowofmGtHyA8i1eqc8k99qho74B y9pFT/nvvx89ROTZ5VbhoiMMv1KwZlrqD82C7EEd4ac6syQ7qL6CHu0xB+l2ZbmqPSs+ rHCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Lq3WwTdr; 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 i11-20020a1709064fcb00b007314bba0e9bsi2604517ejw.353.2022.08.12.11.10.04; Fri, 12 Aug 2022 11:10:30 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Lq3WwTdr; 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 S239532AbiHLRhU (ORCPT + 99 others); Fri, 12 Aug 2022 13:37:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239596AbiHLRhE (ORCPT ); Fri, 12 Aug 2022 13:37:04 -0400 Received: from mail-ua1-x92f.google.com (mail-ua1-x92f.google.com [IPv6:2607:f8b0:4864:20::92f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B94D0915DF for ; Fri, 12 Aug 2022 10:37:02 -0700 (PDT) Received: by mail-ua1-x92f.google.com with SMTP id z5so579301uav.0 for ; Fri, 12 Aug 2022 10:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:reply-to:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=dizPcrD7xaXzAQLAnOvA/lJAJfB2ho1YY43Lw3GIZ2w=; b=Lq3WwTdrt3jfthJq/u97yFXe4RHqde540SLRAxlnszttUC7h5f60tyX14x0KSDc5LX 4r0zkBPbxqJXcnnsJ4ZCBXJvdBw9RVCuhLMIdoAY7UqsTDGaqJdqWVXVgSn7RzkaLGAp jObndePyxg+TK2DFK/BdCyLVIaFg/UuyX2a+WKIuaMi3ZQJ0aF00PCaQMTSc6n32iPTc AxpmSQeswsUV1kS3nnQt+sp1rLUHCLv9b5AJQSsrudXvlk13uhOz2VVfAQO/x5OiM8x4 7mD/gT7dsrRvKAjl+zD0iZdCCXAHLWRxIKe+92BWgZe+69WQWAKkllth9/Y9qRuIX+iy Kkvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:reply-to:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=dizPcrD7xaXzAQLAnOvA/lJAJfB2ho1YY43Lw3GIZ2w=; b=oti5OOba/YdhnTwJ6pNO653bYi8vC5j50WSNuKsPHMQ6o823lFQHWA8AzyY6P6PY7d 2/sc2wEOP8KIXCz+YO5UUk148WZeDNWcf6xV3Bdtgj4NLGXNh7muo8lB4FPzWh4ofCnw 3sGnmmHqHq2b8MGL8dWq3XqGgbH0+L/KByD5jiieoYVUrqiI3YlyEBU7xQKMf9Cd351X PeuXBvUP+37IUh9qcF8acjSMqJVVWvsuWwPi8BN4txroK9teI/4IrLAuQP+JWawzZwgH nSR+W5cOAabXVDz8hmcdkq42SGHeBzVEsPuE/8URW7gXRjZjOdYzWeoGUFSt9rB0lpLJ 68EA== X-Gm-Message-State: ACgBeo3rvTuEFNgdq1DC1hZQbKVs9fOcGOwB4V4KrSXcAKZvv4Jjnavx UE3upjCSPGtDet0QMdrUpYp9xCwvl3hdIw== X-Received: by 2002:ab0:6602:0:b0:38d:539:d611 with SMTP id r2-20020ab06602000000b0038d0539d611mr2406701uam.103.1660325821392; Fri, 12 Aug 2022 10:37:01 -0700 (PDT) Received: from ?IPV6:2804:14c:4c2:8202::1003? ([2804:14c:4c2:8202::1003]) by smtp.gmail.com with ESMTPSA id g19-20020ab05993000000b00383fbaaa7d2sm121055uad.22.2022.08.12.10.36.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Aug 2022 10:37:01 -0700 (PDT) Message-ID: Date: Fri, 12 Aug 2022 14:36:56 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH] drm/amd/display: remove unreachable code Content-Language: en-US To: Jiapeng Chong Cc: airlied@linux.ie, Xinhui.Pan@amd.com, Abaci Robot , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, daniel@ffwll.ch, christian.koenig@amd.com, alexander.deucher@amd.com References: <20220812031911.62729-1-jiapeng.chong@linux.alibaba.com> From: Tales Lelo da Aparecida Reply-To: 20220812031911.62729-1-jiapeng.chong@linux.alibaba.com In-Reply-To: <20220812031911.62729-1-jiapeng.chong@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi, On 12/08/2022 00:19, Jiapeng Chong wrote: > drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c:1658 dml32_TruncToValidBPP() warn: ignoring unreachable code. > > Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=1894 > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- > .../drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c > index 05fc14a47fba..0758e1da55a9 100644 > --- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c > +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c > @@ -1654,10 +1654,6 @@ double dml32_TruncToValidBPP( > else > return DesiredBPP; > } > - > - *RequiredSlots = dml_ceil(DesiredBPP / MaxLinkBPP * 64, 1); > - > - return BPP_INVALID; > } // TruncToValidBPP > > double dml32_RequiredDTBCLK( Seems correct. Reviewed-by: Tales Aparecida I feel like RequiredSlots is not actually used anywhere in the code, just passed around dml32_TruncToValidBPP() and dml32_CalculateOutputLink(). I've looked for any mentions of it in the mailing list, but could not find anything that implied it's part of ground working. I wonder if it's something outside the Linux tree for other platforms or related to HW gospel.