Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 526AEEB64D7 for ; Tue, 13 Jun 2023 14:00:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242238AbjFMOA6 (ORCPT ); Tue, 13 Jun 2023 10:00:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239765AbjFMOA5 (ORCPT ); Tue, 13 Jun 2023 10:00:57 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A362AD1 for ; Tue, 13 Jun 2023 07:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686664855; x=1718200855; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=tAh99JUXh8iN/kbv+kwo9H253p9unrV8ZU6snblfdzY=; b=CIgG2Lh8sRXx9INJVgatquAJbHQ4+jtj+1lAgyDCjFzlHidoZ5ifwttO ti8aYULYXEj/67Gxlhgx7AhkJNpljyQqWqztxWmcWf6F6p6wSMdzYRJZ2 sGsGs5sZYBlHTa+RJvsey9X8/w5PfjpNBrcEQDxsWmLPCkYRwtM4yjKvY eDIsfhg9Xeqt+T2j8RyKtPQPs2CJ6f/2owLa5TcbETsehJI2XQ9PXA9MU 25nk4pmlUtzAoDbtrvlk8euscX+x0sfACsM2I1y5cDtM4bXQNlV4eFuER l1deiWN2ytNPr9vL93+2KzuiIZrI+wtPnNLkYuM4n7Xuazh383GWWl9h4 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="337974825" X-IronPort-AV: E=Sophos;i="6.00,239,1681196400"; d="scan'208";a="337974825" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2023 07:00:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="744704654" X-IronPort-AV: E=Sophos;i="6.00,239,1681196400"; d="scan'208";a="744704654" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2023 07:00:46 -0700 Received: from kekkonen.localdomain (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with SMTP id 5AF5012190B; Tue, 13 Jun 2023 17:00:43 +0300 (EEST) Date: Tue, 13 Jun 2023 14:00:43 +0000 From: Sakari Ailus To: Laurent Pinchart Cc: linux-media@vger.kernel.org, Philipp Zabel , hverkuil@xs4all.nl, Francesco Dolcini , aishwarya.kothari@toradex.com, Robert Foss , Todor Tomov , Hyun Kwon , bingbu.cao@intel.com, niklas.soderlund@ragnatech.se, Kieran Bingham , Benjamin Mugnier , Sylvain Petinot , Eugen Hristev , Nicolas Ferre , Maxime Ripard , Rui Miguel Silva , Fabio Estevam , Bryan O'Donoghue , Sylwester Nawrocki , Dafna Hirschfeld , Hugues Fruchet , Yong Deng , Paul Kocialkowski , "Lad, Prabhakar" , Benoit Parrot , Steve Longerbeam , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Marco Felsch Subject: Re: [RESEND PATCH v3 07/32] media: v4l: async: Drop unneeded list entry initialisation Message-ID: References: <20230525091615.2324824-1-sakari.ailus@linux.intel.com> <20230525091615.2324824-8-sakari.ailus@linux.intel.com> <20230530024650.GH21633@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230530024650.GH21633@pendragon.ideasonboard.com> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi Laurent, On Tue, May 30, 2023 at 05:46:50AM +0300, Laurent Pinchart wrote: > Hi Sakari, > > Thank you for the patch. > > On Thu, May 25, 2023 at 12:15:50PM +0300, Sakari Ailus wrote: > > The list entry is initialised as a head in v4l2_async_register_subdev() > > just before being added to the list. This isn't needed, drop the > > initialisation. > > Is this really unneeded ? Before the initialization and the list_add() > call there are a few code paths that can access the async_list. For > instance, the error path calls v4l2_async_cleanup(), which calls > > list_del_init(&sd->async_list); > > That won't work well on an uninitialized (or zero-initialized) > list_head. I think you're right, I'll drop this patch. This initialisation will be removed in a later patch though, as the list will be redundant soon. -- Regards, Sakari Ailus