Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp446202lqm; Wed, 1 May 2024 05:53:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV1LOnruIzzK9Dxm+7o20YBEH9VX7zHKiN6aGOgVdkboZFy3Cn75pCJzJzRAZnugq7TqeHYRZZuRx/C7RPCpivG4Fa0livGv3G2sOLR9w== X-Google-Smtp-Source: AGHT+IEjM4851g/mpeWhYqQRzBd1LqeW8jeclKFbzZrMni58Uwdc2TrVWKoNn9MxJcohTckZsbW9 X-Received: by 2002:a05:622a:1e09:b0:43b:16d1:a6ee with SMTP id br9-20020a05622a1e0900b0043b16d1a6eemr8833022qtb.17.1714568018825; Wed, 01 May 2024 05:53:38 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ea14-20020a05622a5b0e00b00434cb18aadbsi12194764qtb.562.2024.05.01.05.53.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 05:53:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-165287-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=mrDsVXkm; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-165287-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165287-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 805F51C20C1F for ; Wed, 1 May 2024 12:53:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 832E312D772; Wed, 1 May 2024 12:53:03 +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="mrDsVXkm" Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2080.outbound.protection.outlook.com [40.107.8.80]) (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 5FD4C12AACA; Wed, 1 May 2024 12:53:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.8.80 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714567982; cv=fail; b=LRuJzlQed62HDdiTUETeaO2tia7URAcgGuOnvTsduQUNhWzd+pIxLmAog8a9VXN8F7iKFFpkxoQp1t7qg9rmhGU+Qq0LEn4OVsgI5iCpWsRd2wHEZtwx7KsJPaYyAY2aqZuIM5LraiXr8ZtM93BeOICD0zJXzooH+5t+Q0mwRCQ= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714567982; c=relaxed/simple; bh=aGocML37yKFLTQmAgdHIf5uoWsvtHUPQJME8EyVoT6s=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=GcVYZi/8qxzKcEbgOEd8ywBiG3t9m288Kscnsj3YceEw4YiiJKCQ9mkAKQDD5m6fu9nKCP5wRScUf6gKLBHFyhMX8epziRJ5fQnAEoQFotuxGgqoWKW/ym7NredMLMBadkOOq5oSEicNcrXClgnJbH9Y0ahIBWcTHpq4FvL9cTI= 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=mrDsVXkm; arc=fail smtp.client-ip=40.107.8.80 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=QpUpPWj3LUslORyhU7NqW0Z4XFf8H/CovD6oS76C+83yPoJscaMhBLW2LhlsK93q0el2gXTk0ZbrBtvUbvpSPwvNmYVJ9xkoIJMA628vKB4qFl125ZAyJn18sxfB/kqDJck8/qKmPYvWRvGVUNt6tDsJUPQUdihY61NiYKEGc5gJ/fSAL1cH9VZhPjghPD18l8p0YoH0Hl5n289qckXtQAoQIB5hTgGSoU08IpLOgO7NXPWFmou4vmG13slj0KCx89o2C2vQWizE+1u4twKLHbpX4rTWKTZvx2/QAnq4UvVb+e0X2sQgN9NAtHXmrjzH7cabLT3P1u7T8VqUUorFPQ== 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=YyGeWpCkYZh4WcKx5URim9X/pl2xw38Z9ho8YthB/aQ=; b=dZtKs39o1PgE1rl4YWTIZUQxv2i3w+xckFaDakRDfx50gW9lAyySMsfFSidtvbgOYhYCmUiR49C9yklB3MVOQE2uIrdfkKRJ4X6nGU+QJjFRBLAMh9G17WT4fxEwHNNU3mPD9hhN4WHKqAIkSdI8WPYOdburywYAlmOuUhUEYYkkpgcfOiVMuyjjGdBkIi4tq8oAnrL0S0yqBpv+gBBcaRLRxxpuyCVlMoAbtzEBLhHvV0bRNwKMPL3NTI6dMYnstGuCpkZwMOyRIEd9N1gqi1lkiIMJv/IrotZtDCD6yrYE17ogB76mReUZSAdKKSs/uyMG8Y3C7OLQ2xpvHsd+5g== 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=YyGeWpCkYZh4WcKx5URim9X/pl2xw38Z9ho8YthB/aQ=; b=mrDsVXkmUtziBoSBdjyLep7uqWVO4X5qKWOAYEszWk36fCksuvbygikVuT8Kke2s27TrfTKtCT9NqFDzrHvOX1f/wH/FNKRRKsGUC3x7/eIzJk1gY589zToZeZ4iLFja9Y3sP21qyn3B/9489XAxhk6jZu8+dlmncv7ApZ9gRZo= 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:52:57 +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:57 +0000 From: "Peng Fan (OSS)" Date: Wed, 01 May 2024 20:56:15 +0800 Subject: [PATCH 17/21] pinctrl: mediatek: Use scope based of_node_put() cleanups Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240501-pinctrl-cleanup-v1-17-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=2143; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=lm1PEdHATfoxwJUL9YMs41GxvVEK/pacMdZ5mWFlWX8=; b=9opStnvvifVa3C/7Di6MWEQ5dybv+YMYe/v16eI3vkA8ELbqt3EumCOS/cY4boy3ZcVAxR+Ys /w1RPbIr2kdCf3yCOuLiSFTt5g7rwevE2UcF77MN/YvcE4IrIOWCqeE 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-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_|DBAPR04MB7432:EE_ X-MS-Office365-Filtering-Correlation-Id: f1a3651a-3d30-46cc-ad5d-08dc69dd9fc2 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?B?R2lMVzdHbThCcUgrZlVaQlNSL2NBRzdIZG5ybEtPaWpJanBhUnZzb01PUzJn?= =?utf-8?B?bjMxYnprSmFxSjJYNTBPa2xEeTFtVHgrbWZVejhIZlI1dTBES1BpdWZwRjhy?= =?utf-8?B?WVBUa0hxa0pXYWtHTktob2VIUzhBb3pRSzRqdlA4a2hIeFdGdXVDZ3lHdmxp?= =?utf-8?B?YWhUS2doTnRtdVRuL3RmVGdjemx5VEJLZDZYbXF5MGVhdC9OK3drTVlTTkpN?= =?utf-8?B?czJhZUc0Y3ZPeWh5RVFQMERQTlFzMmcxQlJrMldNUUhlbEpVd1BZeFJ0bE9D?= =?utf-8?B?QW4wU0dUeGN2U2s5N0o5bkEySElmMnZzTDM1VnFSdjFHa1IrRWFkTzkwd3Z4?= =?utf-8?B?TDhxTm9VMExGMjJpSnpMQ0E1VW56TTE0V09Fd0UwVjV1WnQwYUM3dWZVVHNh?= =?utf-8?B?d0tab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QrL1Qr?= =?utf-8?B?WGRnellrRWRVdkdrRHVjUEloUksxTytNUGpQU1pNQ05iQzdqU2QyaTVQbzhu?= =?utf-8?B?dU5kY0VEQlcwNGMwL0pVSGRhVzQ0VHZXYkZnb09Rd1VqVHlwS04zamhKNXUz?= =?utf-8?B?SUMwS0UzMVNyQWJOVWxaaXVsYXZsOXNidFpUNlVHeEo2VGVvMUJpTnBWb0xn?= =?utf-8?B?dytidXprdDVOUVpLc2hrZHZkRDEra1YxMUpnYVNVU0tzb1RDQTVuNmtBSlh4?= =?utf-8?B?TUEyRi9tTWdwdG5GRXg0VG5mcHM0a3U3bExCZEY4bklzRlZBTExmTVdRYkgv?= =?utf-8?B?Y3RwL1VubzhWUWtNMUFhRVZOR2ExTWNLQ250cHZtdFVvVW1rZE8yVm1EZWlv?= =?utf-8?B?ZGZWWDJGWTZ5bGlMQ1FmWVM2SndSU2ZVZXpRa0czcEJxZHZSQXljc1p0RHhR?= =?utf-8?B?OHlsRjJxL0tVQWczR2ZTRDlYSk5WZWY4VzBGRmRhMlRNOStOTnptT0c4dDBK?= =?utf-8?Q?V65tZJfkZ6dTArMu3qZt5tWFQDG5QRUgV4V3A=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)(366007)(1800799015)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UGtMNXU2SFFFaXFRcEJHeDFQU1l3amJ3ck1aRWVsVHhqYzUvVFZmTXN5U1l0?= =?utf-8?B?aEl5NTV6UjRnc29wMlpUelYrdW53Q3NWK1MvbUtQdVhycmdnTU5EdWl2SUYx?= =?utf-8?B?UnJJSEVQN3R6VVRGeWl4SlAxT0VSN3hVQmdHdnMwVV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UlhmcGFyOUx1VnpPWW5PNFpjUWpDM29MZnlTMkpmQ3ZMa0ZNck10b1hC?= =?utf-8?B?M2MwNmRGOWZrVWFybmljeUcxOW1XQkZoVkllUktmSGw1SENHVDIwNFMvZW9H?= =?utf-8?B?WGkyWEFTNzRDTzQ0a0Q5ME0wSUh4UFh4TnFGYlQ5S0xkcUlqOWJ0a3ZCRkxR?= =?utf-8?Q?PHA61ryC+yhtOBZ8pzmXye8wu?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f1a3651a-3d30-46cc-ad5d-08dc69dd9fc2 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:57.0101 (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: D3oLRc6l+FkKfo79zh0DsHLNILeEjROEGdxGeEg0+nNZJ2mSCQbwMXmvOULDFDez2sxfMOKB3TAK1TIdpXdBYQ== 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/mediatek/pinctrl-mtk-common.c | 4 +--- drivers/pinctrl/mediatek/pinctrl-paris.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c index d39afc122516..91edb539925a 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -621,7 +621,6 @@ static int mtk_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; @@ -629,12 +628,11 @@ static int mtk_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 = mtk_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; } } diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c index b19bc391705e..e12316c42698 100644 --- a/drivers/pinctrl/mediatek/pinctrl-paris.c +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c @@ -536,7 +536,6 @@ static int mtk_pctrl_dt_node_to_map(struct pinctrl_dev *pctldev, struct pinctrl_map **map, unsigned *num_maps) { - struct device_node *np; unsigned reserved_maps; int ret; @@ -544,13 +543,12 @@ static int mtk_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 = mtk_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; } } -- 2.37.1