Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2500741pxb; Sat, 30 Jan 2021 04:48:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxdVIHhk+wCrYyIcGtSWsb6cXod/b//fzNzCHBqlxHGBhWPz1+lJqYIdu2i0pdqP873Ux/ X-Received: by 2002:a17:906:2898:: with SMTP id o24mr8801667ejd.215.1612010907973; Sat, 30 Jan 2021 04:48:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612010907; cv=none; d=google.com; s=arc-20160816; b=NyQ7nbVNNGllhf1HNNsjqlLZjU7ST7q0xumoCYECTD0lInAzlcpH0/tzAr+BdZy/Yp k6lXobn12XVn91uqvFU6D16xaujJ8MhuUkJRkmessvejKDuGDyIyo/v+BwGgYuQZnEbQ bK8cEcol77gX8t0JDD+9KvZRb5htuTUWLf4/1qvK3lW2hkcJ9JEq8Ktaste1VFHGTH68 PFjry5Q9f0o8DfDOVOg9syB1Yto7v/SOzOBKsO26TCKcrEzVt0XqXTytzp9hbumyvd3l nBBxA8oVdMfNnOL9IlhHziK8POoaDz7oH6mqit01K3DrYK56/QIJ1UowLytOJ/5Nh31F yl6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version; bh=gtAImKSHlmX25tW75EwxfZt3eVCOOVaAWgTxltuCXBw=; b=RZa9tcaFvFtJAA8AeaS8CF/Rt64bgWsonClcyQuXl9PxIEB57+WYEr7DWkvN5SmdZ2 OT5L81+JZZDTiya/0OmNIxKEoZCztgO82eOQU9+kayX0lN3NL4ND8oDoZYKsT/dO2HtF NRJSepNVvY3FQ3zLWj4hi6lm32UMypS+KfX0jpnL9XOIiTISdeaP3as0JHw1Jc36LVr3 M1lRkv24mRRG+GlUuenGl8f9Gp3lOryrQnI9g8O3q0EIOZP+pHc6IMLlvbNkCo5/TdxG cQyC73cD1ueTe5RQwefL0eZKNsH59oau/U5Eymw1DJO/IwyWBmKica9VLFNmKhF8/v6v f9rw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l13si860409edj.219.2021.01.30.04.48.03; Sat, 30 Jan 2021 04:48:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231194AbhA3Mp6 convert rfc822-to-8bit (ORCPT + 99 others); Sat, 30 Jan 2021 07:45:58 -0500 Received: from mail.fireflyinternet.com ([77.68.26.236]:59078 "EHLO fireflyinternet.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229498AbhA3Mp5 (ORCPT ); Sat, 30 Jan 2021 07:45:57 -0500 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from localhost (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP (TLS) id 23745921-1500050 for multiple; Sat, 30 Jan 2021 12:45:11 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT In-Reply-To: <20210130123411.GB1822@llvm-development.us-central1-a.c.llvm-285123.internal> References: <20210129181519.69963-1-viniciustinti@gmail.com> <161195375417.17568.2762721732398065240@build.alporthouse.com> <20210130123411.GB1822@llvm-development.us-central1-a.c.llvm-285123.internal> Subject: Re: [PATCH] drm/i915: Remove unreachable code From: Chris Wilson Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Nathan Chancellor , Nick Desaulniers , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com To: Vinicius Tinti Date: Sat, 30 Jan 2021 12:45:10 +0000 Message-ID: <161201071009.32035.9188382145053741268@build.alporthouse.com> User-Agent: alot/0.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Vinicius Tinti (2021-01-30 12:34:11) > On Fri, Jan 29, 2021 at 08:55:54PM +0000, Chris Wilson wrote: > > Quoting Vinicius Tinti (2021-01-29 18:15:19) > > > By enabling -Wunreachable-code-aggressive on Clang the following code > > > paths are unreachable. > > > > That code exists as commentary and, especially for sdvo, library > > functions that we may need in future. > > I would argue that this code could be removed since it is in git history. > It can be restored when needed. > > This will make the code cleaner. It doesn't change the control flow, so no complexity argument. It removes documentation from the code, so I have the opposite opinion. > > The ivb-gt1 case => as we now set the gt level for ivb, should we not > > enable the optimisation for ivb unaffected by the w/a? Just no one has > > taken the time to see if it causes a regression. > > I don't know. I just found out that the code is unreachable. > > > For error state, the question remains whether we should revert to > > uncompressed data if the compressed stream is larger than the original. > > I don't know too. > > In this last two cases the code could be commented and the decisions > and problems explained in the comment section. They already are, that is the point. -Chris