Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp445851lqm; Wed, 1 May 2024 05:52:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWb9Viq2as8mS2og/6gWaLcXPw+snhnYNLH9B9TlcN3F6zxXul733yQ3Ee5xeCIjJO4/KW68ToK4uLLpr4KYvEyVnSo+Km8nt1NVx/cKQ== X-Google-Smtp-Source: AGHT+IEO7Fk8wY2fxWcns17/LA/D7C1X9NWvjXVZlvoKWATmSwgN21ux9rB1n8cgaOIYninhV74w X-Received: by 2002:a05:622a:1652:b0:43a:c0c7:a218 with SMTP id y18-20020a05622a165200b0043ac0c7a218mr4672688qtj.33.1714567970519; Wed, 01 May 2024 05:52:50 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ec16-20020a05622a5b9000b0043757d16df0si27613799qtb.610.2024.05.01.05.52.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 05:52:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-165284-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=ZKYeqlWL; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-165284-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165284-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1E69B1C21915 for ; Wed, 1 May 2024 12:52:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B41BC12AAC2; Wed, 1 May 2024 12:52:16 +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="ZKYeqlWL" Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2047.outbound.protection.outlook.com [40.107.13.47]) (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 6E2DE85C66; Wed, 1 May 2024 12:52:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.13.47 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714567935; cv=fail; b=rOO7RM5OkcC3HmD4LUbD1PeGnhFFmX5gCMFkIE7EahJ/j9lrkUnRaf3pdADxBH+iYdrW6f+RpJGK1DVCsVhYoyHQEocVvMBeMvZUelNApz41YMZeDfWQ6zEp5qFTg1396ANM9/thTsOgq8IEPkaj1//D32fix6zrjaiD948HZas= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714567935; c=relaxed/simple; bh=X8fef6zB8RQgo+UuJGH28YE8D4qstSLlPE2UStayCOU=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=Vt3qaXjzoox9fugqyypYLxfVaVsI3D81Zd5TJzbRg9CRsISRJOAe20Sx2gAGbzBCKq+kK8G4xOwDolWJAdlyVwX5cBP28JZffdnGTo11hI/i7mXiiE2UJ4r4+YaPFfcn1ffMicQZZpEcNmaHXzJ2DC+GOE9n6PAH+Xym/RpCoIQ= 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=ZKYeqlWL; arc=fail smtp.client-ip=40.107.13.47 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=FHKYXhSHTJ9CRRmSXyMxJ8eBbJfoWIPRlZumxz4YH5QTfT5dI7D+Y8O4KDmaMZ9NgmuKvxB5wLooMj3JBPKgQSSJO5D+/Po7N/0IyFud4OQrNb4X15VWEiVo2CL8Hl5Kv5/ijJMOLUS8LclOOO/MSqNjBAW5taaChz+1Wau2zk48XrOB0taMC3wyqkMwf/X0LZq/7X4sJT5yN8QTw11DHvqw7+t/ZEqKk6LLwnx7mu8MfWBahI+VcTPDPwVoKUAbYyh8COb4EFodLjTUIsQbt7w9sqL162/i8pkwae5+FwHlr64t2M9OVqw0sInjz54Z20FwEGEuBwHCiJ6bTuDIzg== 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=jwSQeOuBtaXKgwm8vbTLzd1pc6GMs3D2WpIMolNx338=; b=bTqFgfRXnYWK3gHt2R66SDy2R7ajOl+qz5hjlLUFEb+3gmyv1ZPuEa0VasK/8MDIkU9fgO47zEfYMovP9ocoOJYf7Ms+Guz51h5mIJoP+WZlGmRKqi9SDm/799icLa1ujVDDam09soHWOVXaG7eIzeA5o33Qd04C2KY5e0dBIJW8Li2FSyhUehy+QZV6BR0CHpdypBARFczkmfdXUagwgbcNwjXjJvZPbtSf4FsLgvtrYbfKg4P+yELmVg3LgIcryCpTfGP0r7nR/UlMDEO/wR/4z1qThrSp165PGlr7JYR4B7CiD8ZI71U+gTR3PdeuCpqaa0IkkFCMpj+BkSsIXg== 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=jwSQeOuBtaXKgwm8vbTLzd1pc6GMs3D2WpIMolNx338=; b=ZKYeqlWLS/AdM5XC6NCh8Rp/qCNsPRMQn0dI5CNK7D90agHFXJpnKWO3O4ZsihfG/hms4q248fRvH1ghI2cuuI46OykyXNokFJ1cpiXAQ1iJVBM/qY+5QJAKOHNBmCIiGTuDlDl92XraNhHzQ36uvQTDQz/hQ4zsN5Roz7kvz0M= 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 DBAPR04MB7448.eurprd04.prod.outlook.com (2603:10a6:10:1a6::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.38; Wed, 1 May 2024 12:52:08 +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.7519.031; Wed, 1 May 2024 12:52:08 +0000 From: "Peng Fan (OSS)" Date: Wed, 01 May 2024 20:56:12 +0800 Subject: [PATCH 14/21] pinctrl: at91: Use scope based of_node_put() cleanups Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240501-pinctrl-cleanup-v1-14-797ceca46e5c@nxp.com> References: <20240501-pinctrl-cleanup-v1-0-797ceca46e5c@nxp.com> In-Reply-To: <20240501-pinctrl-cleanup-v1-0-797ceca46e5c@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 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=1714568179; l=3508; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=DsW52PKsk9s0VQOO79Vygj7HmsG35ZlCr2kUzApk7jg=; b=1cdQjjCVZD4XTvl7jD/+3a4DFvCSK+DbvouTIkodDirgS/P5DNB2U/LQnNk0QE9haDZudVF3v E+GOjqUPfNdAbyJ5f1Dr9PQyXKF6GnAn1dpDh7P5hmY2qLKYBSab073 X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR02CA0064.apcprd02.prod.outlook.com (2603:1096:4:54::28) 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_|DBAPR04MB7448:EE_ X-MS-Office365-Filtering-Correlation-Id: c1a8b2ff-c9b0-4825-dbda-08dc69dd8302 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|1800799015|376005|7416005|52116005|366007|921011|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?LytVbVNYUWtkQ3ZBSDd4YXpCK1hLVkhvWTFMcDhDZTh1dmk0U1IrelJFZnNQ?= =?utf-8?B?Zm04ckZ3SVo4eFJPTlFhVUxzSjcvZy9NbHVBb3dSZGxNTlVzM0RlazRHWnB0?= =?utf-8?B?czVxNkd5TEFlWHBYY3BJUldVYlJqVjhCUUovZmpRclorbFFFcWpMUEgxSEVa?= =?utf-8?B?WXhIVnkrZjEwWFVXRldzaDlVSkpmZDI5RktHUXRPUEN4ZHlyTWwyd2hCTDFP?= =?utf-8?B?eHk1NnNCNmgwZm9TMHRkdjljeVBUV0JLd01Ncysxdi9ZMHNtSlY1bmhjUFk3?= =?utf-8?B?dy9CN2NjTXdNVEdZa3VZNDBjaXBnRmx3TVo5U1RCMnQ3dVRVL1JabG82VzZt?= =?utf-8?B?UWt1ckpVNnYvVzlFT0VZejVBWHlYWXgwL2VMTVZoVGZ2YkVraFRPK0htN0Er?= =?utf-8?B?ViswblcvekVwNDFkY0FONmxCRmJqOFIy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xUzYwaDhlNkF2T1dWT1d0bE4waC90b05ray9HNnU0dlNrNGh4?= =?utf-8?B?QjhwdVE1M0NqZ2svbkVqSkIrb0lEK2x6aFJ0UnVZWGtIUTE3T3k2WlRYeXdv?= =?utf-8?B?MGY1WXh4SDhCTkU2cDgrMDNtQWJJVmZ1dDdyQy83SW5YbnloeVR5OEE1SHd3?= =?utf-8?B?OVpEU05iVWF1STM1TW15VTFYNDNZUmxjVDlMNzNRaFpVai9jY1Y2Z2dBMzJ3?= =?utf-8?B?bGljVjJzZ2RNbmUyTXBvSkQwaFg1OEJjY3g0QTVSZnRhZVBVYnZnN0JUMDJq?= =?utf-8?B?MGxNbU9Kemg5cFhYUm1wVlV1R3dWa0dqTFBKWVlDdFk5dGp2S2JiQ054OHl6?= =?utf-8?B?Vlg1MVdqRmp2TndoeFg0N1JrNlhMVUtaVXNTVjBrSEFQZ1VRNGx0ZHRzanNm?= =?utf-8?B?cVNCeFZIcXhHMjJEeE9xT3Q5WWlXZG1HclFiTk9HKzQvY1g0eFR4bVZOZk4w?= =?utf-8?Q?2ezMs+Llox3dCSwh+MBDAdFOrHToZopR2izXM=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)(1800799015)(376005)(7416005)(52116005)(366007)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UC9vM3NDTFFVMVNqeUNmT0FKM0p0ZlhuT1ZBM3NhR002ZERCc3liOS9EV3ll?= =?utf-8?B?UXJ4SlJhQUV1bVVOSGR4enJvdUVuRDEyUVBHUVQ2ZVdrZ0FXMTR3UDhwaUdj?= =?utf-8?B?aGxwV0FnLy9zcTljRUwvZnJ5allQaEVGR0NRZDJubXJGd1NYTTAzUzlNYTNU?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dTVKY0xTLzYrWHY5?= =?utf-8?B?SlJnaDJZaUJOWkZwQjFERnZyM0lKanFnWlRWZnl4ZlVKejVxRE9kbHlVZnVw?= =?utf-8?B?RVkvTmFndUt4UEZlNythaFpEazI0LzIvSExCNHh0NC82OWhUNzB5WEhxYkx0?= =?utf-8?Q?GlzowYzrVBdjGCrMv5L8Bk4BM?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1a8b2ff-c9b0-4825-dbda-08dc69dd8302 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2024 12:52:08.7592 (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: +p1DJvd9ZG11gV5c3BC+frDLn4qMRBqxL0203eoK/HfYhX4xeIDB+3pmdc02l9InHrExMp4T1fUbWYaVNVbo6w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7448 From: Peng Fan Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan --- drivers/pinctrl/pinctrl-at91-pio4.c | 7 ++----- drivers/pinctrl/pinctrl-at91.c | 17 +++++------------ 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c index a27c01fcbb47..8b01d312305a 100644 --- a/drivers/pinctrl/pinctrl-at91-pio4.c +++ b/drivers/pinctrl/pinctrl-at91-pio4.c @@ -632,7 +632,6 @@ static int atmel_pctl_dt_node_to_map(struct pinctrl_dev *pctldev, struct pinctrl_map **map, unsigned int *num_maps) { - struct device_node *np; unsigned int reserved_maps; int ret; @@ -648,13 +647,11 @@ static int atmel_pctl_dt_node_to_map(struct pinctrl_dev *pctldev, ret = atmel_pctl_dt_subnode_to_map(pctldev, np_config, map, &reserved_maps, num_maps); if (ret) { - for_each_child_of_node(np_config, np) { + for_each_child_of_node_scoped(np_config, np) { ret = atmel_pctl_dt_subnode_to_map(pctldev, np, map, &reserved_maps, num_maps); - if (ret < 0) { - of_node_put(np); + if (ret < 0) break; - } } } diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 5aa9d5c533c6..cc32db0797e6 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -292,7 +292,7 @@ static int at91_dt_node_to_map(struct pinctrl_dev *pctldev, struct at91_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); const struct at91_pin_group *grp; struct pinctrl_map *new_map; - struct device_node *parent; + struct device_node *parent __free(device_node) = NULL; int map_num = 1; int i; @@ -325,7 +325,6 @@ static int at91_dt_node_to_map(struct pinctrl_dev *pctldev, new_map[0].type = PIN_MAP_TYPE_MUX_GROUP; new_map[0].data.mux.function = parent->name; new_map[0].data.mux.group = np->name; - of_node_put(parent); /* create config map */ new_map++; @@ -1244,7 +1243,6 @@ static int at91_pinctrl_parse_groups(struct device_node *np, static int at91_pinctrl_parse_functions(struct device_node *np, struct at91_pinctrl *info, u32 index) { - struct device_node *child; struct at91_pmx_func *func; struct at91_pin_group *grp; int ret; @@ -1267,14 +1265,12 @@ static int at91_pinctrl_parse_functions(struct device_node *np, if (!func->groups) return -ENOMEM; - for_each_child_of_node(np, child) { + for_each_child_of_node_scoped(np, child) { func->groups[i] = child->name; grp = &info->groups[grp_index++]; ret = at91_pinctrl_parse_groups(child, grp, info, i++); - if (ret) { - of_node_put(child); + if (ret) return ret; - } } return 0; @@ -1296,7 +1292,6 @@ static int at91_pinctrl_probe_dt(struct platform_device *pdev, int i, j, ngpio_chips_enabled = 0; uint32_t *tmp; struct device_node *np = dev->of_node; - struct device_node *child; if (!np) return -ENODEV; @@ -1349,14 +1344,12 @@ static int at91_pinctrl_probe_dt(struct platform_device *pdev, i = 0; - for_each_child_of_node(np, child) { + for_each_child_of_node_scoped(np, child) { if (of_device_is_compatible(child, gpio_compat)) continue; ret = at91_pinctrl_parse_functions(child, info, i++); - if (ret) { - of_node_put(child); + if (ret) return dev_err_probe(dev, ret, "failed to parse function\n"); - } } return 0; -- 2.37.1