Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp407496lqh; Sat, 4 May 2024 06:14:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWG9fgMpvHr2UQM+UX7fqwAEWzyOp15kM8ow/HV8ADnFiH13EAIiZdMctuGFWxFCPVRqWIJEHl077ysKHSC8/yhZXWDqg3N7crNwMIlvQ== X-Google-Smtp-Source: AGHT+IHL4ogkjvQmUoMgnOtV1QqKJE0bhqA1AZFW2rDkuXsRj16ybOeKG42M8hPowyKG4W+9H1Vq X-Received: by 2002:a17:902:b085:b0:1ec:7084:3d8d with SMTP id p5-20020a170902b08500b001ec70843d8dmr10019167plr.9.1714828468663; Sat, 04 May 2024 06:14:28 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b8-20020a170903228800b001eab1fa26e5si4932833plh.523.2024.05.04.06.14.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 06:14:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168674-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=K9HoFs+8; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-168674-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168674-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1F110282787 for ; Sat, 4 May 2024 13:14:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C66FA381AF; Sat, 4 May 2024 13:14:06 +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="K9HoFs+8" Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2068.outbound.protection.outlook.com [40.107.22.68]) (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 BBE262D058; Sat, 4 May 2024 13:14:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.68 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714828445; cv=fail; b=K71+/2QVqCxiL9jHW4ewZ/iIXDcU/TcBEnTfIaG6/NnYGIS7cXj29BM4zLw2LrA66B3SWuz7CzQVlh7oKuHjuyeFj7V/4Hpp7nuc1r/xxMrc+JKdAhga8Ij82oqut0GwKpxyIR/96zj/ZKNcxhCu8amo3el1KG4MUli9XDppmNg= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714828445; c=relaxed/simple; bh=OInO6yAg14U2A4TIttQDy/mS0VvP7xhIZA0f8KUS5dk=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=Q/PervaaOdNx1hxFuWunhL0wwFOs9vyT3ePpuYKlVzI/x3l1urrhJ53oXL8KvxCGmTcT9fW8hllizBTh8gw7Ry+7paqNOfI9npN0MxVuAsyj4HMDqAiokVsEHxfouPXWlMNoNN/J7PhIjZlBmvov5i1Q5EKFFJIVjJahEQERshI= 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=K9HoFs+8; arc=fail smtp.client-ip=40.107.22.68 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=BB++BuCWovknZieJLe0ezXwJ+LlNNUJmOh0r5XrnwAwWqL9Hl8BKUM0C1XizqtjYZfZ0i+bX5qH2cv/biMOHoFZfdjxbjDDKaGwbGOEPf1+IEnCLneloZqj0Jfpk7hNcEFVo1Yr39KkUcd8NAwWmbp6oKWLA2LvtQ8EfgcZd8cYg8xeV0LUBUUOkt3FoC2GUyBsVqSZNOE0XExVjRQkd6RC+joEfrvaxBYs9aKd5wlylLZNXITXpAF3nHYZKHlIBPD0EevH7lE2F0rIbmam7K+ZeUxgJkrZwhh01QyD+qBT41Smn0I3+pq1mVBkvLLqKX8M49lpF9HY4ADjmZdX5JA== 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=Eig9P6zNNvksUOs0mChTICwLK4o4MZg7g2lLrYGu3MU=; b=ZmFpipRA/d0vqDXvfI9t2oC+JpQwtgSv3XbrgR6cvNx9nIZBw60DisGv1ZoNEkio6wqCcHPrpGcw+J6e/JtxkGU9mWcbYR+OyORhMgz0tI+G2p2uZPpyIqJjMH6IwEv8+zIQZb/tjOAfpqPCbenJPKDPneP2+gQeqimhb3fDzspZNZpMJSIhbca0rKMq6r7GpAnOoLDN2ssRp9kaiWoVK3Q+rnj0Ph0r1NZBS7ZqBZc0ug7hhBF4OHZ1dFVAfetlD2YqudsOGFYdL5cbwD997ZgQJIe5/ETDjVZWS9sz6fU+kqHQwF0KEwQQAvR/rbAcryerI8aZdLy2tLxWwCA34Q== 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=Eig9P6zNNvksUOs0mChTICwLK4o4MZg7g2lLrYGu3MU=; b=K9HoFs+8inZwiLNq5Z6MwNjq7DYsbc8JTeDqn/VxH2PSLW/7PNxhcix9EnzKWVNkwzRETbUqiIwcU4dbsWNglLL+0n+O7EcO+MsssmI20feQ0DIJuT+FAKpwdmWX0s03dV+f9DS7nr36WsAprRd03x2hSVbg/RedEz8stpoDajc= 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:14:00 +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:14:00 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 21:20:04 +0800 Subject: [PATCH v2 06/20] pinctrl: spear: Use scope based of_node_put() cleanups Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240504-pinctrl-cleanup-v2-6-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=1599; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=gLxq6qceZG7Nsihhv4/AWrdppvVafau2eKIInT5INMM=; b=5ffTl8ZtioLSYaaZNjD41K3m0KxkH56uyb2/IQ3LQ/eLhFTIgJ+z+teWheN9sal8KHmc+TJHg AnbJfBYdZnCAlHsBRS1fxFEmq8MQgiKr7ur+z8H1JXy6MJM4yebyMux 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: d6598716-c0c4-479f-c7a2-08dc6c3c0fe3 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?djRRUUQ0YXJxcDMyNHh3RXUwSTNYZW5YWUZ5dXc0NGpGNHk4Q1hiZWt0SWlh?= =?utf-8?B?KzRlZE1sb2V3Z3Y0SmlqM2N2RHA2NzJRR2FodHF6RzBOM2hCWTI0SlhWYWNQ?= =?utf-8?B?aFNBMG5rWXlNbks5WVc4dmIwdlFEZmxmVVZoMFM4YnNCWjVFT2lrTldhRlNu?= =?utf-8?B?RG5YK3AzMkpoa3JzUXIvSU9hUGhiWjZjSHZwWjZiZnJYZHlyZUozVDF4VzV4?= =?utf-8?B?Y3N0UkN1NXVnT0pFN2J0ZUxORDFNL3h4WUFXWXhhU2hhRENqeFg2TFNzVGZV?= =?utf-8?B?bmV5U0RDdVhPRWEzdXhPUW5XL21XOXRwaWg0d2FxWU0vU0pqTkFlc21wQ0V3?= =?utf-8?B?MDRHM1lTSGhQQmpyMlE4NDZnLzdXMWZOZG9wTTFrZm9kRGpzQVQ3azBaVVdJ?= =?utf-8?B?d0lFY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= =?utf-8?B?MXpwTDBXTjZ0UXhpYmpiREk5MG80QjBiUkVraXhkSjJoWDhtd1Y2RTRrRFJk?= =?utf-8?B?bHloOXZTckxmZGhCMzhwOFZyVU91a2t2SGZqM0hLUE5MQXpIMmVpNjR6dGVX?= =?utf-8?B?V21FUUdiYWlmVmorcXFhRUU4Ukw4MWY1UHpIK1kycmprOTVic0pGTVpja1Jp?= =?utf-8?B?eHNmN1dyL2l3Q2xocUFQd3pNM0VnMkh1cm9nVFZud3JwUVdVdTJtZXdUV0VL?= =?utf-8?B?Rkh5SDUyMzFxYnY4L0pGdEloRy9oS0lsNWF2b1JNVkJsSGNTYk1DdnpMSTI1?= =?utf-8?B?UGxEbG9GdVVJdm5JNm9oTXdVMWJmcHVFL0xZMlRrblRGQlc4Y1F3cmNhZ1J4?= =?utf-8?B?aEkyOGtacnpUSkhJLzQzdzRFbC8zL3pZdUd5VjNxemRyUTlwa2E4UWljak5P?= =?utf-8?B?MGphaWZNZG5HaDlRLy9wUm1ZNG9ZUXh1ZXlYdDhFZUZvclkrLzFja21HZ04y?= =?utf-8?Q?nPodn+Cxj++E8zHGQSs6kMG0dJETboHMXr7ZM=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?L01Da2pYNStpbEhjWWZmNGFmT3J3VXA2WVdUZ0RlUXhtZTltdmxDS1FMOENr?= =?utf-8?B?SGRjR3pDSGxYVkNFY1pZVUU0eG9TUmVpY003TmpETGw4c2F3VyttZ0lEczla?= =?utf-8?B?MVp1cHNKRHd6SU5FdTdIK0k0V1dZQmNIeVZMNDNZOFlKZXArYjAyRU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aDdQVzZHV3hTbmlNVDlwVXcwWVNlcFBDaHVESDNR?= =?utf-8?B?Rkl1czc2VGF3QndQKzl5RE9DNUJUVml4V3hJRHdLeS9hWmQxTG5wdHJOc2g2?= =?utf-8?B?V1pKZkMycGYraENlWEVUemRrQjVHM3JtWUczdGRqU3VCdEFnbmlLMkJjVVdK?= =?utf-8?Q?1GaUFhRg4MAwPgc8fNxfZlsKA?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6598716-c0c4-479f-c7a2-08dc6c3c0fe3 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:14:00.1186 (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: T+cymmIPNQaUTjAAeGY7giHGdI+UShMOKcu96YfvdEpUl5E3Du0kUO7KnLBy/GG82X25bBpZf2YVHU7iNXWLEA== 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/spear/pinctrl-spear.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c index b8caaa5a2d4e..a8c5fe973cd4 100644 --- a/drivers/pinctrl/spear/pinctrl-spear.c +++ b/drivers/pinctrl/spear/pinctrl-spear.c @@ -151,24 +151,19 @@ static int spear_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev, unsigned *num_maps) { struct spear_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); - struct device_node *np; struct property *prop; const char *function, *group; int ret, index = 0, count = 0; /* calculate number of maps required */ - for_each_child_of_node(np_config, np) { + for_each_child_of_node_scoped(np_config, np) { ret = of_property_read_string(np, "st,function", &function); - if (ret < 0) { - of_node_put(np); + if (ret < 0) return ret; - } ret = of_property_count_strings(np, "st,pins"); - if (ret < 0) { - of_node_put(np); + if (ret < 0) return ret; - } count += ret; } @@ -182,7 +177,7 @@ static int spear_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev, if (!*map) return -ENOMEM; - for_each_child_of_node(np_config, np) { + for_each_child_of_node_scoped(np_config, np) { of_property_read_string(np, "st,function", &function); of_property_for_each_string(np, "st,pins", prop, group) { (*map)[index].type = PIN_MAP_TYPE_MUX_GROUP; -- 2.37.1