Message ID | 20240501-pinctrl-cleanup-v1-16-797ceca46e5c@nxp.com |
---|---|
State | New |
Headers | show
Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2057.outbound.protection.outlook.com [40.107.13.57]) (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 217D88248B; Wed, 1 May 2024 12:52:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.13.57 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714567966; cv=fail; b=K9/9wTbCXn3Sj25pnxFbznZfG9C/XfxUWXA26lulzPmj2bq9udy1Q6FThfEZtZTa3N1Bpbiq4Q3zZXl7vyuLsvDRqv2lyutyfwW1vOacS/Sgyg7hHZ9sxMlkULcgA8MiH9gatXNWnoetgzN+7CbhYWXOvab5oqwF21K/BcPUEp8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714567966; c=relaxed/simple; bh=UYDu+QLrZ0SSLpWHuRHRNNZ73xp3uVF3FfCqwL6cAd4=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=Tey3zYjcp4nn8Cct7wn2VpET8PHyQHmNBCRwc1nxmGFCph1kBa+TY0sDW0fOAbnhxsZmIS0HULmzz2hZYhW5r0u58e3ibVs6eRahkhx996a6LjI3otzbvHDlSj4EOXP+yH2upDgYM0ZvNri9dsM0HBgO5V9ieVrqC86fHqyF3ks= 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=XcMBz3RD; arc=fail smtp.client-ip=40.107.13.57 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="XcMBz3RD" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XifoDNFy+OIEK+L1N3yuEmV5XxdlcDY7VEDXhd6JFqp0mpxPhZgUdo/lpIIzxLUjnMymIYzrtiDr2hLLA3rzjrgq/8GkOsbEDmKLr78QTf0iKZ52N056amWTpcs+ZAs3YVgaLlq7ieIN5D3wZZlNqMp5V/GzUFJ6gs3uvQX8G/AD7+y2JQuYYGXTXWKPsn52JcUIaZIF+MqOJzB6jriDDfq+G7OIVLt9ibhonhCJYDKu4sQ+aIIpiHC0XcZUW5FE/PyRGH8+4f9lLMxavBuIGzfOS+Pm9QdcJaQltYRlmozL/D7bbK0GCqME9v9sOysSlKmpVcL9DrApXCKUPtaxjg== 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=Wh46VIFFtnR87VP8CR7uMzRt81dfHvC2gK19Gu2CtGM=; b=Z7XszxlL7Cd4EqBxsGRR3c7nh17exvXRKG5Xc86hzFyVwP/5aay1BDHBK+DdQXPmsrW4gmO2TBJg673S5e7cuyfZO0fcJAQhywHN8IEZbSyCCh3xqa2naV2TdgAgk9TrwG/r1J70m2/09XssXrwm119ZbG1BB0GseRt0G2yeqgnwpl44wgS5IuThMt37c7yJ21ayN9dIzcsVo3pKrgQUbEiuNAi5OfHSYL8gG2QNtmaZ9Mqn5a/ksZRu4kxiGCb+vZIdyDSnJdAblYBSaJQpQ+L1QHCOfz63pEvcSpuQXv2h66J3umxzYO2fI3JoTnPJ2uW8pVYIULuMsaipnQpyzA== 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=Wh46VIFFtnR87VP8CR7uMzRt81dfHvC2gK19Gu2CtGM=; b=XcMBz3RD6J+BpOdQUcC+tI+ZS4U4ar6yAE7Ic9ceBZh00UY3Vze+v4QW0K0dkPqridb/N+uAh7bKF8b5WPN0leb/tl3uFohVjl6otL1ESHh0Fp4zJjevHJIRkCmhaGh94Z9Ay99uQcPquTMQ3AYo8wKrs8bs1ljsDXEQ7TopfBU= 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:41 +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:41 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> Date: Wed, 01 May 2024 20:56:14 +0800 Subject: [PATCH 16/21] pinctrl: nomadik: Use scope based of_node_put() cleanups Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240501-pinctrl-cleanup-v1-16-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> 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 <peng.fan@nxp.com> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714568179; l=1905; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=x+RKtlqeCysZbUAk0csydxI+b9I02cK4F7LOISGb+DM=; b=Y3+vk3f43AcNvROw3kkX4CgId2lnsZyoUr4FCfrXbQW+2RkiW/K4kuVSb4mcgJzb01ENb6OLL Tw+jfm6cSIaCjvByic6cwwOvm+A9nbuy+hC5xdMXE2JwFxQPNCx6NMJ 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-gpio@vger.kernel.org List-Id: <linux-gpio.vger.kernel.org> List-Subscribe: <mailto:linux-gpio+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-gpio+unsubscribe@vger.kernel.org> 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: 338cf59a-6dc3-466b-c9f9-08dc69dd9634 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?q?GbshhS8PiNjgPh4IXLtVxGbP+mZsUMj?= =?utf-8?q?FRrykmuDUUAMUPqzzozK1DMXS/MNFbzwTRTj+02w8KZcdMqW1bZRc8RMJiYyJmO53?= =?utf-8?q?WQSsHA+PrPosK66opifyFKcM1PpYl75ip3bEaLwtAZpQnIHqf2gOMoS+1Cw8dC2dt?= =?utf-8?q?i8I8jP5YkKjoAw/gS36Vt1jVzTMc9W5AwlF67fMjWWBHswR6IZzpwzYPugdsrYSn5?= =?utf-8?q?uq6hMUZm+NdpRzptkBsWmwXNfU9spzGpiF6zZ4aeBaiIUlskRF9Enr9UjcpHUFGPx?= =?utf-8?q?/MX2us/10Ce2I6DEXKGCro89fdCvB/f6FiON/2sqMUQ6ZBvCfyB7DVxqGwLzGPFjP?= =?utf-8?q?qptpGy3UXEj9Ysh94lowXD9krgtfdC83mqx+IyU3iHwtTUwgpsHeLathAHwsFq0+h?= =?utf-8?q?g8ksc8Af5STgPVCb2xMAxI8CgRndn1wIPYaemLgye1ZVEor32c4j1mLYbP5geisdI?= =?utf-8?q?B8xBV0ePtmRhANfqct5KUmPtvnZXAEwlpJjsYqhoHvNpFfDCPKfA5xv9RQLRoLoKB?= =?utf-8?q?YF7zdcoH+nEwJ8Yo+CZWQKoCwOqc8n43g3DJlPO6qtwx2ok4ICkUfcX9jdDkV2UMm?= =?utf-8?q?fhKmZ1RVuloMZ9HxNXnub4rYFqgU2IdlGgO/vlT32lPMyDwK9KqrMXQNRUQKcTt2+?= =?utf-8?q?T0ZSedU1kIzj6cFTNEqkr0eA7AeB0irFOWpnzzUbpZruuhgSdzQcFoI5aYnZibZdr?= =?utf-8?q?HWKx8kV+WwElq1Q6L3A/TrFSVMtNoD9mYhWFegV7I8SP8ZlxOLV+9a3BVwN+FWP11?= =?utf-8?q?F5XdU5RtVBa3XLpnCg271tyYHcQToETM4t0cuRi+3FPhN9JSOTkHDfKtgQbbM+9sT?= =?utf-8?q?JL4gSr4U+TyI2Gvxjrn4ZM75oyxSGzdp5I7yw7qt+guUlWCeK33zbpZLaOxnTtZ6a?= =?utf-8?q?QOgm93dCg474cO+GwsR9Cu8yKQCV2AKfo6GJJyW+KTJI8wW52cnP7CuHXA4LAaYcM?= =?utf-8?q?l9bP6vBSXDAeQ/EGeAFxvKNzpO+CInL0pNfd7SEG9nhCjrNZ6zp+UQulbc6M7D5jr?= =?utf-8?q?3wIiz6BJy7NcYus7szJxDO3RG2oKklQXSmyfDr8EZZiDMImQTvEkNBC2Fy+gwu4ue?= =?utf-8?q?0HbEOmg24FixT2gGstHTr2BU2NOGkeuACEEEwoFlBSlbbdR98lhCGCSfnUvGt6ucT?= =?utf-8?q?7bNmYBt/Vnv0kAzKkyJ4g5E0vKgEmGnL+LBp71W3KxtG22Ea6n2jwyBiZnjUoL0YU?= =?utf-8?q?Bg0+PsqhpHVEWNiSD2DVUyza7xQ+I+5T3SUATDQBHqH9u86Dxc0iYIm5VvT9E8eP/?= =?utf-8?q?I0te5aMjy+QLwlWKX0FsqVNhK4g4Qmg697Pv+tixmnDym/hgDpaOxjnY=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?q?JiwfMhPPtEWrmDRh5AF8ydrtQ4Gh?= =?utf-8?q?hvaA9akwOai4kHrqhleme4GMK3Dd3Fx64q+KJWF0BDpiMVUPhWlhHA0DYTEpRQC9r?= =?utf-8?q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17rS1a2NNPFjAMKUeRPtCT5x7emyQm1u8gjwqZYeq6CmWABceMV1hZ23A+EdF5LjA?= =?utf-8?q?8Aw3Z+encQK9e1mE/nWZqYa+pnngV1SddP9Ne9x44R0bZu4W1O7th9vs6olhsn2EH?= =?utf-8?q?H5AukxYjGanQvqWzPBYpifA5/ToogbpNJkKtxKBmwEREudy9UHpTsdiGEqL0Tlp+U?= =?utf-8?q?HhT2095e3GU2eDTdJin632ANrFVRt1Sp21x83BvUQY27McGeKQ9tcscvT4zyswySo?= =?utf-8?q?s4sAE15JGFzckDBzPUJiHdJ/MmcfSUJdz9IjM6bzZgnJrY7iW2AJe+KUUjLB/JTIl?= =?utf-8?q?d60rmBhLti4jxkNZiwNQbktrUQgGkkifPCla7ZPUsb3G8O8Jse4tQpEoizUyYtu87?= =?utf-8?q?owU0O/s5swqfYebgUUP0W8ORbBoNpKUzBrV8ap+OW9ZIlTuYBGlpt5EDznLq+Mkit?= =?utf-8?q?zpuhM+kdkb23gIStO0enc+bpW6tpLiBxjgqcA6PAOJ3F/nooTOyds6/TfoHitIQUR?= =?utf-8?q?3kWTtroVqGa0EfOr5jm0KjPzoXTNO7C8L0lepGQeqKXALoAMiT7jr4jXzoX4poFhY?= =?utf-8?q?TorRV6AI0+rv?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 338cf59a-6dc3-466b-c9f9-08dc69dd9634 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:40.9503 (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: 7BwTvFoAifewf9K//sLx0gnboIdTV1IhnrFyKGTjhX+6geimmswC0t0O4NdJwAILhii90JVZlNfmHkLVmbObVQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7448 |
Series |
pinctrl: Use scope based of_node_put() cleanups
|
expand
|
diff --git a/drivers/pinctrl/nomadik/pinctrl-abx500.c b/drivers/pinctrl/nomadik/pinctrl-abx500.c index 80e3ac333136..47f62c89955a 100644 --- a/drivers/pinctrl/nomadik/pinctrl-abx500.c +++ b/drivers/pinctrl/nomadik/pinctrl-abx500.c @@ -811,19 +811,17 @@ static int abx500_dt_node_to_map(struct pinctrl_dev *pctldev, struct pinctrl_map **map, unsigned *num_maps) { unsigned reserved_maps; - struct device_node *np; int ret; reserved_maps = 0; *map = NULL; *num_maps = 0; - for_each_child_of_node(np_config, np) { + for_each_child_of_node_scoped(np_config, np) { ret = abx500_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/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c index cb0f0d5a5e45..fa78d5ecc685 100644 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c @@ -804,19 +804,17 @@ static int nmk_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev, unsigned int *num_maps) { unsigned int reserved_maps; - struct device_node *np; int ret; reserved_maps = 0; *map = NULL; *num_maps = 0; - for_each_child_of_node(np_config, np) { + for_each_child_of_node_scoped(np_config, np) { ret = nmk_pinctrl_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; } }