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: 13677564 Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2051.outbound.protection.outlook.com [40.107.114.51]) (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 EAE6513E881; Tue, 28 May 2024 23:55:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716940555; cv=fail; b=LJgeKtmqkHqOWaE8RK+TMrZm/1k309nXkds9AMbrY3EKRIcl3HPWqZ6oRtkbOQjCNaD0VZKM9IKeNaRuvvg045iFEB/1ORutcSvVdrNK4gRak+DfpD3Mc9FA2TWkcrFnn7njVbko15NEA6Z0YGk+MQizeQ9X+RxUtMOd4Q3KqrI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716940555; c=relaxed/simple; bh=M9tlhhl89kOUGh9b8fIgboKIWyohFyWXG5apH7pHDgo=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=bf5BbWjxsfdle2ogBbxP78ASH7a6AnjfofMtl3amb5ya4Yjz8e5tSTyeDG9SUhr7xA/4o+5hmyjiH/PvYWs/5NiZThCWSwW+Xr8vHCVobwr2UR7pWA772Xwv9QJc8rqcWDAvs2e81IzZsgE3Jjxz0VanYemTCuJBzz92SjQxz/c= 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=RVbfdBDT; arc=fail smtp.client-ip=40.107.114.51 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="RVbfdBDT" 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) Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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+8vPpdU263jPjOILaHYnqVbk0mBIt5u6q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kAd4= 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 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) {