Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1370735lqa; Mon, 29 Apr 2024 06:53:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW3DbLOQY/e9fcQZi7Tz2BNisoFIHACREpjVx/bTpWK9LVCcbe11ZOr7zj6dXPa3MuDfef7Kr+AC+cNMZElJjtWaaQKAJw2nl/bton7Dw== X-Google-Smtp-Source: AGHT+IHQVmJiuzITVqlt2tZtbCea2+p1Sppx/03W270f/rV9WoGXhOF2XoK/c7t//8ijgwQO0rvS X-Received: by 2002:a05:6870:b692:b0:238:fd65:5415 with SMTP id cy18-20020a056870b69200b00238fd655415mr11376000oab.37.1714398809022; Mon, 29 Apr 2024 06:53:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714398808; cv=pass; d=google.com; s=arc-20160816; b=f/Hcqxl4zvJRkHbwzTPYamKCdBeFh2zExRMxPYVhoWqORVWM1vMmnB+cmfcfTYZX0B 0mFFW2GWDdAVpugeE+xxrJTxran1R3j+CGi1AhnOpDE72SK6ac4lNPcXLvIyo6kiec2E bZI77eAsvJ56T0BAgsxrfcAVe3iqgbH5DljC4HuiKuXdrALtlwKIroylJRE0sVz7yPfs yOtpCf6baoB6OKvJ4wp8F63bfUcLUavHDPBKwzEv+0OMAOwx9BFe9ccZNSiq5wM07l0g 76pXlzLGEK+pKskpfL685vgYls7u3Dz/MX4nHXLqbXXW3fAtMxx53sJlV5QNtesJEFD7 DUmg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LxNykgoDW+wZXvW69jR9IeV/J3acs09jRwsW1fR/Vn4=; fh=xsLR/uL3nZtnAu8NTuuBJ0x9RRJqFSLNt0VJW/WSwkU=; b=oQQedEv15FnXU6CmQ6bmVc37W9gRi+xd0tXjpKMDGzt3992lmV3cjfqN1yfSwGAPhP DW3Z4p0aFttv5R681Cq9roGGsQifYrG7scKTZzf+ZKHLF6/ZnAPaW2oB3y1REYKI9Y+h O50xNCmsom5lBYgusLdceGF+LPfXlncDnHgzRmbW17zZ5I+DpEA5IubEUrTP79VVwysE ita67w0+pmsLov9jZxcuF0842vbbhhtZ2L4NQYw3J5jnRi3J6CBc4t93GX4FaDmtvk+3 4c5ROw2XwNzrCEmTHEZ0UR0rx8kFWlhcQwgRwUrpskdoMQtqrSULGvkZ1PKvCT1EWkat W0rw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=C17eIb6x; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-161959-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161959-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u2-20020a63f642000000b005f7518f27b5si19303759pgj.470.2024.04.29.06.53.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 06:53:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161959-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=C17eIb6x; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-161959-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161959-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9CB892831D8 for ; Mon, 29 Apr 2024 09:05:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5BD3929437; Mon, 29 Apr 2024 09:04:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="C17eIb6x" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E862F2941E; Mon, 29 Apr 2024 09:04:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714381462; cv=none; b=DBWWw6DVf4yhrLem4FS2unWYyGhcUZuJuFi1sZfMRnyfXM1y1bHgyrERvBuLTw042/1PuEbLuvj/1Yo3z6gUu4Qg7hHULzHIIjlpdhvdsfMmgfWY6nflFimD+Noz/aS/vv7fk2EBh8iDmTL/Ho8fzdxwKBp52P2J+8Xqhai4A6U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714381462; c=relaxed/simple; bh=TXSIpzhjWOqDlZ9ZndMS8MVcT2vSwGprAlf2ys/5PIM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NAH1PTnmsdaE/FwFyL2wWzqGdpdO0OwvSS22RLlPhszzYIbCOm8uqjn+yIvmYEeXeoqoYimF41Z2SpAkmA3qsZzL/huJVi53LlMcT/xTUSBertwf4PNn3AlAbuI4D5lAURFRZoKB9KsmzzzTpvQw7jP0oPCoLAqeHQxASqGJB0w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=C17eIb6x; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714381461; x=1745917461; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=TXSIpzhjWOqDlZ9ZndMS8MVcT2vSwGprAlf2ys/5PIM=; b=C17eIb6xdRruGDSzx7yTDGmjilZNUvAWgXp/+hBeuM5U0PBnMrzzFiIH AR/e6qJzyXq/soLvo0YS19zEfri+3YFkLoV6Mz5ORWafiUO4zXquEAF2b EpZ02dn2smMvZrJmCAyveg32bUkinAN2iREPHybtDnd8mZtwGHBbD2HlY NJfK8HvDkQjhWOtZYpGDdzhJuz3rbfpj3jCEXTWWV72kGNATUTUSBZtPF S2wt6NFTzXF9SpyusOMSdxSSF0Nbt27Yjhz07OB8l1HezxqWoV1WtNnYB eOSK+mH1UDe4hHriTEhV2yAdvLpWlPn5w2djFoVSorkT8w02KnlnubT60 A==; X-CSE-ConnectionGUID: Ld+zyqrrQvKehUb0X3SeGw== X-CSE-MsgGUID: sVNa4dxZRhO7At5HJYlpnw== X-IronPort-AV: E=McAfee;i="6600,9927,11057"; a="13821464" X-IronPort-AV: E=Sophos;i="6.07,239,1708416000"; d="scan'208";a="13821464" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2024 02:04:20 -0700 X-CSE-ConnectionGUID: qt6AXxPETF6DdR1M12fUcA== X-CSE-MsgGUID: khqWJ2hNThe2JHDXARiQPg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,239,1708416000"; d="scan'208";a="26122823" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2024 02:04:17 -0700 Received: from kekkonen.localdomain (localhost [127.0.0.1]) by kekkonen.fi.intel.com (Postfix) with SMTP id 4C59311F830; Mon, 29 Apr 2024 12:04:15 +0300 (EEST) Date: Mon, 29 Apr 2024 09:04:15 +0000 From: Sakari Ailus To: Benjamin Mugnier Cc: R Sundar , sylvain.petinot@foss.st.com, mchehab@kernel.org, Laurent Pinchart , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, javier.carrasco.cruz@gmail.com, Julia Lawall Subject: Re: [PATCH linux-next] media: i2c: st-mipid02: replace of_node_put() with __free Message-ID: References: <20240427095643.11486-1-prosunofficial@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Benjamin, On Mon, Apr 29, 2024 at 10:52:34AM +0200, Benjamin Mugnier wrote: > Hi, > > Thank you for your patch. > > On 4/27/24 11:56, R Sundar wrote: > > Use the new cleanup magic to replace of_node_put() with > > __free(device_node) marking to auto release and to simplify the error > > paths. > > > > Suggested-by: Julia Lawall > > Signed-off-by: R Sundar > > I was not aware of this kind of auto release mechanism. Thanks for > bringing that to my eyes. > > Now I looked in /drivers/media and couldn't find such structure. All > drivers seem to follow the goto error_of_node_put style. > As I'm unsure if we want to introduce such magic, could either Laurent > or Sakari comment on this ? It's new and little used so far. I don't have concerns using it, although it's mostly useful in cases where all exit paths release the same resource. -- Kind regards, Sakari Ailus