From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE016C432BE for ; Sun, 8 Aug 2021 18:33:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D4E3460EBD for ; Sun, 8 Aug 2021 18:33:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232301AbhHHSeO convert rfc822-to-8bit (ORCPT ); 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); >> > >> > >