Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2103834pxt; Sun, 8 Aug 2021 11:38:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYy3EwYe17FYwsCg5eeg4iyT2Nz2eeaVH//J1Q1QNmXVwGVxPiUz4ftG0My80igVd3Idom X-Received: by 2002:a17:906:260a:: with SMTP id h10mr5949067ejc.498.1628447881770; Sun, 08 Aug 2021 11:38:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628447881; cv=none; d=google.com; s=arc-20160816; b=exYT5cRw0ORYdKSJgLWMjjMowbjthEe6kAaCuIIRuYf8PQ5HSIs3EFUl4YW1/reqnQ KpxsFqF3rnAEqY7FMzN6Gni8GpwdZBw5K/an/G0axsFd855eV9XBb3hq30Fbjx4g5a1G VLKsXSTUMBn71MpNNGK1eldOxBA6w7YgcWPaRXSifrk1tJrVf0jD7AA6XrghTcsEJl/Y u1EI4m8F1QA5YKhqcYWZH4sPYSTTrubXng9WBmouepnGPwPfl1agqTYMyqd4i7m1S6nu 5tndxrQ2BgJv9Sgfhvo+vn7rBqNp+tu16MfXuZ3iPNeoPwXeOO4dXpEvj1IohtLTfzKa b2zA== 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 :references:in-reply-to:message-id:cc:to:subject:from:date; bh=Pqm2CAK+2PKH9bVnInQYV0AWWIhgrqxJMG5gCGxNB6I=; b=v8ylA/8Af2WVFzUYRAWAYZMHROkfpclvblxvzefVpnWBFCc46EOjIA9pLN4qXhh07y WtLmKiONYTSBxss95LjNL4EDT7ygDugFQVqhVBeY5cpi5X8pHW8B52zs6NvzENrFAM0f aRkXrRc+G1TLvgKBUAmUYVBtvAh4ElqWwOh5ogUEEnm/1cfKE5cjO4RXRSnHGQFlX7Yi 9QRFtZuabp4w++XvIs4ApXkavz217UIbDHu8lWukWgwtgknVNoLAjGp5phb+Z7VSoP14 /oOg7U3EI/25ekCaLzqlvMAQa0sUfsnA683rkSpE71j/4OG+pW4ZZ4NlWi7iEunYX2qo UNjQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p31si17901978edb.554.2021.08.08.11.37.38; Sun, 08 Aug 2021 11:38:01 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232209AbhHHSeO convert rfc822-to-8bit (ORCPT + 99 others); Sun, 8 Aug 2021 14:34:14 -0400 Received: from aposti.net ([89.234.176.197]:41390 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229977AbhHHSeN (ORCPT ); Sun, 8 Aug 2021 14:34:13 -0400 Date: Sun, 08 Aug 2021 20:33:45 +0200 From: Paul Cercueil Subject: Re: [PATCH 1/8] drm/ingenic: Remove dead code To: Joe Perches Cc: Thomas Zimmermann , David Airlie , Daniel Vetter , "H . Nikolaus Schaller" , Paul Boddie , list@opendingux.net, Sam Ravnborg , linux-mips@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Message-Id: <98AJXQ.3ASLLMR2SY4@crapouillou.net> In-Reply-To: <5a003da4e38fcb50782664496fc37b84773a7813.camel@perches.com> References: <20210808134526.119198-1-paul@crapouillou.net> <20210808134526.119198-2-paul@crapouillou.net> <5a003da4e38fcb50782664496fc37b84773a7813.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Joe, Le dim., ao?t 8 2021 at 11:27:34 -0700, Joe Perches a ?crit : > On Sun, 2021-08-08 at 19:58 +0200, Thomas Zimmermann wrote: >> >> Am 08.08.21 um 15:45 schrieb Paul Cercueil: >> > The priv->ipu_plane would get a different value further down the >> code, >> > without the first assigned value being read first; so the first >> > assignation can be dropped. >> > >> > Signed-off-by: Paul Cercueil >> >> Acked-by: Thomas Zimmermann > > I think this is at best an incomplete description. > > How is it known that this priv->ipu_plane assignment isn't > necessary for any path of any failure path after this assignment > and before the new assignment? It is only used in the .atomic_begin and .atomic_check callbacks of the CRTC. These will only ever be called after the call to drm_dev_register() which happens at the end of the probe function. Cheers, -Paul >> > diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c >> b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c > [] >> > @@ -984,9 +984,6 @@ static int ingenic_drm_bind(struct device >> *dev, bool has_components) >> > priv->dma_hwdescs->hwdesc_pal.cmd = JZ_LCD_CMD_ENABLE_PAL >> > | (sizeof(priv->dma_hwdescs->palette) / 4); >> > >> > - if (soc_info->has_osd) >> > - priv->ipu_plane = drm_plane_from_index(drm, 0); >> > - >> > primary = priv->soc_info->has_osd ? &priv->f1 : &priv->f0; >> > >> > drm_plane_helper_add(primary, &ingenic_drm_plane_helper_funcs); >> > >> > >