From patchwork Sat May 4 13:20:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 1974124 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-NXP1-onmicrosoft-com header.b=hkF9lq/j; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WnqL949nVz1yXf for ; Tue, 20 Aug 2024 09:58:25 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4WnqKK5kNtz7Bpf for ; Tue, 20 Aug 2024 09:57:41 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-NXP1-onmicrosoft-com header.b=hkF9lq/j; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=permerror (SPF Permanent Error: Void lookup limit of 2 exceeded) smtp.mailfrom=oss.nxp.com (client-ip=2a01:111:f403:2612::601; helo=eur05-am6-obe.outbound.protection.outlook.com; envelope-from=peng.fan@oss.nxp.com; receiver=lists.ozlabs.org) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on20601.outbound.protection.outlook.com [IPv6:2a01:111:f403:2612::601]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VWp9F6GTsz2ypm; Sat, 4 May 2024 23:16:49 +1000 (AEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Iq0+wWzoQ8QOjJwjhT3U65H2p8s/t/dew5fgj3ZBpZzUk94yZ5xiSQTXDrbvtCsvKitephcf/XzfQs2ZViYgQN5gfd6ViC1nVLrEVKjEmQtDI4l/MsJXIB9Nbl11lNRyFIUpXHNqe9487vJW2J0u2NthW+NgwEvEoDOzbc1p/zC/rNwQTER8ZCEnPsOhweUwo1Z3BsPvJYle71vu8RTC4FvzBKeeKBmkimz6ADvmiRhfBlwz6HKqi5qgB6kSQ00sLNpMBiuILfp4na8qWwd8okkSij5ege9oLWCgBwWWZ/mME405ItQu9locoPpASh1+tFLf8mTXySgGLz31lgnu0g== 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=b8YW68N9lyxeJ9/mVk16q9wzxsh3g7k9BYoR+TfhQy0=; b=UE4qcH8Qe+cAnvJzlJYA4nduogUPkrcB6BJOqMOhNnPn8IiDdbCGoFpdL4StqFnNlceH/+46kN2heoV8Vq8jSzfqVwyLVn8w8uLkokRQbDw5ny+DnsqRNsXWE/5oG93KFp0cxGHLmXyTz7jQsI39SL1i21jFaSrstmClmLbCn1LOH17wXCa18NxKP5h8/5EQNSax2tXAEda3a5T/G/Kh6h0hC6qMrJ8I6Va0KrnV6MdQLiIl+CqLLuJf8YGyrg1b1QKAcDuVcD0m13hywuqt9PIJ141rjv2TbAl4BdEMo/W9C1KzPRsnlAwdGNZLXQkgsy5U9DBnPZpzPCakUyiaIA== 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=b8YW68N9lyxeJ9/mVk16q9wzxsh3g7k9BYoR+TfhQy0=; b=hkF9lq/jMcSmd1vDCP4Xw1FUFal2vtMiBcdMIM9IGtY/RbMqABtrwAJ/XD3hbLK8tTye+IspbuC5y1BpSRyaRYHzAlK6rsUAqHloELbRn+VX1eNkANyQqyLBPRR0toDsqQl3oXPWoUwPEZdh+ye/fqC2fSv8iNNIsw0PwMz2xQU= 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:47 +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:47 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 21:20:14 +0800 Subject: [PATCH v2 16/20] pinctrl: bcm: bcm63xx: Use scope based of_node_put() cleanups Message-Id: <20240504-pinctrl-cleanup-v2-16-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 X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714828815; l=1176; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=ngb8bjYWoY2vP8GroJ6WPcYXu1rPDt13jwjXmDP0P84=; b=DCvLS+tJSjIJOYzv5GBcRPWdyszwIStRArI44CNxG71LlT4DW0wLaiJVWa3krSYbnAQteIYKQ axMlCLkIflgBmSjBIiiZAA++axwuvzMqZXOU/It10tJ/dOb4zf/rLxO 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) 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: 039ec075-bd8d-4c85-d9a6-08dc6c3c7377 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?q?/7nQeMJU5DmcMfHEXPODtBRXmEHbvVq?= =?utf-8?q?Py3cUP3+44Y84/4nQL5tdI2ZUgK7bGjIk0MiRheNznJrRDEjITgF/Lmn4wbFMdWBR?= =?utf-8?q?QhA22ez4SH4hu0am/8TEUlwMjc07vWUAOrqbG7LqKt8kda4aGupmBMv1ZOr3MvjfH?= =?utf-8?q?ptAKRD1DHsVcpPw8FKUmfQjp3O5P1MSyiLfupJMEbxcSeX7R5dz1w5y8OoxM0r1Zp?= =?utf-8?q?Bq59dhzwKL94jB88jY/DIWRaho39gWBwsuS4xdRvP/b1Or3RDRiZ6QCzlSa5rjkfn?= =?utf-8?q?t4BjjIZ1QSBSYZuvkca18PO1La20nXBkw4I7i3i+4yM3xndClcCoRzmEShr5tuCE+?= =?utf-8?q?HP5tDNExXbJEEaa/Al6Fx66nTGVriSkwuzL8VoLyDZoVG1CltZidFFg9SUgcAYlqk?= =?utf-8?q?miFum4jkNqndqyv93KatUvkIeTLSB5iE8aNl6H0tH5udDzPbz6Od8aOrgDqoYm3I1?= =?utf-8?q?uarsjlufPxe3agGWc2ZVilLbdNjxQHFBR3y5+7ciVd9QSvrSt7h3ir41LNxQ95ubx?= =?utf-8?q?qQrDQN2Z35LFwPOmTSJur0SSRLcQwVl6ROHqVWjU4io4d2HkuYcLEOsuSuI90Ufpp?= =?utf-8?q?xe25caVkC5FV7KVufuln7prQngKYr+grZoKiyQ51CH4gH94vifvFS7+67wqaeYCBa?= =?utf-8?q?aWKbmvJySvXc6cQpY53Tdf+OQMMUfcWP4lFpY6PDPGlqBFvLdabxiOwQ1y4h+BV6W?= =?utf-8?q?wD2wsLT0fWV+U1mn9876xTBvVxx5M2bo1Up17hThSCDswuzrb3fxXVLSYlFEG3CGE?= =?utf-8?q?Qll+K6aMOrjr9YPaNKJnjWDcwv7pkTkZLDQcZLFUVzoYR5YzyLnDJ7QyFnoWAZHsZ?= =?utf-8?q?lbgD508fJXeiSSk31+oejzSuEARae9rs54oDSxUv0baS+zS25G5S20QNB7BOLHnsZ?= =?utf-8?q?yCB54QZNvph3lFE+EUFpy0BNj5/RBhxfgUUc8rlFf+4uZAzk4O7lR4wcIUV6XB5OU?= =?utf-8?q?Fz/OOPzuaiIeSlT0nxNM/a4Q+yabKC7S/6PXTYEVriwzHst6Yn5wnWDO6VjrkGSz7?= =?utf-8?q?tQNShBp6UlvC6mosOMbeR0pz+THLevcut9DRuGIhzJdBofM/ltO4eoTr4tHMj+0eC?= =?utf-8?q?hCvJrJA417rf8JkkkG1t7dr25o+G/ZIQaGZvDc7smCWVq/K9haCF43nuNzA15PB40?= =?utf-8?q?7PKFFRRkDOLnXCMRgDz/HSGftI+wcu585dD34ZMiRp7AtZMC+mDZlPdSColcJ/4sG?= =?utf-8?q?9BXLPcvUXzQsKwUJCwkO08YaTgfI5O68z8KjpoEGi1UtIi+OXjPCzgqXJhk6RsSMp?= =?utf-8?q?vuQCowYUnktsfGC6paVwwYhmH4hS17ihsyg=3D=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: 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KV0Tnbt5bygrYAWZuWM92Vobq4OxotL6DZk5vWCojPnH6FRVIdbsAvj3W?= =?utf-8?q?vTG14PdNTf5IkjYnq7FdJOMrrVBMM+ScxiEKZWtdWrUJDu+AzM1qalqnO3kthj2w6?= =?utf-8?q?ytWu+8yTyhe/n3qClO51blW/+4MoicEFMFAqRmNFxGfDOT8eNkT4gO7ldEkt9nL9z?= =?utf-8?q?Y4rGHUcV4lfZZug32M+u/LWtBbGVsTcxoh5vuHAj6/ZgvI53LwS1EHOyl/uWXE4nU?= =?utf-8?q?hUF+s5CN28t6PmuDoZTJTpswoeUxLiMJYPeyYue0ZPCkcalEgnkmwUJMnMYomNv5b?= =?utf-8?q?o4ovKIw9GaoeI/64NrCbMO5YBDJJYRsF31lMYEfSljNcxuRAUjLsf3K+499NVesNU?= =?utf-8?q?QWRfnibHFGDRLDhbmGZfDM0cJPufIXwzDSxjimTkOWcmuJEhIoCFiwOkGgfvI0Jwe?= =?utf-8?q?AYDn8pjQ2xIESH/2TD2F5IY30AGkZidjiWuYgi1z9KGg3Oa5S00amnBXFNSZM9gD2?= =?utf-8?q?YNT4ssxs+PYsTHMIQu8t1xA5dFMnuKkauWO/xuemjAKOsbeNuchE4bpbOLnsR2RSv?= =?utf-8?q?g6WDWVW3CFv9jH5ds/MVjeXERpODpXqL6ufIcNCd3mxLu559wz8+NxcdFtiB43bIZ?= =?utf-8?q?MOeZmOfKklXxniTVR2AGCXU+1uqepKaX+AcGr+fLmG21jzRcuq60l3l98y3cuPmFh?= =?utf-8?q?HCzZOaoEXeOt?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 039ec075-bd8d-4c85-d9a6-08dc6c3c7377 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:47.1839 (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: shY0dafUZUsi2/PfSPmiPNkIGEOpXTthpisY1rGu+XtACuv/H167vsA0VUdr90Fmv7gkwOa2dZP59lS30mxyRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8633 X-Mailman-Approved-At: Tue, 20 Aug 2024 09:56:01 +1000 X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, Peng Fan , linux-samsung-soc@vger.kernel.org, linux-aspeed@lists.ozlabs.org, linux-rockchip@lists.infradead.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" From: Peng Fan Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan --- drivers/pinctrl/bcm/pinctrl-bcm63xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm63xx.c b/drivers/pinctrl/bcm/pinctrl-bcm63xx.c index e1285fe2fbc0..59d2ce8462d8 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm63xx.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm63xx.c @@ -67,7 +67,6 @@ int bcm63xx_pinctrl_probe(struct platform_device *pdev, { struct device *dev = &pdev->dev; struct bcm63xx_pinctrl *pc; - struct device_node *node; int err; pc = devm_kzalloc(dev, sizeof(*pc), GFP_KERNEL); @@ -94,12 +93,11 @@ int bcm63xx_pinctrl_probe(struct platform_device *pdev, if (IS_ERR(pc->pctl_dev)) return PTR_ERR(pc->pctl_dev); - for_each_child_of_node(dev->parent->of_node, node) { + for_each_child_of_node_scoped(dev->parent->of_node, node) { if (of_match_node(bcm63xx_gpio_of_match, node)) { err = bcm63xx_gpio_probe(dev, node, soc, pc); if (err) { dev_err(dev, "could not add GPIO chip\n"); - of_node_put(node); return err; } }