From patchwork Tue May 28 23:55:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13677600 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 82C86C25B78 for ; Tue, 28 May 2024 23:56:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:References: In-Reply-To:To:Subject:From:Message-ID:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ikcp8tjOoE7XVnEbsIlXCzmUlOoZS2VtKr7S/ldsuCQ=; b=Pf8VKqXnqidZBCvjtJYybXXqTL T5QG+s+AALGbYGuIZaRDmG+kwY+i60Tm9rhLAo5r3B/5inwaXF1GKHIUbL2JdgxJNVj0QkJHznOQh bDiuYS+NVg3jg7ZSJm6bd2EPWMQ+F/FkucTPGl87Q05I4erLLAdBzVBnbUmXSTyPR+5K7VUifRIeX +abxssPlSlp4tHUTxbWE6yMzacmE7wTn/Fg6J5Yr8A8FPsqgiAI0KETds9cONGPAdN6/cucQUVEJL ALXlUw6cQgYk2bdIjithGXN3qfNEI0RVuR2Zyfrev4rYi8e/GnWT8MXhtqIMIJ7PNY3PaCNJ8tqhs 7OXMVAyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sC6ft-00000002Mg8-0FBX; Tue, 28 May 2024 23:56:13 +0000 Received: from mail-tycjpn01on20601.outbound.protection.outlook.com ([2a01:111:f403:2019::601] helo=JPN01-TYC-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sC6fd-00000002MKy-2bGB for linux-arm-kernel@lists.infradead.org; Tue, 28 May 2024 23:55:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ckSDY0MHus1qchEwewoec2iYOHJTUjjTa0Z4tqU2ZOKxVvzVXMaE0B+ydraOLCRZi/6kART5TFoNNi0QKMHojv5WtEkJLJuFe4bzCDkr1yfhuwrIWLJq/Opffzn3Zx+oGoHWLWsgAFw1eShW684guCaVjhAPmHNwvq1ejz4PljzCZYhXv8WEdkE1+v+82s5Km/K2XEId+OgB2ijBHRctgr/igHvhp+w+In78Vm6FQYS1eSf8wD9ZKdgUNisG+rygdwvdeKoLZOpx2QYiYrZiB1DkqOtmNesn88Tn1vs60w0QAATIlFt6OfawRTg+irO0SjXKPn79k8AoYEbJgBjmzA== 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=Yvgb2K2aJh6oMMOHfMP0OgSzXQh6pmIyQrdwEaHeLSE=; b=bEu3YAIHYFWKzpWsKuXf+rT02+med5PLxEC2rUc4N9Tl+sQEkihDxCgzE693SOYhlEJhi51ESwGlwBK1Tk0Rq/FQFS7FTQd7Nmk2IyJwixDPPqlIk3cE40Z/UN/f4UlgI7gIcasK4Sa7dU8wpoKfb3uVGTfnvCB+c8M0qN1ZtowrG5RtYm0c9c65JW9HHfyZUZTuMQmnJnKqA9cL28GrzBvKO6qK40htp2aVph+alFFstb+ezgqKpXw1ZMcdaSV6p32KcXqBpn44e8VtB763txhbe9TjUZ346NbKgC0rOP2VXzcWIkaNPmgo1EeRxRHsmruL3NJHLCsDxI0FYDSQ0g== 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=Yvgb2K2aJh6oMMOHfMP0OgSzXQh6pmIyQrdwEaHeLSE=; b=RVbfdBDTN5WtOTNoDzDR4GF7w5dDNmGeJqfRNKnIFRQPbRa0jKnJDkATxc3XWIOsCO/Vzi0fnZQaU0nZYrJU6qG5cz+nnvj+WG9dv4ZZj1ExKEDV6klOS5aqw93OQiJ4KUcAl6eEqRy+EhQ3Zay4oVgYNNy7fAJrejajiN+uEaE= 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 TYCPR01MB11224.jpnprd01.prod.outlook.com (2603:1096:400:3bf::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.17; Tue, 28 May 2024 23:55:51 +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.7611.030; Tue, 28 May 2024 23:55:51 +0000 Message-ID: <87a5k94hkp.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 resend 6/8] staging: media: atmel: use for_each_endpoint_of_node() User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: , Krzysztof Kozlowski , Alexander Shishkin , Alexandre Belloni , Claudiu Beznea , Daniel Vetter , David Airlie , Eugen Hristev , Greg Kroah-Hartman , Helge Deller , Laurent Pinchart , Maarten Lankhorst , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Nicolas Ferre , Rob Herring , Suzuki K Poulose , Thomas Zimmermann , Tomi Valkeinen , coresight@lists.linaro.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev In-Reply-To: <87ikyx4hm1.wl-kuninori.morimoto.gx@renesas.com> References: <87ikyx4hm1.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 28 May 2024 23:55:51 +0000 X-ClientProxiedBy: TYBP286CA0020.JPNP286.PROD.OUTLOOK.COM (2603:1096:404:ce::32) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB11224:EE_ X-MS-Office365-Filtering-Correlation-Id: 778a39fa-0cf7-46fd-e1a3-08dc7f71b45c 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:13230031|52116005|1800799015|7416005|376005|366007|38350700005|921011; X-Microsoft-Antispam-Message-Info: ty1GV/TjqVOC1W9e760LB2DnFMbvVLf0fMvoANr/yCKMzx1x4Mw2fohUj6MVki04rJ2HyMqRYGjBC2LQR8kEtBo/j8Kgua4AEtIS5C7SLe26a5Y6viusOBzFXBaCLEENquSbJz0S9IcLIyeVNCFxowjwYEajrG2PRYpBvqhFlGsp4oB1X7kUU5l04R2TUcIJRjwt3rnQdyl40VVGqzDyQi05npO0zafYXHdKXrP55KenAAElqAAUIp9I2zL2bkqgK4YeBiS54J0OAs1eek5hO+8vPpdU263jPjOILaHYnqVb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NANfVtnzPlDkAd4= 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:(13230031)(52116005)(1800799015)(7416005)(376005)(366007)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zfpq65ldnKdXL7EwIV/Qh5AExoBY+jqB5YfZGuCBL+Oj7LYErYsSOSDFXM+n0hwl1MiFLdJIDFtQreKbsY+WuQgOAslp5aIe3d74mDJGxY8PRK5uA1ckXRmvLcUVjgxiIhs+BQLXCZWYgQ3IXCti29VL8MsOgGcBceH/Wq24WlDxohpWVNkSOnr+rUgZ3QWgAJIULiJlOizivM+oDhgh6bbrTEsR81+5nR67CSHWmcb/1yC9BuEAKsILe6Di+fQm36+9DQDaw06lus3crgqB1l6guOi0D6XwEX5zCL7/vhlVFt/9jNlATvbCns3sbxsY05AgJIcQJUxsMG/lLIfA1U7AsyPIBriSuprhUIs6G6YYm1FqIAUsjcRWEkvmGUkY2PqN6ALrEZ7wTmEcOCmNCy7QOH4qp6j34tbTapWrapVJa+ZFKutmd7q3GSqKQOzTBFY/RaF+SPiVKgrLGXFpUwEGoJsqqkPNzQ5gZPMVZK3MDcaBWMO0+3kKdRh9uerF1cpUQI9iU8oSdlGqFRYq4eWg1m/s2qTqen+bMMGKF3/Kx3u+A1LlcDy65Q7G94TSPlVoYpWlwaSUeC9CbwQ6wGxJNIVo79jgHHrzCIC6Zc9z5rmFrXMytEMLbCC3od0vnDKgl8weNBKXHJgwlHRANb5k+PFY79E5tls83jcnqa9yDnCtexQBenDNGi+yNRuSkNWNGy4iwZ7PY5zytFITm5Jlxz/oXsbd4oTDBU+mPwT4OgdTQ5BIuwkLebwxjOztdbaLYvadV7W/eFLbPmmCpHPNrEdRLiFLIPzX3VYlAwOwNf34Y2bxrRCczgVvPMu2JdJpRYAMNg85h+M3cUB3ld82rcR58cPTQ1jhsxoORIhnahGruytkHtOu5a2+D3axmv5HJfENyOrxYMVONCpCa1pTznI9fkCjw1rKg25iL3BVTO10fz6LE/wV0RY/jcgs+9pWKs93zGpgqAW+tOgfb9DCzH+WJnPOkiKTjmtBIj95QG7bPskMutMNXpbCt4nAg4zCjAtrHcj6aVPQukhxYQ4+NBkqVSnxmDO/paKMWSE6PC7oMRYHdze1Vmzpl1S+TYs3+NB+tBc7tdFiSYUInHAKWLXaeA+yHK3hxgStHns0d5NrNM6BnLBfua7YDQnOvuVNVXFWJn0zQU4E54OC/c2MCuBMNBGV/Gp0qqQQSM475dmaQGQcY1kNcvGV+vxKuXqLPrvGUGX0FTgVseqfrA5Ak+IPkKFaC9HxY+lwIdNiphhwsTfPx1uXIl33wYePnqSbSbUoGyytCo1eTail7toFqZ4RfB0K+DvPSvjzOSomUP0s2JvjLsKyekE3CFofG1CwLQ7V25Fpy6BLBV8CXnI5hPXPMkkYN6w7ka6M+BSa3LvOtjYs+E3wyzgMnd30GX3qo9xc2xMuSjZnSogJ4s0/pl++RoXdZGwDNaBu30gS/j8MpXEyrOu2lqF41k4CLDejH8s2gBYj8kIxb1UpOwYS47oZdFkLud93q8Jpt4V+Icb7VSxqIlsCyyQ+IzgqQDJIzNZLJ++EtUfKJx2RcHVpFPG7VzrtBg30XPqZHSO/xBiZKYOH88ndaBL5U0DCs/Pvqk2U9q79l9L0AuS/APUYGEGf0yJU4OlS5f2FjZQ= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 778a39fa-0cf7-46fd-e1a3-08dc7f71b45c X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2024 23:55:51.4810 (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: nP5FWabUKayqWbUn86gpMBDepViQDA2xun88ElvDuqCD95gjPRD3izvJz/rLvgZErKZO8zKhmkEgcQRxDUMvFEGsqQMBw4VvBABPX6YZyyhVkXRum97+s3qhBeS46iWK X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB11224 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240528_165557_864850_6FF03B91 X-CRM114-Status: GOOD ( 10.93 ) 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/staging/media/deprecated/atmel/atmel-sama5d2-isc.c | 6 +----- drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c b/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c index 31b2b48085c59..cbfbec0c6cb57 100644 --- a/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c +++ b/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c @@ -340,13 +340,9 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc) INIT_LIST_HEAD(&isc->subdev_entities); - while (1) { + for_each_endpoint_of_node(np, epn) { struct v4l2_fwnode_endpoint v4l2_epn = { .bus_type = 0 }; - epn = of_graph_get_next_endpoint(np, epn); - if (!epn) - return 0; - ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(epn), &v4l2_epn); if (ret) { diff --git a/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c b/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c index 020034f631f57..7c477b1d3c484 100644 --- a/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c +++ b/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c @@ -326,13 +326,9 @@ static int xisc_parse_dt(struct device *dev, struct isc_device *isc) mipi_mode = of_property_read_bool(np, "microchip,mipi-mode"); - while (1) { + for_each_endpoint_of_node(np, epn) { struct v4l2_fwnode_endpoint v4l2_epn = { .bus_type = 0 }; - epn = of_graph_get_next_endpoint(np, epn); - if (!epn) - return 0; - ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(epn), &v4l2_epn); if (ret) {