Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp406712lqh; Sat, 4 May 2024 06:13:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW9SB0a4l9N28baKmdPuw5oHalPGO16O4bikqJ4YOmIhxqfBOUssyEMeQjvLfED7VlCCHXmAkY/cqSkzBjS5Rf+YdMbChjR/TMmBum4hw== X-Google-Smtp-Source: AGHT+IFoxzDl9dE5ZFCi7IJq8I8aUd+7D89ESfkWE/Bwv/8wTE/u4Cphf5yMkQHjL9r9JqzJCmB0 X-Received: by 2002:a17:90a:bd87:b0:2b2:74c9:192b with SMTP id z7-20020a17090abd8700b002b274c9192bmr5281216pjr.40.1714828394412; Sat, 04 May 2024 06:13:14 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q19-20020a637513000000b0061e2f6cd627si2647327pgc.162.2024.05.04.06.13.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 06:13:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168669-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=V349u3hI; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-168669-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168669-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 1BA82B216D1 for ; Sat, 4 May 2024 13:13:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A80AC2557F; Sat, 4 May 2024 13:12:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="V349u3hI" Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2083.outbound.protection.outlook.com [40.107.249.83]) (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 9CE2B4A1C; Sat, 4 May 2024 13:12:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.83 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714828377; cv=fail; b=Kg6++inJDR5ulm8dMxW4kBW1az63A864OB8IPbH66Iokt+oOnKS3RrQMYgqpmEkQMxyOJq+SnEycY9K8fHqJJpuZ6fPiHGhpn8FwwALXMlgjtuyk7S6s9bmAXFpybSVAXzJb4Ny1Pdpe4rKzrjbO+IlvqOOJrrnMh2uz7TFNk/I= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714828377; c=relaxed/simple; bh=O584+LvuF4pyN3SkcooP3Ifi0UGy7KBPUUWirXlIAaY=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=R/dx8IkvkYAlMaHqmWB9omBNWhl/QC37Ta6rgLKap/R3IM2MR67r21shHESFNlIbgzdBgsYp+4hP/bbLEtSi41Oyw4i8EbQ9/a3VE3FO/pahW+Bo/VrOXwu9Aa9UZLlNosRJK5CsyYbJ3CDDP4nMteno1LzglHpTLvX5JsDSBPU= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=V349u3hI; arc=fail smtp.client-ip=40.107.249.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PsBZCp9Q2DoZaI+7hZlpN4AV3qyDi6yk7j7xxI7aGPT+2QAuqBU8BWUZRtyjv5ta58Tjp0X17Pj4FUsFIUhwx6616LxpbEML5R1Ge0fKCdWbw8EiidXONIprB2Xp01fjzqw20PD/0PwOIvndEJM96+EMEmTohkJ1lWum4EBeydMmKGozTV4yYBXpD5+8N9JKmqqkt7bbmuA0ZA5si/2/imZivs5R8QM/eyZf5o/7FJahC7Ymfg5h8X6hAcOHR7+YWkS0MBYx2zi0C9eorle4yqBpsSs8nmrYHAVjEjwPJmNjk5roVvDrL6UfzL/+YfLoASCQ4gI7MUA8tV55yPaq8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9XH/O68wWJ/FfHgYL+Kkys96wwEpB5Ik6VZZUTwb4Mw=; b=TWncYo9doring7vInD062OrPa8mLEYYPnQHCKdGMbQ4nwgay/lYItCeIzbuggHKlNeECzTvi9foYcxGeNknjR9IKymosX2iGWN8xXy73U3+Vu9K3QAQiGswibNii9Q+Nl4hSw08IndO6k0s9Op6HkrTJGjGDRKJQ+kZyhkic4EtI1aecDrvzQqv0Fb4bjZNBMkaGuyfL7i+MInmsqksnhJ3OvHNDCCSWhMVtfLv0/T5HM7BX5LNVZ+2yeTLknS21cBk39N0cqWvodUUDth9uBOxs+94yeIjQDuL8vdtdoGxjSDbkekeqyB4bs6/uNcq6ToVOHx3LjaWqiIvORVZd3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9XH/O68wWJ/FfHgYL+Kkys96wwEpB5Ik6VZZUTwb4Mw=; b=V349u3hIj3jx8cbwqgkcfFeYcAviXPW4lFmxDNc1jpRnCj3N2UqV3+1FNPMZisxIMljtshFftZvf9/CqPZF/gwdakXv3n++Lu4Sy9MydaP1a/VvfeQHrAQFT2+jWoV4WSZYvwvdlm+9h7N/D5atkTpy3EcMi0t+yX1XnvLDWNo8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by PAXPR04MB8174.eurprd04.prod.outlook.com (2603:10a6:102:1c4::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Sat, 4 May 2024 13:12:52 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d%4]) with mapi id 15.20.7544.036; Sat, 4 May 2024 13:12:52 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 21:20:00 +0800 Subject: [PATCH v2 02/20] pinctrl: tegra: Use scope based of_node_put() cleanups Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240504-pinctrl-cleanup-v2-2-26c5f2dc1181@nxp.com> References: <20240504-pinctrl-cleanup-v2-0-26c5f2dc1181@nxp.com> In-Reply-To: <20240504-pinctrl-cleanup-v2-0-26c5f2dc1181@nxp.com> To: 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 , soc@kernel.org, Krzysztof Kozlowski , Sylwester Nawrocki , Alim Akhtar , Geert Uytterhoeven , Patrice Chotard , 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: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-samsung-soc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-riscv@lists.infradead.org, linux-mediatek@lists.infradead.org, imx@lists.linux.dev, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, Peng Fan X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714828815; l=1919; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=dgr9gEpDJDvikxHa9ZakH2O4ug/ULsl0qx1MCE8QJXg=; b=c29ur0xozBQHWw4UNa1DPvMPB/3nv84hzDNq2CwMxaS5GG6IYyoT0/JK1IrVkkQRteonbSNKJ JhK2UeiCgPTAeUzI40ur2LqqsCNKyNGdObHFdFgxDDw3tA05J72cW0s X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR06CA0230.apcprd06.prod.outlook.com (2603:1096:4:ac::14) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|PAXPR04MB8174:EE_ X-MS-Office365-Filtering-Correlation-Id: 567fafd5-b163-4390-58c8-08dc6c3be7cc X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|7416005|52116005|1800799015|366007|921011|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?eWFCYUFwMG4vWGFpQ0xWbU5MS1R6STQ3V0xVSWhuSDgyUUZ2WTRUd09zajhl?= =?utf-8?B?anNJa2wydXY4SWxKamxLMzdBemQ4a3UrZG4rWVZiYktRZmNDNENBNzdwQTRZ?= =?utf-8?B?aGdkeFdPdHEvaGRPdWVrNGhCeTB5dXBiSi81cm9ueTh1QjNoYnBIVVZMZ1NN?= =?utf-8?B?R09EamtuYmZCUVlyTVFIZE92VUlGSEtBalBvaTBmdU05TTNJdUpEd1JuRGZH?= =?utf-8?B?cFVXVlprQS9kdDR6RndjZ2RGWlpPYlo1bWtJbS9UeHpIbzU1aXV1c29DeE5V?= =?utf-8?B?NUI3YzhPSVVWb3QvU1BqV0t6RFB1T2pnMVZ5KyswajlJK3paYjFHR2dFMlVa?= =?utf-8?B?dUxhaitxMXU1T252OTRWN1p0K2txVllhYU9ZY01rcG5MbUZxQ3pyTjg1UjhL?= =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g5UHV2S2phZENMVnM0?= =?utf-8?B?UEJoZkJreTJvY1dkSkQwV2pMeU9LbHc4TXkrcGJKdXF4dHFCbU92bVJ4ZFN5?= =?utf-8?B?N2xSSmkwWEdRMWEyb29qbUF5YkxrZk04RG9YcEVhOTN4NU5rY2tzTCszOXY1?= =?utf-8?B?Tlk0N0VaS1FLd0hYczZ6b3NadEJ1OCsrWVN6V05HOFNxa0tPWld1OElndjho?= =?utf-8?B?azV6cmtWVktMUzY5R21QU3RTTzQxQWRVNVBnM0MyLzRpZXRzSWV5VGVobDlZ?= =?utf-8?B?SnVqUWJKN1RYK2Vza2ZGWCtnL3ZIQjk0UytFNThSRWVpc3FlTCt4WnNvSlhY?= =?utf-8?B?RldlOTBJQm5ERVVab0xndjllTEFMbjgrclkxVkU2VEN3ajAzU25lOGJTbytN?= =?utf-8?B?cmt1MzdtYVdUNUhVdkIzN1lPZDM3VXptemdMdGJVd1RXait2Q2N4MmgrWW95?= =?utf-8?B?ZWV0R1FGMG96UDBibThoSnl2ZUJTdnVwVnI0QzNjOE8wanBPaHFLM3lpSFN3?= =?utf-8?Q?Jz9zlJ2KTyW+xF7/VV/sgvG4n/64eu/1Yot4I=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(7416005)(52116005)(1800799015)(366007)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?a1h1TDRUL28wRGlVYXFUME9qaGRPcjg3NjdJZ01IUzREK2M2TWxiKzVRM0lC?= =?utf-8?B?YjBDUnpQTEo3NjJHZGZtVU9YbklNQkFHMjk3bjZXV0tBMnZPcEMzY2pIcTEz?= =?utf-8?B?Q0lnN2ZsMG1OcXNLZjRyZTllaTllUmZVUVBUYnN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RxbGNqVUVsblZ2enI0UjJBSmxvZ2lNR0dFYlFJZTI0dzZsVlZv?= =?utf-8?B?VTFPNUFWRXJoYUVlQ1NSRmJzSERVNnFINS83OURvZ2JyWTdzS1lLdlZoSCti?= =?utf-8?B?QU03ZE5xYXNGeWNaeG1LN0pLQTB2ZndVSHZFK0JZNFN4ZWRFYnpDYmlpUTE4?= =?utf-8?Q?yHAQlzlKBuX+yVMuGIUrVeoC+?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 567fafd5-b163-4390-58c8-08dc6c3be7cc X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2024 13:12:52.8610 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4sy0/+akhGM1b/xMzo7AidLZmxf7iqXZJ2mOFSl12FWS2ISjCqiAQ+I1mwlX0irAQsix20v/1FTiNUyCDxWpQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8174 From: Peng Fan Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan --- drivers/pinctrl/tegra/pinctrl-tegra-xusb.c | 7 ++----- drivers/pinctrl/tegra/pinctrl-tegra.c | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c b/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c index 96ef57a7d385..49c5edeba87f 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c @@ -238,20 +238,17 @@ static int tegra_xusb_padctl_dt_node_to_map(struct pinctrl_dev *pinctrl, { struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl); unsigned int reserved_maps = 0; - struct device_node *np; int err; *num_maps = 0; *maps = NULL; - for_each_child_of_node(parent, np) { + for_each_child_of_node_scoped(parent, np) { err = tegra_xusb_padctl_parse_subnode(padctl, np, maps, &reserved_maps, num_maps); - if (err < 0) { - of_node_put(np); + if (err < 0) return err; - } } return 0; diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers/pinctrl/tegra/pinctrl-tegra.c index ccfa3870a67d..c83e5a65e680 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra.c @@ -188,20 +188,18 @@ static int tegra_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev, unsigned *num_maps) { unsigned reserved_maps; - struct device_node *np; int ret; reserved_maps = 0; *map = NULL; *num_maps = 0; - for_each_child_of_node(np_config, np) { + for_each_child_of_node_scoped(np_config, np) { ret = tegra_pinctrl_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; } } -- 2.37.1