Message ID | 87set6rqvx.wl-kuninori.morimoto.gx@renesas.com (mailing list archive) |
---|---|
State | New |
Headers | show
Received: from OS0P286CU010.outbound.protection.outlook.com (mail-japanwestazon11011058.outbound.protection.outlook.com [40.107.74.58]) (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 F2A213B1B5; Wed, 9 Oct 2024 01:45:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.74.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728438310; cv=fail; b=nVggAnyw10Pqbyk46mI6rrHHcv/luMDTQEw0L1rN/PBPowXepjDHVfN69vPuu+kZjKkZt5TZDGsZxxRcZ2Zp9TLzfZVFcNnb5g7uvTxT36CSR54kEMUOIJZ0ytIuSm0wBZoZeuIgwCDWJMSuSbxiF8DJKYuPjqcfexlGVEEY7Tc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728438310; c=relaxed/simple; bh=a/HhX2I2MHtNAskyBJfjb3sxmyvCxBU4RSflWa1UxQU=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=HuTmbmPfcET/b4nkfXvnHEisOEV1rLIrMs7zqvJrVDcGOj+nyxHutouNmaiFGpjN/v/TyXBbi4yuOLBfxJlWvZL7oWG6af7IWAxWWRthYuTF/Rvzic6Fukms20KQ7OEkJzjQxgw2aHRBjpn72HOblN9ePN+n36oDyOhLpj3fB+o= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=RnCCnrk1; arc=fail smtp.client-ip=40.107.74.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="RnCCnrk1" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=s91hgBe9Ja1fsry+HELBkDcfUxXmD0U2N5gnqSfd05+Cx+VQ97K5YuWbORZYAkMf+bC/77+HL6aDKKQi+xeYliG4cqz1AIrtJNXqsQlHy/7Foiefs8h2n13vRay96Ce8o8rV1qwVy9QF3KDg/Zzx0vGMOnvDxBqgDIg0G7imPzmhQXNnNQrinYoFFQdZmXL4NQ2j6UvZUImAOerllzNMbGRRyLEa/M8TT5++EdwVM99nZoHkqqkTFsXaxk/imRwPjjd+X2BItuQhdxTQMeidUWgCGJEF/PiNa5+uC5J2BurfUQbU0V/wZtYmUcaDT8zJ0g3fHfZw9HFkfO2zvn09vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=xCQYjzRlD/dbDOC/L/E60JZMKdrk9KVawhDDbuptk7I=; b=JniGmn5xJfVccJ5GJK8PMVef3cDCKC4Y5CAvd1Y2NrEyuw8z4Q5Eot/Rm7GurKwYiZZ3KPoV0ElJY9BGD20e6z/t5DsnmRHLkSkXe/RCUishUsIacZWODdWY5HB8OW1TU0kVFduB1vevPigpKjMiWu5YCx3YfWcQ2NwDRPoiEOjjrL7+9Jj7NVR+P77T+dNzd0DSCRXxM+aQNp8aWveB6ci6R8ROxem3NsHhkSl/06+WRB/dgLA0ReN63amRoMJlfXwchLuTNTV67UVdDnswFuJlqSyL9ptJynMAc+e3/1u+nnbRpY5JJthME3o63rMiRvdVFqAiFakeW2FCZyRGXw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xCQYjzRlD/dbDOC/L/E60JZMKdrk9KVawhDDbuptk7I=; b=RnCCnrk12Pmp7WnmZYQRBUoDjaMGsNJ0afm6imSoUQn/UQVkweedWybeoFG0+UF5wO5v4KZBUVSB/OhZAdul4i/aNsDPzdgtaKGtYaZ0mEXjYf51rUCxFMgB84W4VmbQ36nXQrI8G8aWbxor1TUJdk1qJ0X4Bat9/424MuERTlk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB11140.jpnprd01.prod.outlook.com (2603:1096:400:3df::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16; Wed, 9 Oct 2024 01:45:06 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%4]) with mapi id 15.20.8026.020; Wed, 9 Oct 2024 01:45:06 +0000 Message-ID: <87set6rqvx.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Subject: [PATCH v7 3/9] of: property: use new of_graph functions User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>, Helge Deller <deller@gmx.de>, Jaroslav Kysela <perex@perex.cz>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Liam Girdwood <lgirdwood@gmail.com>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Mark Brown <broonie@kernel.org>, Mauro Carvalho Chehab <mchehab@kernel.org>, Maxime Ripard <mripard@kernel.org>, Michal Simek <michal.simek@amd.com>, Rob Herring <robh@kernel.org>, Saravana Kannan <saravanak@google.com>, Takashi Iwai <tiwai@suse.com>, Thomas Zimmermann <tzimmermann@suse.de>, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-sound@vger.kernel.org, Sakari Ailus <sakari.ailus@iki.fi> In-Reply-To: <87wmiirqwy.wl-kuninori.morimoto.gx@renesas.com> References: <87wmiirqwy.wl-kuninori.morimoto.gx@renesas.com> Content-Type: text/plain; charset=US-ASCII Date: Wed, 9 Oct 2024 01:45:06 +0000 X-ClientProxiedBy: TYCP301CA0021.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:381::18) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: <linux-omap.vger.kernel.org> List-Subscribe: <mailto:linux-omap+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-omap+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB11140:EE_ X-MS-Office365-Filtering-Correlation-Id: 3d922865-a54c-4c59-6bc0-08dce804006f X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|7416014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: +3FhqUvMHxYXeQEYoMGBwp39L5a78xCwnvbFyHI9FuFi6Lcs/U+Vn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zwKJ+PoVHh65lcdn2+UY/hG0oRuqDkrXhMLb0c/Gl8upsx7cEMYdSf12exBEUY4oGuOHV9aKsr8wedSGn9t7OopwhD3OMYTJFJGE8AgArVkf7/UAES33SnVflf3bRxtdYc7UHwU5dJ9itSjHkc8htaPldpP+R0lRmLg2L/K0XRr4GYg4s84C4ix5v5V3Dj7KzQpdBfvaAKj+PtfUwGN5euf1mOqxtq9tww== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(7416014)(376014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: srOYJAy0XwBNEaYL8mOBAa0wcpwQKNVcmybX4HiA0nvNaD3lY9D/h0km/u/DBOdvWTjfld/hK2rf2euOhJV6FgNgjlKcrLzKBR3mfqDlLf6dJhfWiJ/VMu7gEtiFF8a+YQzPjovLTtKeCac5+BUgHiyHtdj9WJpFXPciIBWwA88tRQ3rhMlrvSRB73QkDtmduL8Fb+b1Wi6+KC8D4VKYa80IUDvb/TNh5oBGujrqgPBMOU8nFQazgmXGNOtK37mvAbanOjz1uqSx75Rjh+l2D3YxIyIDIFdUrzkTveZpAY57p+YiU7uTH9WVsXRSd8B7YJX8s0tYUahOcnm8xCOmkHegICR8Qyhb34hMaNNHnYDFKfzuc0/yuVqxs61IGI6X8LxR1JWniAC/Ne8X2Z9DkyL4Ieu+7+Lbg2DocEjlxd/jYDUCxGZRcb1GGPIaBXFvx13yVxedpS3Okrzd85xSLOAaGrWJbfMesvajhHzC/PECO0cZJ5S++IIP74hEcSikR5t1W0BKrfOB7QEDR/bUk1Zq/dy9StYHS86+SjqT0idAPz0o9T3jvw50Hv9knU/ZAPzwLQZdBG9ZBsMSIxKbzItLxrMR5JG3tHbVN1ynH4yIzpcggSm5DRJen7gTDxWo+t3cuhDuiyMVsYEZnQ/TZe+YlRBBTcICWh8kOWO6nnwQjgomK17BC8pHvXm9ZUJ5HRokKvOR1B1RImh0j4eREu4aZkix9gun6cSJsFhMyCzJggyoE13rkmBmq4TsUWwV0VMoEVoEdLvlspZOXpvIYqqlKEmOnSBILQpWQLrfgooNIdPNtbEsxVu/fusTqH49RsC8QnfLtqIMoypi7MIJ69IUTpiCvgNQobdskz4r+gso3qhA7UmuCdnx9W0wlHeULw3g+fdxO7fZOif9w/ATgkPhVj11Tfw4kt9EPzL5BH3w6pYB0CYQH3SwrVWiAx9ZIFqW0KxZ0T5o21qJzruApB5NAut/M7hErmSGl5JSKXDWmtFfrnKjQaWjXuJ1kWUEnHhTwIWyoH/2SMGpk55MSnJAxH0fZZfhMwALYgUbkPz6nH32anzVe2ailyQ/D0k5BTmBgtU2bcArZAf3PT6rXGwsc+Q2LIuiUanCfuSaWEGIbP2NDJf+won7mz2/Sgy/fGrAXl+Gejo/nQqhgAEIGFICt4KCTfUvB71aajxfdSHy2aHG6ZnroEYEXmzuM/DDScSXM1AASapz7np+P+shNFi5Eko1oBhD48318jeqkkDXSB3pPt3ycc+jKLhi6AMKyyafJshG3CCLwRFLYBopLHKm/mCSp+JwQxvtFHKiWoOo7GXoBk/GkoBCVpWTmDck/BLbgMXJU/MN9R7HneP3Suk61C840/EfJR3tELd54na+V3YZ3UjR2wrcPwyOoSLqdIZWP+zHlWk7SxHeAsW/4TbK54dOxeFkHZY2IUqF6E7M6EVjmQoSul11xmDnW4gJIV/TLYqmuqT4cSWwdjpYjeCOzn/PwygM4Y758nDViJK0qGEIbZec2YFupwFlrxyH8TVJoDODh4PNEnccb6oRORlb0F5XO3Km1f+f4lEbxQbpNchnj3Df+v39xEWVKHT1tIuTfhA7CJgJEvnKJI6FzapLMpPVAqXieOpyqpT+bxI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3d922865-a54c-4c59-6bc0-08dce804006f X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2024 01:45:06.5464 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kAztUCgX2rMa4jlSXipgsH9xVxEXea6PbJHPCF3r8nn4G8y9mn0To1KJsFg7Y8NB0V6CSgZN1FnK0y74juBsU/kAFmopGP8zGOrqtUqSBk0++AVgCAeZ8Q6GC5ECpusE X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB11140 |
Series |
of: property: add of_graph_get_next_port/port_endpoint()
|
expand
|
diff --git a/drivers/of/property.c b/drivers/of/property.c index bf15bed69e6a..7c1a8f36e314 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -717,13 +717,7 @@ struct device_node *of_graph_get_next_endpoint(const struct device_node *parent, * parent port node. */ if (!prev) { - struct device_node *node __free(device_node) = - of_get_child_by_name(parent, "ports"); - - if (node) - parent = node; - - port = of_get_child_by_name(parent, "port"); + port = of_graph_get_next_port(parent, NULL); if (!port) { pr_debug("graph: no port node found in %pOF\n", parent); return NULL; @@ -741,7 +735,7 @@ struct device_node *of_graph_get_next_endpoint(const struct device_node *parent, * getting the next child. If the previous endpoint is NULL this * will return the first child. */ - endpoint = of_get_next_child(port, prev); + endpoint = of_graph_get_next_port_endpoint(port, prev); if (endpoint) { of_node_put(port); return endpoint; @@ -750,11 +744,9 @@ struct device_node *of_graph_get_next_endpoint(const struct device_node *parent, /* No more endpoints under this port, try the next one. */ prev = NULL; - do { - port = of_get_next_child(parent, port); - if (!port) - return NULL; - } while (!of_node_name_eq(port, "port")); + port = of_graph_get_next_port(parent, port); + if (!port) + return NULL; } } EXPORT_SYMBOL(of_graph_get_next_endpoint);
Current of_graph_get_next_endpoint() can be replaced by using new of_graph_get_next_port(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> --- drivers/of/property.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-)