Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp408973lqh; Sat, 4 May 2024 06:17:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX3WF1gUk1Qos1H6rH6F5Rwzn1UdKRj2tqo7Nng45nNSgvihBewINZhXiZ/uXBlIMIDW+7Qg86hqQA1rhVys7e/2PIhRTLWR/2rR8EyuQ== X-Google-Smtp-Source: AGHT+IEts6hC5rfEFZT5gWe1eihl9RUo3Y45QjJdsJHYUW8fV32+rV9FBDnaA+/vg+S+Gcu+cY60 X-Received: by 2002:a50:8711:0:b0:56b:ec47:a846 with SMTP id i17-20020a508711000000b0056bec47a846mr3337239edb.25.1714828620511; Sat, 04 May 2024 06:17:00 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id i14-20020aa7dd0e000000b00572665206dasi1625507edv.638.2024.05.04.06.17.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 06:17:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168684-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="LbykI/RZ"; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-168684-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168684-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B85441F21B52 for ; Sat, 4 May 2024 13:16:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2CF33B796; Sat, 4 May 2024 13:16:19 +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="LbykI/RZ" Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2069.outbound.protection.outlook.com [40.107.249.69]) (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 B2FA9374C4; Sat, 4 May 2024 13:16:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.69 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714828578; cv=fail; b=Ge+Dl22efjfI8LOretsl/vWJ/Ws00AzEerRzGY5F+GqD8ukg/MckRXzUWpCViHqP9/D/wl670LRfEvD7uaU0otmLhP8dscXI67pDiCHCU+SEMLPMa3RDh7sDHFo6gEk8BDA6AUSJdIA4a9ZWUvapVXdQ/dp9n4nPLrW8Z129IV8= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714828578; c=relaxed/simple; bh=aGocML37yKFLTQmAgdHIf5uoWsvtHUPQJME8EyVoT6s=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=SGyCPYqe1yAKP1BNxwr4MOFzeDbgv1wTN5ltC/OkKrrUZfXwMstLD/QDQzTdzLJNsyCh7MQ7CfFC2diBhoZ8oZJr9Zus9Zb/7m3MFnqxGdy4ei+wVsNREbqRIBtu7L5xXIFq6CyNx5AlRyEP/YnvjkS+2oqyF1A8W+9xuReY5go= 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=LbykI/RZ; arc=fail smtp.client-ip=40.107.249.69 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=HjpbylIYacvnbNTWQP2eW4n5I4okmE77Ce7/Dl53/EpW4Yt8DXzAzkFvYu8UldsRbkKqZPe3VissAU7I5jfJT18hYiGAWBsdEdnKWAxcBtPOxibb3Uvon5JFSTkptfPnOy+MOP4npnLPhRn2tEFbe5z65Iz2iDYrAswN+z3Z5vb9513kV3ldW2CqleJMF/LBMywB+tgrfD1sGL75xCez5X2jjrv89l0qKlBZxw7i97RzX9mJjN/K+2COUQuDVL5mt5yS5gJnHUTzAtbOU9tYZw1tgYgDMOiZnkfllE34U/j8XoJKG2jhVj2zCGCbLpe2KUyy0a7olcgT55PALcNERw== 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=YyGeWpCkYZh4WcKx5URim9X/pl2xw38Z9ho8YthB/aQ=; b=dqGYH1FwLeN/qpMQsYJ0OBQXmLTP3aJUc7GzoCCWjyJrF2QvI0uVycx7CRkHbtc06SSQTJXmiPi98aUf8gG+JmiOsOJZce7M9pBhnCR5rJYGyI/FtQTsCJV3takHYFyBu5OvMG5wH+3DxvDvamud9A2R1+Q2Ji6fZKFaCngPDKCeNqgasKOdE43yAK2dV8QO6XxD96iLBsLPosTkRWwlHIfemLah8ppu6psxAyg1SCa9WNfgotSaU2gMDmZjVlSeqadnP3f6fEMXWOQ2EwK9OVhXs0rWjqLeX5R6xyLhkLhONee/sWVU+hrlwhz8XbRQi4V2NZ2Z+TyEchh4//yPTA== 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=YyGeWpCkYZh4WcKx5URim9X/pl2xw38Z9ho8YthB/aQ=; b=LbykI/RZmuGK+O14E8wO67iqZNfdyu5EQnlofWQCNSbAHiStMpPWzUmxv9UiR5GbG2yCzkxFgz1NQ+IwIUW1ySOpuWD6sM2jl05iLgCGOtZjFpdDtSOXhpaDm8KRFQiOPoJLE8ZmlMC7w+DDbq97yjKsNdcQeIQlGxagDrmT7Ms= 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 AM9PR04MB8633.eurprd04.prod.outlook.com (2603:10a6:20b:43c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Sat, 4 May 2024 13:16:13 +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:16:13 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 21:20:12 +0800 Subject: [PATCH v2 14/20] pinctrl: mediatek: Use scope based of_node_put() cleanups Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240504-pinctrl-cleanup-v2-14-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=2143; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=lm1PEdHATfoxwJUL9YMs41GxvVEK/pacMdZ5mWFlWX8=; b=d8MWpOtXKNnFGmfz1eHOooCE8YCLHVTyQNBBLhSiEJgr+86Or3+ekvXynCYNgOqJisw6NtlEy IWju/BxoMOfBW/IhPYIVChwIIYZ7T5qVjSiPvU1zknqEB2Ele8EoB2c 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_|AM9PR04MB8633:EE_ X-MS-Office365-Filtering-Correlation-Id: f321deef-96f6-48ee-0b73-08dc6c3c5f9b 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|52116005|7416005|376005|1800799015|366007|38350700005|921011; X-Microsoft-Antispam-Message-Info: =?utf-8?B?c0JCeTN0SDFDVG5oUlhXRkhxbHZIRExxVWVFeWJmK1hqR1A5Y2UyR0VyOUFs?= =?utf-8?B?OEVYbzZtSi9GdDU4S1NZNjVPK3lCL3VHK1BxOTFNUk1tQU5HV21LWjNnZXJn?= =?utf-8?B?MHZUZXNVYjVkbVNpOVc1c1NTbXYrQzdOWWRvdUdaaDNOei9qNVBWM3lvblB3?= =?utf-8?B?N0E2eTlMTFpLZHovM0trbitLMUdvQzdGeWFxcHV6SXNWVVVST29zMElEQ0RV?= =?utf-8?B?amFYTWw5TGQwZm9qNVErWkdyUkRLQWl4QnQyWHEwWjlzeG5jNmNjQ2dTQ2h2?= =?utf-8?B?RzU2TStMdlZ3dUI2d094RFgzaHVFMlNSL1BMakJJUjFBTVJSNjZZNlIzd1Ex?= =?utf-8?B?YVNQb3pOLzYwbldsRi9JaXlWZ2tONlI4a0FkbTJyeFluTm1XUGR0S2xVVkZ0?= =?ut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GtLOW8vS0w0c2tzcXNxdG5VUklR?= =?utf-8?B?d1c2NkFKUC9vMjRDMGhVL1hmUDcyTFlPTGQyQjN6NGRyYzk1dFNYbFViNERH?= =?utf-8?B?dVMvbUJSOVBocXRLNzdka3Z4S1loQUpZZ09pTmg0S0VVT3NZR3hkNDNYNnRX?= =?utf-8?B?bndkYjEvM1JjTFBnVzFPaThKVkNnSWEvZFpQZnhtekd5WkdETG1vbUk3Rklr?= =?utf-8?B?bG5TTnZCUi9UZlJLNWl6LzN6R0lnR2x1YzlwTDRqaExDbEJtZEhMV3N4alFq?= =?utf-8?B?S0YwNmZSVGVBaGQ4cnFYdnhwWmVJVThQUHE5M2o5Tk96d09aTDMrZGN1RjBE?= =?utf-8?B?amRrQzBnbFZacWxqeDVFV1drK1R4TmtuRzd0a2E0K1NNNU80bUtvRDRkL09V?= =?utf-8?B?OUNTRUxhc1EybEQwcmJWREwwLytVc1NRZ0NhaktHVTZyWFlIREpOS3M1WWl3?= =?utf-8?B?V01tWDU3M1VYRmRmMXhBS1E4dmUwYWlQNytUaUhLM0VWODJOaGh6R3RXdjN0?= =?utf-8?Q?RSsChYiiP4tQ4c0GA4kuFGTaAK4pCq77iXazs=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)(52116005)(7416005)(376005)(1800799015)(366007)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SFgraXdDV00xaTgydFE0Y2FqdHJxZExLMjJrb25hZFVPajFPdlR5eThEclFm?= =?utf-8?B?NXJKdklxNFF2UHNmSkJpTFlvZmMzamwyL0cvdlhyZVZMMDFwR1JTN0RzendW?= =?utf-8?B?a3NHN29FNytqN0t6QzRWbU9kamcxSHI0U1l3NjkzRj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zRp?= =?utf-8?B?VVFhVHAydGFwbUxMSU5uRWlqYXhnRzJSYXFLN1gyS2NJYUFWL0dWbjBDR1lD?= =?utf-8?B?WEszRUJhT1lmbkY4QzFYUHFyK21ROVFDZE5ETFF0OHlxaTU4b3JZeC95dzBJ?= =?utf-8?B?YTZJRXBBY1VNYy90UDNHejRDMU0xbnVNUnJQQTZqbzd2TmFNaHp1WkNRSHpS?= =?utf-8?Q?j7mJrs6vxwrXPaA9fau1ED4Xn?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f321deef-96f6-48ee-0b73-08dc6c3c5f9b 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:16:13.8452 (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: lasWAHSEU3CxIZoEiNBOjXZT/zjQItAD5txUd1NRZGwJarmvJdg3IsFiwxyqubcEn/E1ytvCZx3FX7rxsZyRBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8633 From: Peng Fan Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan --- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 4 +--- drivers/pinctrl/mediatek/pinctrl-paris.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c index d39afc122516..91edb539925a 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -621,7 +621,6 @@ static int mtk_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; @@ -629,12 +628,11 @@ static int mtk_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 = mtk_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; } } diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c index b19bc391705e..e12316c42698 100644 --- a/drivers/pinctrl/mediatek/pinctrl-paris.c +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c @@ -536,7 +536,6 @@ static int mtk_pctrl_dt_node_to_map(struct pinctrl_dev *pctldev, struct pinctrl_map **map, unsigned *num_maps) { - struct device_node *np; unsigned reserved_maps; int ret; @@ -544,13 +543,12 @@ static int mtk_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 = mtk_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; } } -- 2.37.1