From patchwork Tue Jul 30 00:35:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13746052 Return-Path: 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 E9570C3DA4A for ; Tue, 30 Jul 2024 00:52:03 +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:Subject:From:To: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:In-Reply-To:References:List-Owner; bh=TzMCVV5NPWYM3brKH+nwYP+wX2ZizcEpv6rpzs6d6YE=; b=kosMkG1KsIzK5yGt902dnoWo2R hmDjAqgZmiOeeGzgxj//h6zQtBqnY87zeT5A3OlCoJ8Pzk4e9I4nI/VxW4YeD8lRFac4fpcqE7etI fqftL79aKOJXKyt6iUyuAJn2Mc3LILExPQ0DE+/MPgtbaOSpArjUeCIWJV5oQTUlG5MMV363Y9n7F ChZnod4ZD84G0HZmUelsw9pK8cEIollj5BPbD1CW7uhRZoAIYLsCyA5w/bU94b3D+4TpiTrLyw8cF a9mwKvbbvusw/InpaitKxjpshhY0KV9gU0OPKR4hPusnrZ8y2DEz2fZ/nyCXa8W7333KIJDdfg0EF 2jIF2iWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYb5k-0000000D9dC-0EeF; Tue, 30 Jul 2024 00:51:52 +0000 Received: from mail-japanwestazlp170100001.outbound.protection.outlook.com ([2a01:111:f403:c406::1] helo=OS0P286CU011.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYb5I-0000000D9YV-39So for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2024 00:51:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=W+OWY07MbksGqmkyWnoeqRJIVMCRVA6IdEx/INGh4eJzQVDR1TxqB4Qt6SEolotgFwEg5hKUMoSJWiYnHTVQnsHuhn3HV6PEAabiV0jIcnt6R1I5wNFj0pDI9zauqDW6HKIHPOTxNOYCNLp5JHtU9qzSi+RCmPTUPe502YdGmlWwjxaWlra3JyB6B47pqLXR/J8c7l/crxtaQ9sVqavwb7Tx5AbN84FSGo9wcvr9ORJRob+5VDyFqRbGsMqvJ/4hJ9rwhr9k0jGRMKosoqIxhmINu8N5/KQ1XzePRLdiPdgMWZ4k7wMri5BjxLrrxQeoyMSCwd5EQgWo//ioJxKm6w== 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=TzMCVV5NPWYM3brKH+nwYP+wX2ZizcEpv6rpzs6d6YE=; b=zV5luwDrDOGwoLdrSQwSJMbDxesgOSocCb9p4iICcgO6Z1O6ZYLfsU8QtDqplw2dFXjOVv4BsCn1cVPBe0V9hQ7wd4a03A6w1/WZr/Tap95A6/a6eTwkauyQEP3QX4geUAzNFp4Jdel83VYtcQDpJ+mz/RrYtGTqSdeim4TLBau5wuJkWzHzJQCXixniaexuYJ6G8VupZz9NwZ2rwud3zmuFAKy1za/bmdy3ig7dbQBooNPwn2NnobkT0uZ0IiCW1zaJEnajS95UHy8PafWdBu698ab33JVkrA0le+K2KNrYDrRv+mCMDDMlQGhYdGEVY+n2+4c1JYrZjhKUYwfOWw== 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=TzMCVV5NPWYM3brKH+nwYP+wX2ZizcEpv6rpzs6d6YE=; b=i5JETKRyoBDCEzPJG+CxPzOz0+pdwO/9/L7CHitrFr0ZPKqxllJf57G5wXXtPY5kcz4jxeCB/EM66ZFQxh253IboWq9cGexMa4mH5obQ33NZn4OKjZoFiCtEZN23+EOoBqiK1erbmid7bpgLOQwj1HmEkXha5oXny6p3YauqBBo= 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 OS3PR01MB6149.jpnprd01.prod.outlook.com (2603:1096:604:d2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Tue, 30 Jul 2024 00:35:10 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 00:35:10 +0000 Message-ID: <87frrrlnsy.wl-kuninori.morimoto.gx@renesas.com> To: Laurent Pinchart , Mauro Carvalho Chehab , Michal Simek , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org From: Kuninori Morimoto Subject: [PATCH] media: platform: xilinx: use for_each_endpoint_of_node() Date: Tue, 30 Jul 2024 00:35:10 +0000 X-ClientProxiedBy: TYCP286CA0331.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:38e::10) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB6149:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e4f1e1d-839d-457b-8709-08dcb02f77f5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: bvsnmDbRyDLdf9lHczY3Vc1e9mZNgiTnhwuHaPhEp1fiytGsJGb8+ZCfr0BOSt7Bjw2oQFCbosBXGYYKy7xgprMns/n1Co8EtdU8nUPZOW8lsQJ4qC0lAoQ08tpyp3dB91FBJ4UmO6PHn2TK25nA2Xs2c17rc5fIo+WnMKyJGUrgiHPKDHYehIp45KRd2FU5U9RFkGxgDzG8m80UZAwEBhgytN8tdMIfFR9RaHtqo5z5vg18PixjDBum95sv03AbGjtdliDHkG0L5obBxYHgEA0lwrBn08a788PGRwGmsZN8OKiYZYqHo6UWWzwRxviejof9PKejbwe/6JZtWH4dwr2AwzndhR3/IRhGnpbsJVKlXVdd8DkytSPp2BksgoAZamk5g7RwPWk8SmtZ3ozBPb/dNW/cySm0XnNMFydjlPfYTn7bZEibmjiI96OQtf05An3kdUmSyAv/ZYY7gdkieQHlQT0UY5tyHDRELbY/wrI2OFDdXaOyjitXFjMTkxhJlS6hTc3C7C+zqmnxh16s0qEZroS5NV/+60w+pWZ7dce/sAwq2hgkS73SG8vINPT5NUuR0SbFQRZfm6zi4EetJSm9QOQzmPQrAK35Xq3ilnDUCrrGhU7cWS+PzrfFxWMcrIbJFXYHe9gmXfLwk91tZlnvy6ta2ot5uZ8AKTu+L3mRNAsvjNefFHYsK5+ihqRLTn+EcEGDKQxyDBUlLt5BgvdDhMUMgiSIN3sTCySexXlZLhcXysAzqcncA7v/cYEBnFmS1QZCW3JYPhUfvvQgKNv74W+yfTN7iy7Y8c85ojKM1PtsTiAEjjmM6qf+KzYC6CzCbqvEF4ULO1vx95NHo8AzgUQgkbt0DIp+BjQAIChgOFfhWBUBYzRnILxwtwLl9GN3lxUj5ceq/qWYN5hrWhNCMIpoHLu1lyWwoxbWG9qtz5nmDrKcokGkm7WYaY2Mvp8cgIskjLLncU2p9kKCsDr2oCYooGM6nwJGBK+XYnVe9O/W81VvuHLtEQKrQ1KwmYukUrmhjOdTkG0Wx6QI1Ojv1lm9o3QVRozZfXN9vxF+Gvnmz91DARrlSM3mt58RW6RCkVY0R2ILWOpYSNRGuQ6ysmJ8CALkQGfEzywEYS84mTgC094TXKYWMP/3pcTGfiGVcLGTbeViyTNXez/MQhHNB0mBhY081gmZ5cjHojCBZ7HmMo9EoQZ0TNmqDni9MSdec3n2OyVd/oUtGupkkh+tRmPu0j+Z9jIKStAsiDmKvEj1cs9stN+6qJl1RNVBvDHqiqpYZw4fH3FOIXOe2cXd2LNrirK8x9SS36PW+Fl5eK9CU5kV3W9jz0/B7O7+1GWguN2S1DNfEona08UNpjEPtZOOwpDzRNuwINgKYBbht8TAJkg1+/6Gl2T8PEzPfUePjBNsaKFWqWk23RNWwQ== 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)(52116014)(376014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: K6OCbAEHXwDP3fdTW31onEI8zOe/VN9KFzuOxR76PDZS9X8SenghPIfP6S/AuCSNNJKH9Cnc80KzLTm9ItX75PglGqr/gVJDeSjysWOr8BkEJauZ1WFJ5uqjFU3weTLfXpk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t87Bxid25Nts4o4gPGyKxkB5CyjhZl42mXadFL0hAekyvKCbOGUST1+1zGWt/yg6Dw8ctLYKEybnerJBJ2JGlZLURigZXARpbGSf+faN5TUFfbHxNioeY4jghNi7zvI7cxE4/Nz5nOY+76PyN2AmojoZNN+qlfOuuAFLnx0oT6YUIXPyPegMhT3yBOoAYxkpKhbFpTuz+tFpXlu+Osb35ZkftDzjjfW5bjd5uwGdiARjASdbuxzlKJePsvbn0dn+Uwl1+WdcNplakJBTPtz2rvP5hbGqcPP2RPnV+hwGO0kxnuppkNczP3G2qMmrDmRQPoBH7Ygg9B7PNtVliRrtCZ8bV4qQu0r3eKwlBN59qHVXBXKuVW1v67NEjyXxNG2CU9dBt8ZN2K9h8aVW7zGnlWcRa07Dfi4oyoiz/8bnpX6Xx8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8e4f1e1d-839d-457b-8709-08dcb02f77f5 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 00:35:10.3533 (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: dP/AxatUnWTjk6KRIGBSvzMiSyZo3HXxLcbpB+n7xJEUuV/P0VIlP/+2nMy8XRgMH9FcYCH6BqrwBDOJ4d3mbteGARvN2sD4fXtANa1VDnKxqLpRhIQiSMie7g166tSb X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB6149 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240729_175124_815453_C401D53C X-CRM114-Status: UNSURE ( 9.65 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org We already have for_each_endpoint_of_node(), don't use of_graph_get_next_endpoint() directly. Replace it. Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart --- drivers/media/platform/xilinx/xilinx-vipp.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c index 996684a730383..bfe48cc0ab525 100644 --- a/drivers/media/platform/xilinx/xilinx-vipp.c +++ b/drivers/media/platform/xilinx/xilinx-vipp.c @@ -199,18 +199,13 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev) struct media_pad *sink_pad; struct xvip_graph_entity *ent; struct v4l2_fwnode_link link; - struct device_node *ep = NULL; + struct device_node *ep; struct xvip_dma *dma; int ret = 0; dev_dbg(xdev->dev, "creating links for DMA engines\n"); - while (1) { - /* Get the next endpoint and parse its link. */ - ep = of_graph_get_next_endpoint(node, ep); - if (ep == NULL) - break; - + for_each_endpoint_of_node(node, ep) { dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep); ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);