Message ID | 87set6rqvx.wl-kuninori.morimoto.gx@renesas.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5EF9DCF042E for <linux-arm-kernel@archiver.kernel.org>; Wed, 9 Oct 2024 01:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date: Content-Type:References:In-Reply-To:To:Subject:From:Message-ID:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xCQYjzRlD/dbDOC/L/E60JZMKdrk9KVawhDDbuptk7I=; b=IzuyRIX45RjgpbE5l+FFrDRkUU 3OmIflwM7jWLG5iIxVNMQJO4Cp2V0a0tM/6axRd7OJ1tqUjwLmCzxjTFp073qxrL9M/ZvqWqWoROz BdfkEs0Bw/YoHky4+arQDCYMiRgWV5O869WjE7KrBlVExmVkhbu44t59DClsBB10MLA6NKUzlUIk1 EMGAVTlRZYEDDEObb3yZqxDgEC7m7cM3zdhx1/m61cu6qPNe+yUeQa59KDL/6No/JlNq5FYsrcdW3 REmHodahuH1U1S3IduL4ThUs6zws4/vslJvo8Uu2otz3N5qYvvWJL6fadUxO3NWAFOQ/Hyi6tbi9g 4dQcZK+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syLrS-00000007e18-1we3; Wed, 09 Oct 2024 01:51:34 +0000 Received: from mail-japaneastazlp170100001.outbound.protection.outlook.com ([2a01:111:f403:c405::1] helo=TY3P286CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syLlI-00000007d6m-0Y92 for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2024 01:45:13 +0000 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) 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+Vnchhib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J+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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241008_184512_202468_409AE534 X-CRM114-Status: GOOD ( 12.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
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(-)