From patchwork Thu May 30 02:06:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13679677 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 9097DC25B75 for ; Thu, 30 May 2024 02:06:50 +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=WwN2hngIGJDyM5s7dilwzAAfFP6xDY/OPuB+Uc6LQcs=; b=X/iWwjuOEtRCI8qNYiaq9ms0tn rwymCZv3kDNvFHOq1E8GGtD9BcHhfoX3JQkN4Ddbpu0QeBqfJFooRgZ9e04vx0ZbyuhfI5ulihD/y /MaZjW8Flk1Yg0PV/xNytpicz3KaiaMHeDGKOlv7MzvZ3Vmcd99vc5frVdDKIg+fPqyrTTIcpnBhi m/LaZCItdP0F0QhUZI09dd6IBnHIKrCUhjdVVt1o0YGz8o7B37bisEJn/GRfV4a+MWJcgz9at1rpH vRO32JlAN+Tbv6xmFGlNvRW4E9gHJNB5YPNOa5HQmyCE8QK7Ip3O2Nq7bp/c3vzB4lRjhjX7UW+Uw t6Hgzg3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCVBg-0000000649T-0x6u; Thu, 30 May 2024 02:06:40 +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 1sCVBV-000000063wC-1tPF for linux-arm-kernel@lists.infradead.org; Thu, 30 May 2024 02:06:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hQbMBu21rySj3PORydf+uwqovN0Na3Xo/wwsu6ymE6kzV6St9DSp+I3LZ9+zb9twpGhxUHzEeUWpuJMW2+lluS80qgK3n+eoG09Q87RgTPJDpoHALJ8AGDjR7b89nsTUNcxKcJSBWfKGffq6TXaC4pVm7p+6lYGocaljlHLWz9Mj+O7YD7uFLZezIT4f/NxdV3JTrU2wCMhSIP+CnkqAA+/w11kKPnE1IuU+BuvncZnksDDmPd07RhtbIykdkegrfUWM4rGvmwbhsR3SCmYV7x3lcNomGz8IoaitAc3WXE4zmm/woj00Lpmr6F9/1xV5SzKcHeuOl4XbMB9GUz+sqg== 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=Q3vqksv/GybRwRfvf5iD9mFwpkjoL6qLD9V40ien6ds=; b=RDuyzVpgiMMIcJI7t6njuFQ1u30vEnCepsgxj++7JCbIAC5yt8HuX19ec5E0lQs/QyFIi7L3duQztj3EMDvctN+2CXWpT876i8F8aKj97p7hkKFIK1LwkRmasJyY/2fy8pYFhZsb7d1J1Q1QeyhVIyklU70rAAcbeKFqk0p299kV9ekQp/Q8NrYWjIR9jGdq409TJOrsn3Nk5s3n0ln2GXk/XiocekS3UlOUHi1QvSmsiLOVQkVB3k0IZleN9X5F0pbqSQMCOiJTj23Ww7hRefpyuiG0dkiDBWwZimSdiutkgaYJOm2+3G/7CfVnP7ojSujrRp3Rps5qRCubyQJL5w== 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=Q3vqksv/GybRwRfvf5iD9mFwpkjoL6qLD9V40ien6ds=; b=MktLtXW+kERu0TJZ0xgVIv2U58Y1mtPN32S4upArIDTKlMwyCmT8huCol5n9DwB6wdykAjwnEqUhD66jAjAy78c70H/uJtBHhJBzmYHa6GgZPL5tofiLu+O1clgw6yCj5y4VpfpdK4QqDAmoXog+dg/SGEUO79s2txhDTpGHKJs= 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 TYWPR01MB10240.jpnprd01.prod.outlook.com (2603:1096:400:1e5::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.21; Thu, 30 May 2024 02:06:22 +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.7633.018; Thu, 30 May 2024 02:06:22 +0000 Message-ID: <87bk4ooxya.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 7/9] staging: media: atmel: use for_each_endpoint_of_node() User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 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: <87le3soy08.wl-kuninori.morimoto.gx@renesas.com> References: <87le3soy08.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 30 May 2024 02:06:22 +0000 X-ClientProxiedBy: TY2PR02CA0057.apcprd02.prod.outlook.com (2603:1096:404:e2::21) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYWPR01MB10240:EE_ X-MS-Office365-Filtering-Correlation-Id: b346091e-4670-4687-7704-08dc804d1a5b 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|376005|7416005|1800799015|52116005|366007|921011|38350700005; X-Microsoft-Antispam-Message-Info: kP/PvU/hdK+bTMlepqnj5JciKcfw6TtD9k09coo+DxivqqPc18WcNAB24ffUbOOPwhG5i5Ja6urBv8PaBQt5U+7OGmIpRummoAJdvJLI3WoiXzGsY/6/nXW6re70lh6KFkvwH21/DJiNakAKqHQDHTi9nCB9fsqXs63R6o+swj3hmZMItmrCfk9W1cwYncxWCpre6lifBP0E5BbIEZpDll2lClz6cXD7yd5ueqOq1PX1kc72QqdEv8NOF+DjiYZs7Dzk3MZgQDeGV2WZQ+qKwkdh98JZuHmuy207VeJC7wsNvhL4HUhMMxCCnNTJhHL+OxpaSdlmXNTS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;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(7416005)(1800799015)(52116005)(366007)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DoBipfDvMLpTVvlYAzeaoS2bHJyP/lELte+N3CZqkmYV5cU8daxC2DydTwFzLcJFhjmgWxPb/wPuHqlGjlpPloxfHcX4X6K6ScwjX4fSx0LDVOCyjNiMHltkKrk5DzzV89LrBCnI/OvUw1Xraza9lPBg9+pWfS1Sj5c3zPjPORgXeQi2WE3E2vC478WK7F3Y0WS02VrXveEZs0IIbiCZCFYEabuW+Ifu80QC48j6WO8ggLL4s2kdevWrjA/K7E3WapcOPFY9/8MhBYgVfd+tieNsjsvxuzCx2qqkncwb4E7tDRkULfO4T0K0sowzAun8szHoRrxcKgPkDsLUOedA+Qd9A90ZfU+kpOBJ16cqOYA699YiFSMBx4R9rKozJRsISb8KqOJYAOp/xyHrKPrCha78nQRvKC8vAhw6O3OJDgPEMThIMKlz/l0A+MnuGPnQcGZaI9UJX0nexQzjhwi19FZMm65EA9JSXO1jrcot8bHexMtei6M2xT/3jyR0Xd4hNeQTB4kjcSilh3axVD1YcDtdkhIY7ehM3ljD1NkT5DF60mVP64oe3QpgjscZObUaLOMBLX4QczMdvYD00mGNyM3ygDwc5J7iIemnnpKKHDWdYvG77TxwQUMBlWru/llwINfVUATp0CsCML1Q1beqGy/L4HU2s7MgLGQ71sD7TPF0Qlot1nu3UVAl9U5YF0K6yA+T9ngj5qE34BdStoQHANSA5YyBIp2JgopPR4RU+DWjakt+SkjWpdRQwa6YEWbwHKLJfmmYSqQzvMIQTZwx5HgXLOuL0Cv2s1RIpVYnM4Q5i+b4kTZ1s8cZMy71GW8Q9uwYyZ9YxAg321EYyTeMMKxbN8GhMNdWfyuD81VWbC6+igWGwMy3AQw0hKBGHoFkJ9+9qObFVcCnMuJ3Z3wR2RZ8Qlgr/6bvY4td2ikTJylsPS4p92OXqrK7F8Z9ZT/A5V+KHAzDdty0X5yml1dAKNXapdnOKYAQE9gjoFX81JX4ExmW5FGLPZ80pyrNele3psSzaQjxPae38rYawiAwOegSU2kUOYTuTBGG0dNp9GRqU1N9ANN/qbesqHRYl7ERVQ/mmHZNBwowVc9HHBhLZG4DIUsjFjmUiunkHkjA5nCxjyRvTP2eBW+DRy09Dn2kEknHgvpOQLH4gez217+ux0yoB8sKP39ThMrRH/c39ZlyDmkLt1eO8e62W3CLvoCVh7MxCIlcG1xPLVqmkvMhfdgCwQ1oy/gPoVpm+HnsjOroaXKErachRd3jKhS/MncE1gVhmzJF2SIXYdUoqs1Cp7X2836DdNJwrgHZH3KqTUT3RzdJ4GTrvWQGupiYDHHh8y5/AxG0Z5xd5NTzkNBZeMueDQSAHAEMZDTqrxUF1cBl4Z8osxwu22JeqIfGA9+2md+61OITccGHPJ9LW+kQtr2FiIRLpMM1l7qNfyMnfZUzMLcjDnWeG1so4MF7NECq84xxOB5jEF2kysPoAXRco7ewI21HbKNpToyj1JUVm3hl4M/KsZ6XydOma+vCePJHyVPN7RKpsCO/qF0MBQkUGnMDKZxWxlDtXfDFBJNjo9bOOcBnlcJrP2eOfP8TdWgdoOMgU/cbh0Xt8/Kua5ySd9phJBEsnnElmSzYzlRKRGA= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: b346091e-4670-4687-7704-08dc804d1a5b X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2024 02:06:22.3795 (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: 2+ejKOmGF7XaIvLJjd+e5bKicvRwKSBHttSraQjDjWlQs9dBtQAJAvPfOJ+B3ZFsXbZpw0VjXi8hEMYTmAOmmhOQX12dJGdrXyjT+DCjqnTfw6ypAc0u7KmmQTuB4uvW X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10240 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240529_190629_664942_F77ED5A5 X-CRM114-Status: GOOD ( 12.59 ) 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 --- .../staging/media/deprecated/atmel/atmel-sama5d2-isc.c | 8 ++------ .../staging/media/deprecated/atmel/atmel-sama7g5-isc.c | 8 ++------ 2 files changed, 4 insertions(+), 12 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..3b28a232418a9 100644 --- a/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c +++ b/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c @@ -333,20 +333,16 @@ static const u32 isc_sama5d2_gamma_table[][GAMMA_ENTRIES] = { static int isc_parse_dt(struct device *dev, struct isc_device *isc) { struct device_node *np = dev->of_node; - struct device_node *epn = NULL; + struct device_node *epn; struct isc_subdev_entity *subdev_entity; unsigned int flags; int ret; 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..e559beb099f71 100644 --- a/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c +++ b/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c @@ -316,7 +316,7 @@ static const u32 isc_sama7g5_gamma_table[][GAMMA_ENTRIES] = { static int xisc_parse_dt(struct device *dev, struct isc_device *isc) { struct device_node *np = dev->of_node; - struct device_node *epn = NULL; + struct device_node *epn; struct isc_subdev_entity *subdev_entity; unsigned int flags; int ret; @@ -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) {