From patchwork Wed May 1 12:56:17 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: 794032 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2049.outbound.protection.outlook.com [40.107.22.49]) (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 41F8612A160; Wed, 1 May 2024 12:53:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.49 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568015; cv=fail; b=l8ziBWSNnQIZFa4sZ+6E9G0zRUDbzy9f0vYGJliqz4rcHamswdw/FaxcRRqqdEJBGkwFLQX4Smg2RpAgdT+GB0DyBWu0VZaZMrU4v5thDMgmUMVw8mPwmXtTUKHQwiHim594Rtx+ByPVkdGbmUqWlysZ1/5IWKJIp0BwxwFTYxU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568015; c=relaxed/simple; bh=o6F5l9CsoiURStmJJEE9Qa953QXfjAQBUVSJDbNbaG0=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=GpuDvVDHaangwPXzLWde32Orjwe8UmYcw9Lbz9i0IvfwfWpmW8jNNgjak8SxvfDp2nFHZFUDD/650zz3atD1yWxO0kMyft79J24n97CDo/4wTWdIJKEUoDMIJXg2qXPFXrwO7d+ObF5nNzZMMeYf5TQjPDgej+v07gw9urH9yj0= 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=hYKP1dft; arc=fail smtp.client-ip=40.107.22.49 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="hYKP1dft" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OyMrQIQxgXLORY8LgQ5cGpC7twhaNxkvD3iy5PLxMztUxxou0azI1OJnKW1iyrzBNk/cLawtOpfT8lECCoL5upFGQ3HwnyavPOGLvLa0fprUdKd9TilG9ElcANWu19ggXOCIPre+Ad33wohA7iVw/cHvIQOXq8swKz/JenNflHcgZLscvXZVwQjp9+rFlNd6yJhemvK0GHryctLSKZsfwcUa86E3w0FRLyMb2uS2p1yTsxx1bYgVjYsu3PPeizj3eX/fbiYTsloA6rUN/LM39NFEF9tYocvTP09sicy5uwpWNttuF8IIqXM3Px7Wv6q9JZrrvgPAdi/IN0b4DitF/A== 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=VVGTDZyj1RnAl01LIEHARrjBeQCzbPXdSqcc+xAEJvih9ssxrCmMTAGzrvl5fSzFoeIXN7bqNMQRMDkxsaJW6yLLv48C6zdL7R3gHjqSK1xPGBGmYADBhs4/r47mwAnGOYTkizyKE2baPQNIfm3wGBOxda/w/t4H+3jxy8qLUHrm0unBWZKpfUGNe785lB7URe2BvDgV04Q1JT36dWv98bil2RiMYptLeGpXI239htCSfAd8JjHC0BUiHwcq00RtL1ABPBPqcwlBmCGFSYRql/KGBbLfRmHhDxvgn+55viKLPDZmq3WghXJdn9euYvr3ZK0WHhloGd1Uprkk42O6pg== 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=hYKP1dftAW2q5LqCOyS2XVjSGY/jHgc1uYQGjzMPqbIQvIKeUz+umDZ6TIdK30LOv92UH+K5CPMIij1gC1YSMZzZftVJfMwhzQhxAJ2Hv/4koEwPM4yWJ0fEfRlzYMWUYW5ANVHxX3Fpss5iUkQ7funftKAYLi4MN0da0FdGQOc= 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 DBAPR04MB7432.eurprd04.prod.outlook.com (2603:10a6:10:1a9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.28; Wed, 1 May 2024 12:53:30 +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:53:29 +0000 From: "Peng Fan (OSS)" Date: Wed, 01 May 2024 20:56:17 +0800 Subject: [PATCH 19/21] pinctrl: bcm: bcm63xx: Use scope based of_node_put() cleanups Message-Id: <20240501-pinctrl-cleanup-v1-19-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=1176; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=ngb8bjYWoY2vP8GroJ6WPcYXu1rPDt13jwjXmDP0P84=; b=inAIaru0WMRLGzM3hLBhV+swvKEs0M2rx4eFAsHRDsmzb0LTjRVPF2wrCwtv0nZ378wxJlsEK ubzlBlL/0H8DPj4CCn28aHMnunMnRVB/96akcAo3TUmqc+aFkdavPMN 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-samsung-soc@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_|DBAPR04MB7432:EE_ X-MS-Office365-Filtering-Correlation-Id: 28a73565-6187-4894-ea9d-08dc69ddb2ef 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|366007|1800799015|921011|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?2p3GfptMK2wWdp2BalQjcTnQTSC+hIy?= =?utf-8?q?knaFNr1OA3YHYa4ZQ09Bt/4XZ5ME/9m0HbS0vaZmSQKQY41R5unJumBx9g2uEyGKb?= =?utf-8?q?UXd5bCggr1rAZi3V55His1edpaKfJNXMtAVbcRnuRhh0O6gdvho0130UyskIxTkJG?= =?utf-8?q?h4gK7R5lyVx4zeBwZnhqk0f9ldOkaXfe0QgGfM4MkPDAbRAHOJmvJrDthhwD2VBSg?= =?utf-8?q?rKsnLEvIHmzTKiocPMCaDPOo9SjsZmxRZNZhQckes170hLjTp6FAbCQjhHdfYrcmE?= =?utf-8?q?mpv8IGQ08CYFspyGDUHq05Jj2VQts//5ALRKI4O9ItQlf4mu3S3xtiBTzffQOf2Dj?= =?utf-8?q?lNJjYq9oAqp+nQwAUyOV6tcexzNpfwLSNw94jRWc28tpIc7zzgaerx3y/p4qmUa9m?= =?utf-8?q?aZzOe87rgB6+FHRTJ8qu0Qa93ngxs01EwuiMT9I76OMOfsZmp4CTPbaPoNU8R8nS4?= =?utf-8?q?++wriOf068MOsntMXNeLz9K7LdPrqInQ9lEnjH/9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PR04MB9417.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(52116005)(7416005)(376005)(366007)(1800799015)(921011)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?8R4h/UaB0zMmC5LoWdPnOL9aqi5g?= =?utf-8?q?0Xhp4uOendG0PU6W9lGWz4JUAwE276yJKtO/juFotrS2uK6vHIWrFeQPeG1XBUMdq?= =?utf-8?q?zLa9K1t3bE0ICdxTWsalD6u1yT9YJu51FRTAKXTfrPOCYAp2A+L5HGaFvwPdcAY02?= =?utf-8?q?qp6vOs9rGN8ZIi/jpbr3LiuHjQFn1Xi9b1uCGh8/62Iv/i8bkZd/MVOZVK/Ns6z5m?= =?utf-8?q?dl8iYzpKr4jhXdGqahSYZEMBjv0NjrwWD+AuF7y61xfi2+0TDnv4ecjRAJvBAuPmB?= =?utf-8?q?oWqN20v9dflcUmXsJygOyNjzkOW/Vcp+2r6ZT6ZKt120B978oK0OxWxI+1hGjMScO?= =?utf-8?q?M2QM5ePE4vuBxPCPf9FsjJHNQzPBGHPN7rn1DfXVv7706Lc6lA9rb9CmKCVkUJQDe?= =?utf-8?q?YhIs9AMBjLRTk8XkcL6xBnorQI4T0oGVOq8lMqwD5PPbiOCP8tf2wzwT/5Mb2eZc5?= =?utf-8?q?5GLXiXbUK2LptGGno9/1bq8RqvgRCEG5VemdXoR0FsNBS+dne78y1VUvFnCbeYOj4?= =?utf-8?q?VEojRt9xisTiilEomKKcRqpK/IUZ1inoRPf3jesCM2irmjA9euuzIY+tPkY9PULqH?= =?utf-8?q?brBYl/CDxZT9WqmNaDcpVXXwuB1AlsyqxvZmAXI08oBtY03hnfYIU0/Hb+rc0oArx?= =?utf-8?q?jgkljs6CUzXJyUw7qI/OQ+GnUS/03yYssBu4kupL1ym8rPxmdYdUctLFL7cvlcszD?= =?utf-8?q?yN/q/kzw+3piczhrleyKdGQTzciIhoHJDa3fXbzj3WwyezVwQhCr1gfwq9ql5R+sE?= =?utf-8?q?B732vURVn51F9rTpXRmz/M/GUqbSSmQZhtuc2nMAqnxDmwtbl9ldwnZ2c6HlgQhyM?= =?utf-8?q?S6JUVFVQpvLPRs/jYhqOHggmL5YvSKggv9K6pal03xf6Ndx0zpw0DP7P/eUOrkFMb?= =?utf-8?q?96f7AQzh6cjmcwh8/mhWYMgOI0VdhoswhWanldd5xypNBnbAMBLkSfV/yU1qRd43U?= =?utf-8?q?fcw844KM/KX+ab2A0TceSre7Ga3tRpYfWq6dZz7pgbIpKD16muM4g7TmB1014va3w?= =?utf-8?q?fTqZJ9W+5kRhQoQEAdsrNqMqjwBQe8h0/JVASk4o02VlNtNnHx8/os6bbUdb1YSCa?= =?utf-8?q?r+mH2o5QLZ/CdCEYRNypn58SoKy0W2p9hRX1YEBTa4EbHTo3h/wZT13HLQq8nirbm?= =?utf-8?q?h504xShIclDCAZVvMDODEsBMM5+KLBy6V5kBbvF6JWn7vYw3fY557l4sSKnpmJE3Z?= =?utf-8?q?VQvjSLmGWtBHA/GRP0x0jbnA8QmfrNe0wYkH3keI9NE/LNXp4odCUIaLk0FPrjldD?= =?utf-8?q?paEox7ex5jgLCIdSS2xdJhN3WpGxJWHgUTzLtA6ZzfBqTu+3xeJZyM9JH5UFNCvuX?= =?utf-8?q?iGGEg7urmo4sZK8uffMRCrBmjekF5HjiznvNFM2/DowByO0X2Fn/z0jADO4aN9vAc?= =?utf-8?q?baplomWX7fGCXBHHjEpmBOBJ4eY39XoY+7qNcwq0ztqFrk1lAghIaX5poZjkOmFhu?= =?utf-8?q?Yct/u+DTLibzNAUqP20XDjjXPAmkQfpdGDGZ2rf1Jn3lECK8e3udktDahcjUvbrWL?= =?utf-8?q?BFWTTYuTtzap?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 28a73565-6187-4894-ea9d-08dc69ddb2ef 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:53:29.1802 (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: JtileGvMyRwe/6xhoIjtJrWVNFuE1tUQoTyK5MqWQGRWwp0HDMa5VgyQZnuVjiYwP9Invnaufxd7mBeXn4Gxqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7432 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; } }