From patchwork Mon Mar 25 03:05:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13601106 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 AEF10C54E58 for ; Mon, 25 Mar 2024 03:05:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DEBE110E56D; Mon, 25 Mar 2024 03:05:42 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="dgburxym"; dkim-atps=neutral Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2075.outbound.protection.outlook.com [40.107.113.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id E758210E527 for ; Mon, 25 Mar 2024 03:05:41 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G1qCsA2Km52QHuOQHnqbdHoh5nGwsW7eNfz6HnfbiL9elYqoWc/tb77NyEx4ECmA4oKCHJSOhlFVEZp05CsdDXD63mMVg9/QiVXRO/2cU0MOQz6WvRbwqIxUe7mognSLGqd/QXeZScfOdvc2ilBCvKiLl/HNYlAjrLU9FxL0Eb/bWKX9KfSkSfA1tW3DOotwoJkHy1I2YEdIWYdmxV+c90n0LXeTY+nJW8cdsWD/pQ4wQZKF39eg+O96ycccU1lwHCexB0QaOA1CTGf4hMz1S2PgunF48lFvncXNJ3vtYQSrh1IAMRlXlu8XOAIhU1eUGv8YgHL4XqafW8qzBvEclA== 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=WhWU5pMTa0RW9lB2L2jViSSAy9x86pATn/ADdUCQ1qs=; b=M1/VjDaFaP6EY9DpcXW2h1LL/38QL6M6PYLcEqAHBQgWTt42eji4hjdxYAanHzH2CzyiGLE2yx+3C3WPFpK78NwcqNZ+dSGY1VIA3PfzfOIPox9v4QAZ4NmByMrsxTbmtjOj+nzhDQPUZ8hUHxyTyH2wT1uOo9ocV2fkvbVLg6t1kXY6wdSPiRvRbxOSGYggPQoA94ecfkOvfoqsEKCKtciKrorz+HpZB6RNtRQ+wwT12wgFXAvMfy1T1SUAsqUUFe47TmrDx2zSg6RSo5lDGNxYZ/JICw4rsBVK047MfmmRtpYF2pACd/ZbIUk6dIagYoJyRZ9WSG4ra1prpgbccw== 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=WhWU5pMTa0RW9lB2L2jViSSAy9x86pATn/ADdUCQ1qs=; b=dgburxymTiuWgPc6tOGUbxYRBIscMmIvWHpHMTDuW/j7q+d/myhWtPyAmOKCR8ZecklAvDUzZcCSaJ5tUOTd3e16V0HvJ5qPaWw8ilqmxVEuq1jfM6zZt0mhSTpIBT3Nmv0dzSTgI1LO2k5YWshNEDSD/2kjT+fNnU4CcznMbhA= 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 OS3PR01MB6966.jpnprd01.prod.outlook.com (2603:1096:604:12d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Mon, 25 Mar 2024 03:05:39 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::131e:55c0:a4a0:713b]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::131e:55c0:a4a0:713b%7]) with mapi id 15.20.7386.025; Mon, 25 Mar 2024 03:05:39 +0000 Message-ID: <87ttkv57uk.wl-kuninori.morimoto.gx@renesas.com> To: "Lad, Prabhakar" , 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-omap@vger.kernel.org, linux-staging@lists.linux.dev In-Reply-To: <8734sf6mgn.wl-kuninori.morimoto.gx@renesas.com> References: <8734sf6mgn.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 6/8] staging: media: atmel: use for_each_endpoint_of_node() Date: Mon, 25 Mar 2024 03:05:39 +0000 X-ClientProxiedBy: TYCPR01CA0116.jpnprd01.prod.outlook.com (2603:1096:405:4::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_|OS3PR01MB6966:EE_ X-MS-Office365-Filtering-Correlation-Id: 457e2ebb-7602-4866-9569-08dc4c78737d 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; X-Microsoft-Antispam-Message-Info: aYNz118gGtVvozVPytM99Y7gp2GK2F/PuKOSEGl0g9Usx9eBBjbgFboxdbocuU+qk3TBsIOz1zWZKdvhQRjnV/jzRZrmUfZ8+CdmwixHmg7D4w87dvbqNaeBbO5+Q/lk7QdtgTb/bsmTmX+onHwO43+DtcxsYGz0jy+8KmeT6wzJIPonDMdZm0i1KrOzEWDMR4F2sAaqzNkEtVkJm9qByTdjTBQgyIKLIVnyaVTcXix51/5n20g2fo1L0f6Q+KSlyV4GWKKk40ZKAwkmQaZoEfAVwSa3WXtqiV+1e8mNBWolWEFZb6/08j2U59nr3axo06CO6sqc2cvLIS9IPamTFnXCPTFgeFQFMuiuVkQfVStV2b7c5ClYDMwORdcYGuBQbL2Tq9Iw9HmB9BMqEYlXF8xN1aB//k4ctYbjQjOsESoEbqOxdRJ0BWdTNiuhkfrpvvPQQSe/2CTmtN1MCF5EPuGVxY71HLimdjlfbSFUoHZab7wJqsppaZgOCjC2NM96C7HvM0np8f1stG8RDBu2jnLc+FGenHDk044H6dPYj47m2S92EGHbfEbKJ3VwG+8LEDThcloLBolWCxkNOq5oS+JZs/eurS3Ry9EszPUL8XhdQWUrdX//FskSH/Xn8Z0spXHdm8rgrQbukvD1rnWx3RZSNmhja2HkO0Z/M75JKxCYuY5PwOcmF0iO/TMc8KuS+fpRuvtyX54VZxVrYRwaT4ZLfEe24PmW3PK3wrEhx5w= 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)(1800799015)(52116005)(7416005)(366007)(376005)(38350700005)(921011); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jRPJ8qlyeWgtbwcH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Yu0NU0B/4jc29ia9lkVEDOIIfCgK7PoLA1S+p53Sg1RvCF/lOH8KK1mK3u4qEALWHSWCiL4ZI5k9vigMcZQ+6AYtfrC3Pw6tKVP8fBHmOm0VAN4pCvthY0Fm5rGoE6VA0qbvKLAGcP3eZO0VAgzl15h4nfp3+Lz8S4eMy3cEnEOq1QJ87IiL1zsTdhtpaVqXby33X73RhZ5Zu3W2YZc3+XFDf7OxE8VrWO2Ogewb5sJ3c8IRV/irD/PYYS9SVjHkjQH/Z2ooBEtSzmWJwZ0+4ccmvb1XylCMsZGbYtFKIwTgnM5C4OvqNlGU6hst9NVVTCfOIM9cdzREp8ZEdMsKhck8n4e+/C3W2bcQWNM8txq6ccbpwGaFC4IeHQPH+Qlu1REGS5iiJ9F6uvQ8yUOL26LL7ahrtCny7K3bxl4Fh6gQROuHBbrFEn3984S9SQULVtDP+YnGUsNSrXo6FOvgMXWHI3epFc4demb5zdWijoSO+NJ2H+n6CEFmJjXRTF26lRqxFlCOmzCxhU8WMuvZt2BL2RjMUs3M= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 457e2ebb-7602-4866-9569-08dc4c78737d X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 03:05:39.7941 (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: JL3FM5A5KLaDLJdsSp2L+pPB4vxbePao+76mly4RFOYWib0gkHvHUxAUi2xxB7rrhrUfQggvkxKgS7ZCWOByh+OFI2Ij19VQSH+AwSv9f7oAmWo73gQLl5q4OlC+cNu5 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB6966 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" We already have for_each_endpoint_of_node(), don't use of_graph_get_next_endpoint() directly. Replace it. Signed-off-by: Kuninori Morimoto --- 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 31b2b48085c5..cbfbec0c6cb5 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 020034f631f5..7c477b1d3c48 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) {