Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp740840lqo; Thu, 16 May 2024 23:12:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWSVoRliEJoX9Ug+TGBAPoj/+oCOH3hEulxU9vDynhLhhIMGE0xnk1b51noe/XYq1DAjly9bqwUyVrix1AF3uyaDlDIEjn8OTKFVpCsjA== X-Google-Smtp-Source: AGHT+IHdnyTbbXkW0GjCT57swD1KtbArhKD41T0D9RglIcBEpVaFbcqrwSkEoIteuuJZA5gprNok X-Received: by 2002:a05:6a20:7295:b0:1af:cb73:c8f7 with SMTP id adf61e73a8af0-1afde10e2ffmr24177850637.30.1715926372935; Thu, 16 May 2024 23:12:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715926372; cv=pass; d=google.com; s=arc-20160816; b=q5P0dH8UBG8HRaeslmaYgiAsztkwczs6cBgo+JPAZA4zZl1Ie62ABZbt3L0qaIJ90E ofNKSxeJ+sHpdnBIo/eQAt5Nc1AwBTq0hnvyt+p/JMbQzZqJA91PR4c6367AGZao/dBN CloMjlo3ZPIuXHhhLQbbgST2CTuQsMzp+yjPpBwSxY+6LqiQurT8CD+WJ2duHDdi7MoE mIxASntmxx84GwIPF3D8BzhgWHEmHCALMHDkeJc2jAyu4KYA/Md0qZ+0MC56l/r8pvqq fIiXU05Wl+YtURaBvlrONUipDKVYbEi8NEhmn2LHme+P6++dOKUph7urJNqGdu4Mar2J 58MQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=J3o804ncxF/enh0kdjgc+0YUwQx2VM+mClNeplniKwc=; fh=+GU34/zUiJa+HVrriqfxbB87cwLEnid1dI1yuZrKSAQ=; b=YyQCT2VabvtKkpakXfE4zNwfX6NNcu9FLQFLuoeVSYZGYFCJtc8X15xNZBpNatj/0z 3L8f4vvSzsSNpskxSxt69nYfp+g83Cwv7+58VYbXf5zQwrZkjYRlsR8C5OkpnFtAOTVg ahAX0IBgInFP96M+VkEScFPiyd3+owWfLtrcZX1ZnZsKRdKVFa47qyhxNf5cdCdx3kR2 NXC0acvTXUkKW0oyvQPM4HP9MdHlXMZIHcZg1O2sQzd0zKCrVbW/xw/MsfoIPo3dseQM c6oZoANmlIGXOjabJYITq91Lhv5dnJGD0luikUC4/DmMrtzSXC8m/bSQv6M71yJzRZud hfjg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=CVxSZy93; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-181756-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181756-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f69123132esi768423b3a.119.2024.05.16.23.12.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 23:12:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181756-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=CVxSZy93; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-181756-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181756-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.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 8EE9C282E56 for ; Fri, 17 May 2024 06:12:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6468613ADC; Fri, 17 May 2024 06:12:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="CVxSZy93" Received: from mx08-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (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 9B3D41119F; Fri, 17 May 2024 06:12:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.93 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715926363; cv=none; b=YeTfJUvW3h0Z4oYWvC0rcEHbmJlljHRErSwrpoMcoziaoA2eZ9h+9QwmEgokAZWVRCqEc04jsRm2oUnKzlfJ2NOX7kfsaatwp0Lh+wFpEtjVY63LAdP3AEl4MOdwEu5m9lGnKp0MtbpR1xU8hMdqQ6omAozBWk2N0Cvd/h0oKGc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715926363; c=relaxed/simple; bh=psIpr9H4AfdZmEK4TRkcE6r9j2iu0e5B7Eq6k2V6VQk=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=c8SKT+Rxa8BMgdprv1E72sMxw7k1DhbcOj3ZGkg2oDhLSyJjuWgD9Dh0T0cYpwNq4+Zs4tiv3/af5+0fuvEok1noMkm42h3iXREWaBZ29MrEJiHbRBa2gxmdrpL8Hv8wGSUL4V2OxZ9vHKhuSDxaDo4yF81dTKJtTvhP43nW1x8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=CVxSZy93; arc=none smtp.client-ip=91.207.212.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44GN0gAM020042; Fri, 17 May 2024 08:12:35 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= selector1; bh=J3o804ncxF/enh0kdjgc+0YUwQx2VM+mClNeplniKwc=; b=CV xSZy930UTX7kDamAv2gi390UDjIU+WfLGT6+qTNZa8Hkd+yJK75cIjojTcNGENLI BZXukHl1cbO+xx0BClOTjP4+RS637PPEZfSGyM5gcLPtlikd9R82kz62BFQCUdjg hg7KKyl1iltJ7WLlSnl73hlsyoLrSH4JScIhCCz5Atn5dnoL4Qog2D57Ukm5e4ei 7lGcFyD2wB2a/S/nX+IftdXds93oxlEx06x7ejgzCNxb1dAlqpVZ9aDQL7DgoNF3 6W7MH/CNQYmJRAhI6UKq5f2XqI/btsPocfwEo0I/o9aUe09mZKEAIhrOAYKJFBSG bWg2Tl1y24/bmqSNujYQ== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3y4sxvr9ue-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 May 2024 08:12:35 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 982E74002D; Fri, 17 May 2024 08:12:25 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 79F8F20F54A; Fri, 17 May 2024 08:11:54 +0200 (CEST) Received: from [10.48.87.62] (10.48.87.62) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 17 May 2024 08:11:51 +0200 Message-ID: <124b75a6-d8da-4e29-8dce-79d18c355ba2@foss.st.com> Date: Fri, 17 May 2024 08:11:50 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 03/20] pinctrl: stm32: Use scope based of_node_put() cleanups To: "Peng Fan (OSS)" , Linus Walleij , Thierry Reding , Jonathan Hunter , Dvorkin Dmitry , Wells Lu , Maxime Coquelin , Alexandre Torgue , Emil Renner Berthing , Jianlong Huang , Hal Feng , Orson Zhai , Baolin Wang , Chunyan Zhang , Viresh Kumar , Shiraz Hashim , , Krzysztof Kozlowski , Sylwester Nawrocki , Alim Akhtar , Geert Uytterhoeven , Heiko Stuebner , Damien Le Moal , Ludovic Desroches , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Chester Lin , Matthias Brugger , Ghennadi Procopciuc , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , Sascha Hauer , Andrew Jeffery , Joel Stanley , Dan Carpenter , Tony Lindgren , Stephen Warren CC: , , , , , , , , , , , , , Peng Fan References: <20240504-pinctrl-cleanup-v2-0-26c5f2dc1181@nxp.com> <20240504-pinctrl-cleanup-v2-3-26c5f2dc1181@nxp.com> Content-Language: en-US From: Patrice CHOTARD In-Reply-To: <20240504-pinctrl-cleanup-v2-3-26c5f2dc1181@nxp.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SHFCAS1NODE1.st.com (10.75.129.72) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-16_07,2024-05-15_01,2023-05-22_02 On 5/4/24 15:20, Peng Fan (OSS) wrote: > From: Peng Fan > > Use scope based of_node_put() cleanup to simplify code. > > Signed-off-by: Peng Fan > --- > drivers/pinctrl/stm32/pinctrl-stm32.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c > index 978ccdbaf3d3..a8673739871d 100644 > --- a/drivers/pinctrl/stm32/pinctrl-stm32.c > +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c > @@ -670,7 +670,6 @@ static int stm32_pctrl_dt_node_to_map(struct pinctrl_dev *pctldev, > struct device_node *np_config, > struct pinctrl_map **map, unsigned *num_maps) > { > - struct device_node *np; > unsigned reserved_maps; > int ret; > > @@ -678,12 +677,11 @@ static int stm32_pctrl_dt_node_to_map(struct pinctrl_dev *pctldev, > *num_maps = 0; > reserved_maps = 0; > > - for_each_child_of_node(np_config, np) { > + for_each_child_of_node_scoped(np_config, np) { > ret = stm32_pctrl_dt_subnode_to_map(pctldev, np, map, > &reserved_maps, num_maps); > if (ret < 0) { > pinctrl_utils_free_map(pctldev, *map, *num_maps); > - of_node_put(np); > return ret; > } > } > Hi Reviewed-by: Patrice Chotard Thanks Patrice