Message ID | 20240501-pinctrl-cleanup-v1-4-797ceca46e5c@nxp.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> 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=Kqlxeuda; 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 4WnqKf5bLWz1yXf for <incoming@patchwork.ozlabs.org>; Tue, 20 Aug 2024 09:57:58 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4WnqJw5ry9z3g8D for <incoming@patchwork.ozlabs.org>; Tue, 20 Aug 2024 09:57:20 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org 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=Kqlxeuda; 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:f400:fe0c::629; helo=eur04-db3-obe.outbound.protection.outlook.com; envelope-from=peng.fan@oss.nxp.com; receiver=lists.ozlabs.org) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on0629.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0c::629]) (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 4VTxjP2bBWz3c3x; Wed, 1 May 2024 22:49:45 +1000 (AEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cd2pkTEpxdjR4zHMJabEAK8ziMtPIJdXtnU2NZKH+0KI12XRklQK+DhQtJrRal59uhMEX9bifoohmvgy5x2EEFMBDYLWc0hreM2/HuKM6hipY4VHs1E5IuP69ZmbdMBk79aTnk43OT4jIiE8RnvutU6tvF8E7xIgMIFu3ISbNh3d2BLLA4gcmr4vSHF9NMRwF+ZP7Pi5hQU1iInfiojmpfDvkRnk8OglpS1yTeP6md24K9RxJ5U8S/Ljzs4qfLmDLU6qXyv+NyB3VmsJclpp+B5DFx4ngrVqzzvLvcsxlnfWODpBLAdlqTHHHUhLf02Y8ZevKWc9/xOmTOHFnk6zvw== 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=WgaCub/AVvrWstgRn7NDSa3uLOl1yukaIFVzxzPeW7I=; b=EhjlbkSwIpK9p5mi+T8IG4fJMmy3vM2r3qtAH+zO2GV6i1EIR0hj6DvE75r8/pNWdBh8M2gBbUvgvYvRxHqQFwETfJFXyr8NstOe3KlDaIwXGu7BQkNLDITjPC6PqUqqlIEhti7JjZLntybbY+B/96ft3UN3DhmT89ZbintLaW52oZuSNsmWfcOIwwIIL1vby/qgsy2AfbWbiEW1HCac3xC8BMKYhRFoNCqZn5E4ubYaJ0R8B0cFwqshVjIEXN2s4zLpOTI2X7rat+QyxUxL5s3o7fW/XS7Sa/6Q3zVjBeDIQ0pMir+I2ACkYrpmKHI1Gx7IYNX8RXkWZq0XezQ9Ng== 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=WgaCub/AVvrWstgRn7NDSa3uLOl1yukaIFVzxzPeW7I=; b=KqlxeudasMTvhe+KYjUqTRiD3zhIewnGUP/1/6FPzIUOiA7oIwOjMAYneE8FW/eXrC47IYOR5Id2saq1vXi4EVllT7bKTH9SciPp/WSRBpQEhmxx98G8kKyQ8xHo6utAnI+1zI/YiPCeNB4NpGnYXJgg1/3kf6F9AqjO0XWHZAo= 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 DB9PR04MB9284.eurprd04.prod.outlook.com (2603:10a6:10:36c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.36; Wed, 1 May 2024 12:49:27 +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:49:27 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> Date: Wed, 01 May 2024 20:56:02 +0800 Subject: [PATCH 04/21] pinctrl: stm32: Use scope based of_node_put() cleanups Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240501-pinctrl-cleanup-v1-4-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 <linus.walleij@linaro.org>, Thierry Reding <thierry.reding@gmail.com>, Jonathan Hunter <jonathanh@nvidia.com>, Dvorkin Dmitry <dvorkin@tibbo.com>, Wells Lu <wellslutw@gmail.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Emil Renner Berthing <kernel@esmil.dk>, Jianlong Huang <jianlong.huang@starfivetech.com>, Hal Feng <hal.feng@starfivetech.com>, Orson Zhai <orsonzhai@gmail.com>, Baolin Wang <baolin.wang@linux.alibaba.com>, Chunyan Zhang <zhang.lyra@gmail.com>, Viresh Kumar <vireshk@kernel.org>, Shiraz Hashim <shiraz.linux.kernel@gmail.com>, soc@kernel.org, Krzysztof Kozlowski <krzk@kernel.org>, Sylwester Nawrocki <s.nawrocki@samsung.com>, Alim Akhtar <alim.akhtar@samsung.com>, Geert Uytterhoeven <geert+renesas@glider.be>, Patrice Chotard <patrice.chotard@foss.st.com>, Heiko Stuebner <heiko@sntech.de>, Damien Le Moal <dlemoal@kernel.org>, Ludovic Desroches <ludovic.desroches@microchip.com>, Nicolas Ferre <nicolas.ferre@microchip.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Claudiu Beznea <claudiu.beznea@tuxon.dev>, Dong Aisheng <aisheng.dong@nxp.com>, Fabio Estevam <festevam@gmail.com>, Shawn Guo <shawnguo@kernel.org>, Jacky Bai <ping.bai@nxp.com>, Pengutronix Kernel Team <kernel@pengutronix.de>, Chester Lin <chester62515@gmail.com>, Matthias Brugger <mbrugger@suse.com>, Ghennadi Procopciuc <ghennadi.procopciuc@oss.nxp.com>, Sean Wang <sean.wang@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Sascha Hauer <s.hauer@pengutronix.de>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Dan Carpenter <dan.carpenter@linaro.org> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714568179; l=1839; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=3dCftRoTOrOimvH/zZhm1znYYmC195eNUPhLJhk2Pd4=; b=fEVszNhFmB0ozWSgviQak9c62GVC/GEZgZAP4r8VCKSloHSeg9ffm1vWAQQ+bwWtefd5irQb/ 3aoJSkKQVp/AVh9+Sc4htbGVlXth84TcdldSRvPA3MnRCqG5c4wNNYL 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) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|DB9PR04MB9284:EE_ X-MS-Office365-Filtering-Correlation-Id: c222aae5-b13c-4c9e-3bfc-08dc69dd22b9 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|52116005|7416005|366007|38350700005|921011; X-Microsoft-Antispam-Message-Info: =?utf-8?q?8EVjt68Liyl4MQHpZasE3WHwiLBPz9d?= =?utf-8?q?C6KvdEGa9xTBM2cCvlGl5yrvVkRdr3abjbOUCvbzTUl9U/3Gc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Jz0HNvXtqWXftoqNob?= =?utf-8?q?IH4fF4roRfdVAyG6Hk4SG5zMnu5M/QrUoli4IIiSADvzTIks2HAQMycfatbdLaj5E?= =?utf-8?q?P6gIg51Kpau8Vd9Rs2AXxSIVDFJFqPKy1fcDtdBMzhMmdbmf3achJc5/y2hUtPipY?= =?utf-8?q?tLotInK2ZY7ppKzQHujEPvJVbntAGWpxm1IImL4sa9cGNcTPttWSaUzyM9V3xsT97?= =?utf-8?q?zXh9+uW9yE0Dps491VQ5NJsSubR2fe9hSZds84c5tjGkPjmbhEYQzSXhr/1Pp90Nf?= =?utf-8?q?IXNrKO+MUCei/M9JoqIsJ2Xw/i8fzl82wqgzDJELDoMyyoaW3pt4ETXoodJpmMtlN?= =?utf-8?q?0Rs8f3iS3VloCd3VvhAySOIaCBmcJo2Qfwuys0yy1oKe9MuEFAOI8snE=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)(52116005)(7416005)(366007)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6aA+8IVUEQmdvCPTyFKD9polhzx6?= =?utf-8?q?al7RN2yf/7WiOdGpoEIiRGak9CPqIrfj0DtQbiXbiHGrgXChBza9lF3tc41IsHosi?= =?utf-8?q?o4uoy5inABAj4N0F3gfbSRz0XR4+j/84hu6Sqt7XZWxzGDm7PHRJ5sRqlNtV56g6S?= =?utf-8?q?Q/hyBl69O5dXvz/NETAq0pFb8672wRj1noCtV5T6qF6Lxed4SXf2cTzjYx8+CWm5G?= =?utf-8?q?y9DJ2dxeWeNhtq4vi/rnVA1lhHXJ5DxjFH3ja4fwTRUplAgXlGbJJijbe85akHwSh?= =?utf-8?q?FSP9si4IMnY+P95gVD/H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NFet9mZ3uK0nhCd98?= =?utf-8?q?6+rY+2VePT+4BSTw275Mzrh7FEqx/c4Y/bUcf8m1lFZCqAJuvrrlMqXo2WbTl3HWB?= =?utf-8?q?WTFofgOhKbzNVxtWyP2+NEfcckuzLcv8mNwsYaOYnBVaNznfiQ1fbbfqugTvUAwVA?= =?utf-8?q?zTTjywoqmO11FuemPBLSMn/Fut8YR+3dUhh/XXaLtqToIh/HbZ6X3X3XWSLmPbxX9?= =?utf-8?q?OkmXlQi20AfoAqCHKnSRcffBm98G/SolC2p8o7Pw0UARUlVNeyqomZ7v+9xo+YVv0?= =?utf-8?q?vcfV50N4r03HVn/3fMIDrcGzHB3Lv5mpEAXNGubTnQIXnwBthbqUnNSW26EE2r3dB?= =?utf-8?q?OQn0swugUaaQ?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c222aae5-b13c-4c9e-3bfc-08dc69dd22b9 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:49:27.2054 (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: gYhhvpfni11AYjiQmPbJI7VN9cJiU/58D8H2Bm9JL6Fv8mo+F82kEz2zeToWO4luMT6owRB/C7fRHw0IinuiLw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9284 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 <linux-aspeed.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/linux-aspeed>, <mailto:linux-aspeed-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/linux-aspeed/> List-Post: <mailto:linux-aspeed@lists.ozlabs.org> List-Help: <mailto:linux-aspeed-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/linux-aspeed>, <mailto:linux-aspeed-request@lists.ozlabs.org?subject=subscribe> Cc: imx@lists.linux.dev, Peng Fan <peng.fan@nxp.com>, 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" <linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
Series |
pinctrl: Use scope based of_node_put() cleanups
|
expand
|
diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c index 978ccdbaf3d3..ca163a91e724 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -670,7 +670,6 @@ static int stm32_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; @@ -678,12 +677,11 @@ static int stm32_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 = stm32_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; } } @@ -1401,7 +1399,7 @@ static int stm32_gpiolib_register_bank(struct stm32_pinctrl *pctl, struct fwnode static struct irq_domain *stm32_pctrl_get_irq_domain(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - struct device_node *parent; + struct device_node *parent __free(device_node) = NULL; struct irq_domain *domain; if (!of_property_present(np, "interrupt-parent")) @@ -1412,7 +1410,6 @@ static struct irq_domain *stm32_pctrl_get_irq_domain(struct platform_device *pde return ERR_PTR(-ENXIO); domain = irq_find_host(parent); - of_node_put(parent); if (!domain) /* domain not registered yet */ return ERR_PTR(-EPROBE_DEFER);