Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp445349lqm; Wed, 1 May 2024 05:51:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVtvlJBe0i7MhkkMGfRBr8qqWWk/OSkvfRquGAbYCjQoysacCPgPeKeYKBXpIfVHsQxU6x/5B9vOtM3PnwSfUbAOY3RIxmQEgP3pAhSjA== X-Google-Smtp-Source: AGHT+IEVC5NBIZUV83p2ey07wSRCfmfUZ9LYBHF5Jce9q/bSYmHOo2TfJU++aBJrB6yrZKKl16Mp X-Received: by 2002:ac8:5ace:0:b0:43b:355:3a5f with SMTP id d14-20020ac85ace000000b0043b03553a5fmr4539940qtd.27.1714567895279; Wed, 01 May 2024 05:51:35 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p3-20020a05622a00c300b0043c6443d5d9si2936494qtw.435.2024.05.01.05.51.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 05:51:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-165279-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=dj2Y1hA5; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-165279-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165279-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 ED2861C212BA for ; Wed, 1 May 2024 12:51:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5770D12A14C; Wed, 1 May 2024 12:51:26 +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="dj2Y1hA5" Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2050.outbound.protection.outlook.com [40.107.13.50]) (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 22F3286130; Wed, 1 May 2024 12:51:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.13.50 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714567884; cv=fail; b=Fuo4cb5qeqeE1OHHu4V68xSKkuf8rPKEtIa3SbI4G/xsaJpe67APUGbsQlndumC8j86ztynpxGQUr8DQcYb9hZXDEA1x5Jac3JkMKvKJi5DC2b3MLtzgKuOWMzN7R/00ZOsw1SgnQLXLEU65Zv2ZoVV1cxQx51TsLBKd0NHDe/M= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714567884; c=relaxed/simple; bh=sxadJ9Jx/Jbpg1I1XOHOXDtWzle1Y4bjmwEu0knRlXo=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=ESRTCQ3qyMDraMQ86hu1ImhNfF6U2h3hj5oaxJnjqoal0KeJnu/P1PZqxuTlM9NG5z8J4+FL7gYplAVQLoGJ70dCxlPJYp4BxpaZczfcPjP9cFCGtHAVQCI/hbkhDMrUocgOgK1HBrUAuCH9M+Hlg9qDWWw1o+Th4K/sAGKizxA= 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=dj2Y1hA5; arc=fail smtp.client-ip=40.107.13.50 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=TMjFbsIiXq1LHEgsA3ixI/2sBjf75yy+EGoA+16wr0ZgFR9rJwfPZo4RxFBTJAWxVrBN8S0Dt+p7fz6mxajEl+WMfG551SNEyG47qfspe8FdPKen7f0nIeO+kF1aeS+hHxz93F3/cByOckwEil9YkR3A6JZpPp/S6Oid3ZtnAG1BTiHDayQGWjkFbtpDGBmXYxn0h9WFCC0AT4tjUeZHZnBrcUeMIC6gKdCcUQGfcgpWROHfU1rgoQhXpNB4ycXpo7jE8jhRWHsozUztvyzCKz1oYZsrBhWB+TYgMcyoPelBmxjg2cMCdgO1Fixc8zuQlFak53Xu14vRVlm/Pd0ZNQ== 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=mbEJJaKpKS6weuAiMZixNk2OarOHo1VXIEj/qtenGtk=; b=QTla+OcFnSCdxck/L1CmKTle95eTf3otVhk9thvnmFz4muwbNDDFC7Rw45tUc/ViSpCh3E1zSkHODoxfDrhKeMqCJ3+YHb1x+nRvd++lFl+ysrQnCgUMuf2yvRrFWEH+p/YCTdByNyxIKFd6OmDAudicMat1sUDZUMMrdT0VkbejHtedWgyi48v99c+TUEmz19IsgPwHteoxVDOzPOS1Zt9k8QHdKrweH+aViMKaRCOS2WqZMEL7H3+jUpXrtmUXMcaHilzPaVPl+JlvJA6OQe9TPsAmcDZjSaL+hS3WtoFuwUALQ36JkVPMKzgORNP3QQHLECTG8td60mTsg/qhDw== 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=mbEJJaKpKS6weuAiMZixNk2OarOHo1VXIEj/qtenGtk=; b=dj2Y1hA5TvwIt1YXYlyAtPCWArlY3X22BcqJTyzgqjHvGQGpk3Jhd0IOOauzRmaC/urZ9KcYRolsLJwiKWc7ECxxWuzMpU9wWlnBoMnUg5iuB2OyYEzEzNSnZwigNJsddfxqqt8jy+/BsNgKmRCcV/Cy5NGSvOfTZTp4P5B+lpE= 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:51:19 +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:51:19 +0000 From: "Peng Fan (OSS)" Date: Wed, 01 May 2024 20:56:09 +0800 Subject: [PATCH 11/21] pinctrl: rockchip: Use scope based of_node_put() cleanups Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240501-pinctrl-cleanup-v1-11-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=2432; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=6jcg28TPgcdPG2SX4SEdUQ95I6NxhvMbPnDkkfvsxtU=; b=MtxL5cVJ07UCK4MpPHQZwS4C9+vMA6NCki7BU+bDlc/KaaY6OQpFbx6ZDRJWhn8VS3WCdSOUO 5P+3Uc+nHCnBaBLYibo6kG7o4MFExBczK4qA7vKY7lOtXIWARL51rRi 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_|DBAPR04MB7448:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b9a488b-1fde-4588-576a-08dc69dd65e5 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?B?VnE3U0w0c1NPa1ArUU5GSUhVOWtUbnZVS3hYdjJ5WGFaTFVsejVzYzFpL0J5?= =?utf-8?B?YjNLcXNDVG41RHBJL3BVaFlCMmozNGNLRlpOL05KTmh3MVNHcU42bnhnRWtP?= =?utf-8?B?UU81dERXKzhiUjV1Q1QwZ3haVGtZcWsyTTMzaFRKWmtWbVVVeUcvZHEzQWpk?= =?utf-8?B?aHdxSUk1QlI3alNIQmo3N3gxQytQeFp2bEU4MGM1akdMYVh3V1IyOCsrN1My?= =?utf-8?B?dURBWGRMQTdMQ1hMTkJVU2laMWRsRXd6SGYrbzdXeDcrcGQ1Um4wWXl4NTZs?= =?utf-8?B?U29XcWVRbXdncUJ0N2xpWU1GZXVpNFcvSU04VWZHVHNHMi9ZclhZemMzMkNI?= =?utf-8?B?a3dHOWZ1RGRtZ2lyeFYzUnNjNXAwUmRMOXBaOFZDcVV5SXpzVmRSN1MyN0RC?= =?utf-8?B?ZnNWZGs4dkcxTUdVbFd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f-8?B?VU9jMjNncXZmTEtYaWtwSFlGQlRnOG52U1FDeWFLcFBubnpRQU1YRVVEZWRH?= =?utf-8?B?eWgwdnYzOHNuekU3UHlaT3R6N3JXTXkwUnV5ZUcrUDhSMEdqVjNlZEluTWZq?= =?utf-8?B?U2U0NGJOdittdnMvUW9DUG5EWHFOMHVIbEFIVktoYUlxYTc2aDNveVNnakx6?= =?utf-8?B?alEwVlA1ZjA3a095Ny9BLy9lbkF0b0NWT2puZlRRVmRNZXpzYzZNbmJ5czZ0?= =?utf-8?B?VElJQmNkc2ZaKzZYaWw5UW9qeldZSnlYQmYxb0hscjc3eDRTak1mVWNMcGJC?= =?utf-8?B?VHNheDh6RTZZclRBMnFFcXB2TU81UlpWQ3FTVEFQS1pJZXE1emluSXEzZkts?= =?utf-8?B?TGhPQWlya2VPbFYwUFhkVGQ1QWx3RnRmODdGeXIrWXZYTlJwa016ckg1QWZV?= =?utf-8?B?N0Q1dGVXZ25xZUI5eEI4cWlKT21HRlVSUXJ6UHltSllmb3pGMEJvQ1lEUFRi?= =?utf-8?B?SFcvVkhqTEdEY2VPdFExQT09?= 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?B?K2swL3k5RkdvbXVScVYybm5DanRrSkFCektPSWpDalFkSHFWTW92VHg2SnNK?= =?utf-8?B?L2J6bE5vQmhJejI2ZWFwMnZQRkRxeU1zTGd0UVlSUmtzUEsyQ3p5QnREa0Zh?= =?utf-8?B?NXR3UXd4WU9OR1hoSldrdWUzN3QwOGZPdmdkZVpmbVV1ZFdmRXN0aldlcE9S?= =?utf-8?B?azJ6bDFFMnh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BpaEFDVXhvRW9DWVRyRlhnUUVQ?= =?utf-8?B?SUMwT1c5Q25YZjJDMmZiNHUyNm1vK3NrbEEvejdqQUszamZOa2JDNmdwdTNq?= =?utf-8?B?MXJVc01waVN0YkhZbXBMbjZ0U2s1Ym0veVZ6YmdYcnV6QWVZRzRsWWRIZUhL?= =?utf-8?Q?kwwsONjE4TCSyhA87APg9jrq0?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b9a488b-1fde-4588-576a-08dc69dd65e5 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:51:19.8966 (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: RmREWTxOjqZbA+hijFAivyO/qvvvjM9OO3ILcZmr6eG3JlpsS6rQp70tf6pynNEjzQFHJhBH34gnn98AhHV9FA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7448 From: Peng Fan Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan --- drivers/pinctrl/pinctrl-rockchip.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 3bedf36a0019..5c09469c84d7 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -326,7 +326,7 @@ static int rockchip_dt_node_to_map(struct pinctrl_dev *pctldev, const struct rockchip_pin_group *grp; struct device *dev = info->dev; struct pinctrl_map *new_map; - struct device_node *parent; + struct device_node *parent __free(device_node) = NULL; int map_num = 1; int i; @@ -358,7 +358,6 @@ static int rockchip_dt_node_to_map(struct pinctrl_dev *pctldev, new_map[0].type = PIN_MAP_TYPE_MUX_GROUP; new_map[0].data.mux.function = parent->name; new_map[0].data.mux.group = np->name; - of_node_put(parent); /* create config map */ new_map++; @@ -3057,7 +3056,6 @@ static int rockchip_pinctrl_parse_functions(struct device_node *np, u32 index) { struct device *dev = info->dev; - struct device_node *child; struct rockchip_pmx_func *func; struct rockchip_pin_group *grp; int ret; @@ -3078,14 +3076,12 @@ static int rockchip_pinctrl_parse_functions(struct device_node *np, if (!func->groups) return -ENOMEM; - for_each_child_of_node(np, child) { + for_each_child_of_node_scoped(np, child) { func->groups[i] = child->name; grp = &info->groups[grp_index++]; ret = rockchip_pinctrl_parse_groups(child, grp, info, i++); - if (ret) { - of_node_put(child); + if (ret) return ret; - } } return 0; @@ -3096,7 +3092,6 @@ static int rockchip_pinctrl_parse_dt(struct platform_device *pdev, { struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; - struct device_node *child; int ret; int i; @@ -3115,14 +3110,13 @@ static int rockchip_pinctrl_parse_dt(struct platform_device *pdev, i = 0; - for_each_child_of_node(np, child) { + for_each_child_of_node_scoped(np, child) { if (of_match_node(rockchip_bank_match, child)) continue; ret = rockchip_pinctrl_parse_functions(child, info, i++); if (ret) { dev_err(dev, "failed to parse function\n"); - of_node_put(child); return ret; } } -- 2.37.1