From patchwork Thu May 30 02:05:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13679653 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 40680C25B7E for ; Thu, 30 May 2024 02:05:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 538F310E2EC; Thu, 30 May 2024 02:05:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="NjzeO+tA"; dkim-atps=neutral Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2053.outbound.protection.outlook.com [40.107.113.53]) by gabe.freedesktop.org (Postfix) with ESMTPS id AA25910E536 for ; Thu, 30 May 2024 02:05:38 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZJBO49e7IlkBWL9n4UX7VYDqaKUSXFnZ0ErHdSKR9dad6HRqkUdV505r4NaZcbAbvci5YvNLaTBL83XYc1rCvY3UUWDRqJ9PD8I2xnUW4eTymJTH5H1VOnAaL14YVxTeuk6GForeV7yblT2GTs5+XpRQ9upK3sa8BSI2CIJyqwOIuoV8NpFbLL66VxwJEtBmiLlxKKV2+gGmbRp4wH9nOQ9xnQn3vi0Yo9PkM5wKTdkzkxTd5F8JTwT47+lqI6UUGruydkpoYFh/OeQYI4z/DCxFNOlEtGwTnR8C6ov0IrRwgTH9lFxW4wBvSeCOoshvLwCfylROajuSW5SJsy0SVA== 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=Cbb0dRK+5iDbyv2Y/MVH4j/HgoQMnUdnZRnxe2rrKFw=; b=afdA4gJO/3Vw4z2aPBR6NBUBB9WkgNTYd/T3EbjF+ctF0U6objA+agfi3ujlCClxWfd7Yvrj+PANa4ZSNrkeSp4ED1Y5rM5W9oLhK6xZNlK04Ak1vjOfrkdF7GGFkmjM2q8lthud56N+n7RZSFPowUSFhMLYe80hs6/M0DE+joTzR648FrIKEPsLDL6DSds6qgMFRIF9l1/HM7nnXS6zo3CPyt5vx/OZwJlTdPaIBzI6uH6DVLcXJe/7FivTSnhyEVKuPz1fVqHxGgYUDwsI5KgT9vT8FKa5vojo2jw1rSkwpnJzhaheh9gCn1cIGCCjth4mxBQGsWaS89DqC3inog== 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=Cbb0dRK+5iDbyv2Y/MVH4j/HgoQMnUdnZRnxe2rrKFw=; b=NjzeO+tAY/ObVZZ4vP6VjJ9l+uI+XSrYI5MPKaL5Hxw9J6ynsHNkv9xnnQW0ERdhfcyJBNXg8dskO5ION0x1C/xz2b3Ui53CjI++qX1bugxX3G79TnUCyRhvFBNH+vsISdr+TmhqW+RQQS0mpt7LrjfWbLBrhXMdO9nblLZt2cE= 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 TY3PR01MB9900.jpnprd01.prod.outlook.com (2603:1096:400:223::8) 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:05:33 +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:05:33 +0000 Message-ID: <87jzjcoxzn.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 1/9] gpu: drm: replace of_graph_get_next_endpoint() 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:05:33 +0000 X-ClientProxiedBy: TYCPR01CA0016.jpnprd01.prod.outlook.com (2603:1096:405::28) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TY3PR01MB9900:EE_ X-MS-Office365-Filtering-Correlation-Id: 2c268af2-f4a3-4dc4-21bb-08dc804cfd46 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|7416005|52116005|1800799015|376005|366007|921011|38350700005; X-Microsoft-Antispam-Message-Info: /jwFiSwBXFKM6YrAscq4bRMKd0j+KLgZvyrAKn1su1Q4Nzc2amVmtZlx3DC+LFXlBTrXZgDyHzv2jUlDB9rzYzlJtvwAXsZ/itqKaoriGzthFQymLCKedcd8QSc2AzRzd59lGBhDX0J3NBYDTf6a841wuLYM+AIIFrhfvVNgaApvEjZxOM54GOYEYRhUgeMU+KRuywutiNJzZazK6ZMv7UCPwU2TaeRmzn/XK4NXYxPlRQ+cG7Caipaa4jkAs0FcxFO6vwlkux4LWNBNtemIwXrR4Ty/w+ILmLO0xj0AU7veGQJpPO/MfCP8fu/mHX4QLmlC95tlK91lEDFGy81xdKuTSQEdlsxvBGFhT2oHxZdO1bAx3y3IS4B3o34KQjkzfRKWmLH80iv8aimmnwxSWWaPTuiRVhNtYn8T/LjvX5K5xkqliCQ+W8dA6G3DheODDFxvHLWYrZANc4T8Y+MCqRroY96+Z6c8HodMT4bOiRNIkedmm3TiyTTd5EBqNw9guWEAPM+uaBrps+aU6QQPspzX5Lgj29HewB/CKUs45mp8jaG/X0yLwPRDI3onGR52UvpQyvsgXZRcpEKbsiXYn2hts5dfWQhlKB+jjevBPCDHTcnnf6gS3WUI/5axcmmCXaQUrRs+jR2YmDn8CA2ZSPP/XNtXOtGT9v7eNjIz3eW0DQXdaF5gmv6ip0QDAaqx5y5TA7Ss6h5fvs0TUJFUjgYL+5JvA3s8Bar6m6GRWhw1TRvmrRgUiOj5lWZunHmIq0vEiawL3If5DuCXx2RhVyk/yINtqtATLZwUXCaBnL6jdHRf1oQGdFODPQx4ZUr52q97q9HsGTA5mKj5Cf9ZdEbShullYZZj4CZMBbHT10Ndc2gVlvWwTzHcNuwVGrNA4B4vtsQoeHE85YYxWQOgiqfQVOHbTB6HeXVeOL7c8G5W0oGSiu4VSSoKB7fR/tuMpMzbtcHBJThih2nJB40bD9+QHjtSYWlq95TFgY+VsDm+g1fQEYt6SkrZbE/KpyCWucq8qHbl5k9ZwvBJKySxzwpLwWK1CSq1Gmy82+MSgweqjgZd/bJedBpAzGfWo7UBgBmRIFKACMk7p+mPvDomeXzKiky2UQL/dOLNXVgrs6PfTZWagTsqhENdR+WZx97XqyyHZpQgSLZvTFAV7G7OeaKqlLuphquB1wnhsblug6F0RNnk0Cmsf6k4LdrnWsvniERoWMirTArSpeGwCpA08HjDNDGLZ4es31fwT3nkUhHTMdWzA32KJGiFEvpk82sNc/BX6XG3oxLBXElzLn/hSJgvSKBzcVvS6gsR2srzHkY= 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)(7416005)(52116005)(1800799015)(376005)(366007)(921011)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2MdVKXqJ4/9DVGGuwCKdDYUDhxoJVaEEBy50o0Z2bRNbgUDrHLCpAfeFuss3D/Z/nniFyAWym0d7+CfktN9l5zrmkzAVaCAKKNMxJbYe5pVPxx4dXY+AlHz/cUKfr5lXj59aTekpJIvSee7b0vgevaNnxSXnU5KqlHMG4v1PQRtvTfPuJqH+99z/yUG7GMMWGMOpgIzzr4cwDAPjKL2m+22u06zJq9kPXffnUnjXQtDhNrn1c7hbO3F7DJkJWImXxgHY9nJyPe1xZkEYVjG1QvSXHi5vqXMJDE9zL7Y9cE1l0NOYt+fl+/opIod0RhXA8dxHYJo+KdNW6vMEE9GVhtSyXS+0v9po8b8RaHY4ca9CIfEr6p7lJ7OSNLEubVSo4CecD8Zsxf7DhVyCsGsiiE6cWmlQtZZVPPHlBCMaayzUy4Zrc5myXXrDih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KwBQ7XV5EJCKZBfN8SREUM/8/AA1zFMCZYKjRNlH/aFTm22mfPWaN8Wx3LHFVutQHvXGZleMTeGDAhW7fTUfckDnnuF/Y+Deb6iKH0zpg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2c268af2-f4a3-4dc4-21bb-08dc804cfd46 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:05:33.6044 (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: RyrpirYUjuCAIwySfnRCdgbi6N1ptRGNHABvldiUvulFl2ebYLoypSxZBTf4ZwoQe2453Brg0WEXkcspWSbc4YXBumBtivWlJGN5ieCLDxAhbgGGtonFezSjFFF7Haxn X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB9900 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" From DT point of view, in general, drivers should be asking for a specific port number because their function is fixed in the binding. of_graph_get_next_endpoint() doesn't match to this concept. Simply replace - of_graph_get_next_endpoint(xxx, NULL); + of_graph_get_endpoint_by_regs(xxx, 0, -1); Link: https://lore.kernel.org/r/20240202174941.GA310089-robh@kernel.org Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/drm_of.c | 4 +++- drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 +- drivers/gpu/drm/tiny/arcpgu.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 177b600895d3c..b6b2cade69aeb 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -504,6 +504,8 @@ EXPORT_SYMBOL_GPL(drm_of_get_data_lanes_count_ep); * Gets parent DSI bus for a DSI device controlled through a bus other * than MIPI-DCS (SPI, I2C, etc.) using the Device Tree. * + * This function assumes that the device's port@0 is the DSI input. + * * Returns pointer to mipi_dsi_host if successful, -EINVAL if the * request is unsupported, -EPROBE_DEFER if the DSI host is found but * not available, or -ENODEV otherwise. @@ -516,7 +518,7 @@ struct mipi_dsi_host *drm_of_get_dsi_bus(struct device *dev) /* * Get first endpoint child from device. */ - endpoint = of_graph_get_next_endpoint(dev->of_node, NULL); + endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1); if (!endpoint) return ERR_PTR(-ENODEV); diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c index 4618c892cdd65..e10e469aa7a6c 100644 --- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c @@ -400,7 +400,7 @@ static int rpi_touchscreen_probe(struct i2c_client *i2c) rpi_touchscreen_i2c_write(ts, REG_POWERON, 0); /* Look up the DSI host. It needs to probe before we do. */ - endpoint = of_graph_get_next_endpoint(dev->of_node, NULL); + endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1); if (!endpoint) return -ENODEV; diff --git a/drivers/gpu/drm/tiny/arcpgu.c b/drivers/gpu/drm/tiny/arcpgu.c index 4f8f3172379e3..8c29b719ea626 100644 --- a/drivers/gpu/drm/tiny/arcpgu.c +++ b/drivers/gpu/drm/tiny/arcpgu.c @@ -288,7 +288,7 @@ static int arcpgu_load(struct arcpgu_drm_private *arcpgu) * There is only one output port inside each device. It is linked with * encoder endpoint. */ - endpoint_node = of_graph_get_next_endpoint(pdev->dev.of_node, NULL); + endpoint_node = of_graph_get_endpoint_by_regs(pdev->dev.of_node, 0, -1); if (endpoint_node) { encoder_node = of_graph_get_remote_port_parent(endpoint_node); of_node_put(endpoint_node); From patchwork Thu May 30 02:05:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13679654 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 92336C25B7E for ; Thu, 30 May 2024 02:05:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 69CE810E320; Thu, 30 May 2024 02:05:50 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="LF/LVi9P"; dkim-atps=neutral Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2046.outbound.protection.outlook.com [40.107.113.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7B71710E536 for ; Thu, 30 May 2024 02:05:42 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n5InSjUzspYgw80d/aEUWEErhFSAWFkiSexT3yOn9BrCj7LHhXSduOHMT4vNtBq9RxNEBgzdDCnzFEhKu0IPhosHzhq4maGoXczhhrYO2x7feqT2RK6Uym3G84iBFX5LuzpEbwuSb3sISmF98MCCGFXFTUCX8nfwBqrUnI4FI3pVumr8a/pq1tXMTatMdP+SdZTM5bCfBu9+XB1F4qkQjQEHmwThUM1/Fp4FqOwN/0WOesDOpM6crZGdNoseddDE5s1SghJQZzbpXFDYFot20a01VLqOOomzOHkegNdSVcrCwrd/rKxhyZPWZXm3AG3N8eq4AycV+qEl2R+cFIXJXQ== 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=q/hA+X/NDL2DHVcXTjFOx498moK6jPHb9pGdUrBCLk4=; b=REFstSi3XaVMPmRmcU0m1/1jfcYi0etq1fjCjnwX7hH6OiC2Nt6/a5v+3FagfLbRHN7C9BKwTyVYgtMcsd3gk4PNfkw/DuYFZYv2oriZaLJ+HNwcOxCYtk4xOOXomqH5u9AJ/hqjAQGu2BGA8z70p2o4V+0EPDXc/BStjys9iGY5zFfv1XMnN7/ysUhUY8Pz/1crjvxT4wcsTbEEJUzEmY1/SfV1d15vwPCCBl0U6sdTeNDA8yMl2ru92yd8rVP+j3PO2zBwGBHuIoka0g1aMLq10gDmSN0YEZjgkPvd3iirBptissPHk0LoJN7JkrE5phbFo6MpRIPFQCuY+ZsLHg== 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=q/hA+X/NDL2DHVcXTjFOx498moK6jPHb9pGdUrBCLk4=; b=LF/LVi9PKtpB+wUWr36GcQoL8HWgMD6/6XBEcwDAK2jGkeWTFlQ/ypIfqE5AJCfpOxhumz6oGsjMDSbXBkpubNOIWe0AKFjcY4thZPMcwXZKAk7+gUafsLe5ib1bv9W1494y/eDnE0CBHL6nfN+TJKIlQRzAFCF6eacWOQrWg6U= 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 TY3PR01MB9900.jpnprd01.prod.outlook.com (2603:1096:400:223::8) 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:05:39 +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:05:39 +0000 Message-ID: <87ikywoxzh.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 2/9] gpu: drm: 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:05:38 +0000 X-ClientProxiedBy: TYWP286CA0006.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:178::16) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TY3PR01MB9900:EE_ X-MS-Office365-Filtering-Correlation-Id: 15d2c3f2-4eef-4278-7ad2-08dc804d0088 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|7416005|52116005|1800799015|376005|366007|921011|38350700005; X-Microsoft-Antispam-Message-Info: D49oeb8KknhK1Q5sj7Eqnt6PZtzW5EKmMYCMX+2p1R9qkWF1PmFbXIe8kdhO6BNsMl2nJ2C3bH2kv9Psz7Q6S7dz3CxdqeMuuE9L2Ccq2lh8dGLCJb6uxv+esxHjnDWvBgAS1758k0IUDoQJYUNj3FRnAEnKbZ3PMeXzKYCODxFlys/QPY7cVj71yUk1mbo3fJu8ytkqga1IlFGQETI500/j0djCJGQ5TnFDDBPRAwu0f2DIeDPylWV8C9pyB6w5zHECWAJi9tPjEfTO+pS8bSK/BlmaN03/7BFp219mpycLyMbGSR4PKfyioGWrFP81sTyTZkong2zB065H7C1724938nA1xqFHC5cQmTlnEe+OGGGpHl3HY59+2mG9G+2R3KP86daAaPbJwXD5p+A2uL5jHnP11atSaZeYLC5mAuxCRFU90Bu0X9xLun5BrGC4d+ahmuZkDCT7Qn3RMwxJhaYuhHNXvFs3Dn++G4r/j7gGwOG1tQ7+uOd2k7yDXDebOL3ZDBgUdGydA5wMy7a2DOGfiYKYraIGlQS9mQKP9kxRIH6FubY9znztZz8Jf01Gs/1KLwaLYtjCuGVWkalYFMkr363qaiNu94xJ9u35V3zCBBvK91w/IBfBF0yk73sB8hr7kYAHgbC8HNtot3f7t8KHMHi6ILYTdihkcJsUHw7O+cbS91Bg7CWkuuBSH+HdOMD9PA8NcgoJM8jRB4Q8yZuK+IengI05FU8pecsVyGIN2NJ727EuOWGWRFB0vW1Ja9kEpjtxzu9anLPWrzFc8buk3T++HuPb79jIPu2fuOtG2BgTwybp8ZTOwhvPVZoH35ds6F+l8qE4NI1JyaIuzOTwxAIGiV4R36rVvPy5GGfc00sWosocpcnNnrxsaFyDq1ZD72BNzq9m4IhdMbUnWgoCUqdLyHyZDIGSx5n8qsUxy0PrXwjG8OK6KfPEwtbx0enPJycSJjqyi1rm67r6gotjLQSovxyW3DGWuNxEGGnV1nZg6/EmV3RuyO4/NfUCTj8LGIyB/iTWswD+lDAjLOssqVFtDVrE7H43Y3A60gaJK6IfR1+xOiw/Kfmypgt4KcX3bRCBfuKzpnQx7QlB44fmqwu568cXxy0UlRis5TTMklyAtPAkY1eEGcPi15NuO3dtdmqd97+ijFBxgLN4DFH9+7nW5HDgx/3F/cSDht7Z7c+1QOsYgwny4o8AL+luhbnUsdiJFonynrrs8Ci8FPiEa5b/jaCw7sSfJJKNXpLNFhm5x7LTc4bwmrA1m7AvcUdB+XKWyzGVJ6cM44J7PynPyfS9PU8Y26DPaEAsTarsF61nIErFmBIOPXb8PKkARVBa8oPF59hpVyZLPmnyQ6DZ/LaU1mvsuJyQNN9Qgk0= 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)(7416005)(52116005)(1800799015)(376005)(366007)(921011)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Khjqf1SHbeGy1eNN6IcJ1uMxVu0/BmhGSI5bT7d2MP9diseefMwb1voIlJi6QRMhuUqNQCsBXk0+N/AaWVpRMqeLPej7VwQYBVtXMwkE5drTaktsRj6hHsAk1zdec5J8F5IfBKX8fBcDXo4CIfernanktlARF9RqNvRp8CSYCkA9RbMhLKN1oSr8+XA4/CUWQLJm6jW88SrmTi8vjkm8aWmSjvU4OUs29YBzWUyNcLOU3qjeJGQAMv9uHeGmRmGcpc/AmLFkKE0wRn9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PB1OtN7xXNILpCdSOw+n1hK8DVo/xTo25W23KFPk4tQWb3Dxz08wZ5OAPLjLV2hQTGbRuh4jlGBvF4p5FvS0aGninlsdbrU4Cag+865E+KqVZn0YWgdVhI3dlZs6leSC34uvwk7hmkCT2IswrEqLI8GRgQQ7vl3zZfrAGyqT+6/MZtHfBf4ZZW7UKcWUSMSJi8K+5T7AZIjcHIDpPPGsvQDJLN06wqycU8KzxuEEPX1J/8y+SjSdtJe21iI87ZdmLm0WMcdOH1qdtWJORg0MyEzVrFy3kb7p7zr7zmUCIGYWW4= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15d2c3f2-4eef-4278-7ad2-08dc804d0088 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:05:39.1057 (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: GwVUgX/1QgC+c+nyFocwkN5nJ07NI9pRk1QgFbnGP2Jxv8hp2pkUNloodZKmOZUB6QEw7XrUWC0p4jYGfZosiv9sg7Wgvt/hg/0DjoVucn3ZyHAbwEXZxuKsKBBYCJBc X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB9900 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 Acked-by: Dmitry Baryshkov Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/base.c b/drivers/gpu/drm/omapdrm/dss/base.c index 050ca7eafac58..5f8002f6bb7a5 100644 --- a/drivers/gpu/drm/omapdrm/dss/base.c +++ b/drivers/gpu/drm/omapdrm/dss/base.c @@ -242,8 +242,7 @@ static void omapdss_walk_device(struct device *dev, struct device_node *node, of_node_put(n); - n = NULL; - while ((n = of_graph_get_next_endpoint(node, n)) != NULL) { + for_each_endpoint_of_node(node, n) { struct device_node *pn = of_graph_get_remote_port_parent(n); if (!pn) From patchwork Thu May 30 02:05:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13679655 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 A706AC25B75 for ; Thu, 30 May 2024 02:06:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C61D710EB6D; Thu, 30 May 2024 02:06:02 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="EYQb0Lin"; dkim-atps=neutral Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2068.outbound.protection.outlook.com [40.107.113.68]) by gabe.freedesktop.org (Postfix) with ESMTPS id 10A0E10E536 for ; Thu, 30 May 2024 02:05:59 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nabz4HtLjmGD+J6IcrJdRJnGezr/i/wQxC046nANn600WngzgxGdAKdRl8Dc+YJMG0Xh/TLdzGuosv/utkEdbvBvWUBXc+FoxwSh1ikcSYqi/ppqITB6+XZknQBJrPJP/fVea8GprTrSpqJlU7teDqj+zI43aWwCI+wyhLEFwJ3wWs5z9NGqqPcKrmfno+5V+sNs3WwFWoVKKyVUY1oxlT0bnLobZvxOo6stm2UFLV2zx3l+x1Iy7QDrmTcKt84Yj0WivSOXIb79nRHV14eQ1FWcGsqyg4spuV2tKdI4EtjpBVnKXvc6/+iRBLmVroJB2MNe24iQ0LKV3ZFPBMUeTg== 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=REllXbKiXbTph1LoY5sZTemVlDAhDPlDjVQgZtSkG30=; b=HChtLQI6wwcXsNZSC96qHI+6WzPU8mBp6Sz/QBzrULTfH/QFZNF1EM7juQLbVeqIZnFAdMwHVoRCaDC6vj7kAE6CR1HaenEM1SlYna6iq94K23+rRMvD+/txrwqzUwpe8kwYVoj1tGwzMYRDtL8G5T59PCE3vOD1QR3i/xmPfdPsA3vgMCUbEaavC1LYb2QecVmmAHnZyEJNi1eMQVxc/TQ9VAFv58uZmck+3iq95eve3NhkJJfYY05o9m4XC81XxOaKPIvnPve6uHaWRfav1r4H+6amr8obzvXc5SKlLxJ/qAyxj8zolqQAIAs9JWQpbobhs7AOcBrPiV321UUl+w== 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=REllXbKiXbTph1LoY5sZTemVlDAhDPlDjVQgZtSkG30=; b=EYQb0Linfzskw4OyxANtjtykS445NLrSZaxWXUCOSefOD7tZerMw9JTx0yTNWHvrvja8tAZE9VhzP/TGXlXhXSjxRUZOr8GMLbtA5RnTbfHCqkcE/cAd7dso2ROrybcIzP+vyA4oF4+Bvi9svuHIZm98AHmS9Hx4Zy3oqsUcNhA= 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 TY3PR01MB9900.jpnprd01.prod.outlook.com (2603:1096:400:223::8) 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:05:57 +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:05:57 +0000 Message-ID: <87h6egoxyz.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 3/9] hwtracing: 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:05:56 +0000 X-ClientProxiedBy: TYCP286CA0333.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:38e::19) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TY3PR01MB9900:EE_ X-MS-Office365-Filtering-Correlation-Id: 808ac797-d23a-4214-04ea-08dc804d0b59 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|7416005|52116005|1800799015|376005|366007|921011|38350700005; X-Microsoft-Antispam-Message-Info: qLqJmg8w6SVpcftne/4JlJyrmpNNfMDp73jefeZjYA9wLOtG5/+FHYSlM+LmXY6T87XYjIAxEr4hRJLk8b50als+imPsWiOtkQrrUmzMjnEo4qITgUpkvhrRhnsv+rirVk3/RWoR2ejoFIFJLTlPfZ1Q0/bMYnKKZkMzYBabSK2H7IrNPbsHIN4Wpn7MsfhMvcYS0DModLlwIBalV+t/zc9APesXMrJ5YDxKIiMVVGz1QaEIVnvDozRk7zfz/DsLJHlolQbde0KK4OrCWZV3SuM4BVK/yChl2WfaN6mvbHruIkqPlz6YGio5/Vzfi8mbF0GCO9o5yMpX7ln7P7f4t6z8CKAASxjLzlqaF2Hv+yergNok8iSE47k2dq7fr7BfJpv6d5ywIoyL8lLis9btEiNu6DXhOYQujeeCY6303EBYEBOKV2y1+3N9BJBcIfFoc/mlmtyWn86C1p1VGpCa+dXI/OFx6dM4Qk+CP61tspRBvE6QKqenqnKv5YS1t0OdIcvyxe6pSOa9D/M95pEJfBVtbtdR2eYtOWKE/XBfrQ1SXeVrQEJkUx+OJZHlzvweUDzAUAyqyDwqDwXK84uiZu3JaOtE3Zlln214tbieCuqHr4EMuYcvmQwmOR9Sp+D65t2DcDnO/0S3M/hEe15yWn0Z0NF+VWjqc4BQ5f7GECr9lxtXDoV0YvGbxKhSnHa5rovpEcH/xHJLICpdLx1UooKCEocwXrPOWTWOK9AM+AsyScDYd/4keeS1IbRxCil6n3yzIj4I+pQoTjU8w45G54NROJER0a8RIjvlgi/JG8bfitkHrUoJ9SfGJRjnb7Z2YQacPFD7Jtkxlslm9Tnt6gayYP/Qbw+3W0RODpEADuQ0hV59hbYN1rz7HjKZKqvjpakHdrJ+XYx0t7po3uZlFi5QAVjnSulxTWgPzXC7BhQvkSmJRjln940fL0DN5pKb3vt9JfOs6DXyoMUdev1bPwMisYqtQ3cDXNcWS7wf0eYT7LY1Gvk4VSohpSa51aC0/6svH+ZvozxfaVR7uoodU8RABiTuEarmlwo1aobrWFNV8yu7ruVChassf7tJi62HK1g4ETRJ1O6tasVv7xPZi14HPST209g2Ea1/NCX+gdrjtbJwk9Mv2dpASn4JIHbCc5UHqp1cZl6dn8RsosvnNBjYtSinFFootXAuRfODg6Ir9Vv3AIiwhbqsBMKdNSTY4n2kxFSQ8Jltn9n9eeFRoD5+hdXaScwD7JrfbVJr5oDSeotvW1oQC5T5OJ/ankpMMVMgm6ePsetZaOoNDKWcD4IjBAKnOwrMhikmNNuZs2NVuVDErLf6zstbT5gwgCTApiPf7swlT2MOlXtW64CeEBAAnGpGbdh5fvw0QsraNXg= 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)(7416005)(52116005)(1800799015)(376005)(366007)(921011)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qJ7btPrZmA7sdnM3P8SowIc78OwZwQCkc3w+mrXKTVSzcAi4FncATVcg5PqVBz9dC0WTskqCLZLhoHEo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Hu61VXo70yuHA5rQ+iNVu0GBh5iqmDi6v2cHLNw9dL022PWlnLFDU3vfQF3gT5TZ+1c2ZGeax/ERZmwu2BQJQcMy4f3NlZkNHv+Oi+IdJ6lqSIbm4EqMaQ0C741cfFOIKmVb/aY8FTGhUs6pdFr3uB+41lgzYPyBzX7Dka2+vvdVSmlKNSWC0no2FzPCMrgSvpY2J71iQ25hI5lb1Hsby8uxpVthsNJqwfMDY5UWxcUUwv8QoKMygfYem5C+dxOVbvd0IipYGuy4tcmSf5yI4MaPlQyst2a3byBr6J/c44tcmrHVIxs+Pnyycz5H0+lYM+4iNXBSnHb4ciQMl6WXnZAs9vbXxHVF8cJctmQmKzgRbkCWLLqtpWZTispPq0EdNbASE8O/mUlW59McH4uQ7QN8B+XrJT8VfSm0n7t+L+AGMl+XlAfu7/5svdhUoE3pVlFNJfku4WYEDC/7q7Z2sEi/ENUobp1vXrw= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 808ac797-d23a-4214-04ea-08dc804d0b59 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:05:57.2049 (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: F7OVuVHKFJG0aEFh+J7i2I7JzG3EyXw7Q4/dXh9OHupdK+k7DAYh+SXMJlnnHtY3A/DFA6fO2PJJg+CoaLH4CtjupU7ucnGF7ebfOK/S0RYr7W1qWgMxmVVhg8ZbIa9m X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB9900 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 Reviewed-by: Suzuki K Poulose Reviewed-by: Laurent Pinchart Reviewed-by: James Clark --- drivers/hwtracing/coresight/coresight-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c index 9d550f5697fa8..e9683e613d520 100644 --- a/drivers/hwtracing/coresight/coresight-platform.c +++ b/drivers/hwtracing/coresight/coresight-platform.c @@ -275,7 +275,7 @@ static int of_get_coresight_platform_data(struct device *dev, */ if (!parent) { /* - * Avoid warnings in of_graph_get_next_endpoint() + * Avoid warnings in for_each_endpoint_of_node() * if the device doesn't have any graph connections */ if (!of_graph_is_present(node)) @@ -286,7 +286,7 @@ static int of_get_coresight_platform_data(struct device *dev, } /* Iterate through each output port to discover topology */ - while ((ep = of_graph_get_next_endpoint(parent, ep))) { + for_each_endpoint_of_node(parent, ep) { /* * Legacy binding mixes input/output ports under the * same parent. So, skip the input ports if we are dealing From patchwork Thu May 30 02:06:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13679656 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 9BFFCC25B75 for ; Thu, 30 May 2024 02:06:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9CCEA10EB65; Thu, 30 May 2024 02:06:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="UityBz68"; dkim-atps=neutral Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2087.outbound.protection.outlook.com [40.107.114.87]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0E1C110EB65 for ; Thu, 30 May 2024 02:06:09 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AWKE6+6uSKg+IqhIpn3Lkd41gMOLARfrruM0uM73Zs0XQad7eb1v3g3PZXQa5EnGZkDLmCQ5dK+nJxlcX1LGJjm1+ajnJ8bWC75WuifxVPI7ayKQY7Wg7yZC9DJSH+DvfnCrSBQ6qUHrbqP9sit+CuB+ibno4ZjZ6ofaTS+KaP6KhnEk2arCdlw251EiI6ba9jI5BeMwMWA/Nds69HHIniHOgXc+yX+kAJVloPsow1GlKWcoYrqup7GUjnZdoJhhG3npu5f9M6lEoRHd3/X7uw547J5aTixZyHEroJLYAaCdAvKWzj6q5XEaduQjf1N3+HxEY3Fk3DRLRIjsQLc2qw== 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=9rI+ZNkzrLrVhQsiJK5pQe/ZrYozduef8K4ZYQXjwTg=; b=UoNh+nRfGNRs9xN1167FKeh0h0ctgA5zRE537ocfiVUx9tcyquvgUMT7t/QDTs2AVWVsTxJ4VtrxD2Auw8p6/NcLMLtXnHZv5vjrf5FSVCKuDWavP9zFkMkq95FT8cpZP77fBbReVNl+w8Vaih0wTJpocrHVnx0pmEl8ZhF8nbU+XwuKRAwcOeZRl7xCl30Tc54e1XWDjhgUdphVrmqXfpXs7A61imjH9lNcOJhMQ/J50ueMHB+PQiX1objVxSRBU2AD19uAmVzIfZiSNLNvEphs2u5wi0bTV/FsttiWYOcck5iyCrjRqOHmGIkgBlIX96mpru4DcELXYEbnUfx/sA== 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=9rI+ZNkzrLrVhQsiJK5pQe/ZrYozduef8K4ZYQXjwTg=; b=UityBz682bwzibkssJZ62HkBA1+i/6ZcIZenD5i3ASGhedQ46ZKIjhMLydgO17k190WvxUG0DWhrKcriLhKp1heB2+9DdgFrlY2WGIn255kCExcgF7u2EAgrin0TljLBmEaZdJvOyqSfGsP+v7/JrIjBdx2KBhxM/2LoSeCGJXk= 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:05 +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:05 +0000 Message-ID: <87fru0oxyq.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 4/9] media: platform: microchip: 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:05 +0000 X-ClientProxiedBy: TYCP286CA0118.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:29c::11) 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: 1f2e7dbf-b581-4eb6-36cf-08dc804d1074 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: jGrNdwinyNqNOKWmNq00Qbse5RNM64lzHgcAdmHAAD3b3zTRJlOkrHrWTF/qYl+qkgn4zctj9BA4rB2y5ZuQWGn9o49KIH3Q3eWdKSCGih4BWlY4fh23LxqfOUMqXW+6MVH+Dp40Glph4m7u86DKZgYKoiS3pa9F4v+/n/Dc99H3mf6NadabvhJS3DN8ZMzh0zolaeJ99Ij9lpLxmzyHPchXg/R5VTZnH+1uzbZgH6fcdKIFjrbx5GIQ9o78e93DPfOSTRhi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qF0nm1bhhbABFmDVg7vIN19+E3DA== 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)(376005)(7416005)(1800799015)(52116005)(366007)(921011)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: phayKQNkx/q9LdipMVJvK9FzTb1jrk44mkahXVIjOTaMqUMBHc/YgdPvAtFp7I7BdVBxZwXPACiVoS7bNfmpaF9mrs31j2WzbIQnknvkedEk7rqPhYPvvyeWLWYwM47O26oVrAqzkCRgbojwLa3beFvgf52BPSWV1ifrm0F+bisZu/cXPTMnmZkcquhdSczMaKkTWULPkuR0ZUOM0fbHf1eitoJCUy0Tf0uoX4ykwXRheu1lfgGZiy96qlDR9ySRRIhiwgEoLhqExnfDYVWgOwk+jRe7TXRu3oFVV6iEsZcChbIjp/zA55VmVETecQVz3/HWvWRXASO8xle4Fs//MVLfuiYsdK27XyVz3MXHgAUKMSciDd2yA4OXvMZFYSeQIo28WC/owQJKxafm97JmIbgHP7ebDrjbUw+PH2LTpHKu/7vUM3NML/t8Gv+ZwuoEOc/ZA0+n7eQU0OHxI1MjaEYoCcl4atgIp/seNHCstdTgoqJP8DqTyQaY4fq4C2bQqcj1l88pRdM6DDn2tZ2B36CbMoa0gUSNWmVBZ1cpU5NCIp3dCPmwIPmBNCyctiQwjtsgCwN5xExFDalurJRvPDRHtXOFwiVvDljL4aMhePpZY2SOBQdvyRaacj5QYzf/0u+4uhvS9GrRrWtHFWtD0Ivck2fc4xN8mOnhuA8xErvfLU3lweVOXRtoQaYweN2kUkeTqozi58KL+u1ePYavaPbz7AHrOHs9hnQCklunkRmUpvsUCFcEAl/KLyzznNoZR6co7688CsnjmYUZ5gWqeE3GsdLIP+b7e3acWTzfVo5WRNuhxATBMwTPrREx/0LJV95Hr51TkgeTgXfY2tozEncVu7GnL2c1+ctiIJCkMD0Rv8i9KinJF7DqLUZCxDt+nXs0yviH+kqtE4dhDHmSL11PQHIONtj3OR1OgVhVqLvTxvHqQp6zAKyHm00UOYARd7vpOL6sbC6S4AabWhnFopCS1bdNiAdDvBVju5zO0ZzSdLd7dHjHTP7LKM6slEZ7HcSyRe12kSeKuacyEFP5NciHkrQ1PquKNdd9EU1w7FWVOSAAHROqZwgdiLo3274HQVlJvenDaMK9Hyfhq+1xSe/HRrLX2doRUBqvn7MvWeKajEuUvbBYB/hREf1wGvWXYiglmuR2zXANZMp32WUzb2COGmQZVwh9cZKiWIQH7CUbrdNyQQmc9n3KteJN0L3joiEjUGyRaUQsIx7lA4E7PbT0YWZ4zkf3EFNc78sa7F7CWGdZ1LNx9tODkaQN/5VQV4rCqTRVhmXOUO0A+mV7lnjvtXKJvAXjl5qEfIk2P7TKyr1h3ipTSUlhYGHvO5KF49BNJvaWyOkLEt1q5HUW8UP9FQXDvCj3/JNG+kNB9VPEWHDHd8DJYfMSeIxLJ92EZiwdAjPbeKMgWOGYs9ioSZ8Te3C84W6ludG446o14OTHckj5E+BzYPfd4sIiOalpjKG8kr7Ny77IrvTAk+HdHEK/IZBoCTIQDsN46Bb3wTE295PU+RazyyrnZJEpaqZoi1I+M164Ct/NNVNkwNwX0rAwHnwWwMvyTTwQcI3wMl4M2dubMAIweYCbsocr8xOK8ETiwtiHhqdu+5287pPurPUvsjuwetq5n5uPq6pJqpM= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f2e7dbf-b581-4eb6-36cf-08dc804d1074 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:05.7910 (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: oRSW/hGwduQHN+XcHcN6t56j71DwthOSL5sT1nUDA0FeOQRNiQvSGcoYrk/3bM+lNhSgegGW7mz/HAQHlDBI7fnaDh3y5yOGK+vL2ibEhn3bsv0JCCx05WV5w0UV2Fhb X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10240 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 Reviewed-by: Laurent Pinchart --- .../microchip/microchip-sama5d2-isc.c | 21 +++++++------------ .../microchip/microchip-sama7g5-isc.c | 21 +++++++------------ 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/drivers/media/platform/microchip/microchip-sama5d2-isc.c b/drivers/media/platform/microchip/microchip-sama5d2-isc.c index 5ac149cf3647f..60b6d922d764e 100644 --- a/drivers/media/platform/microchip/microchip-sama5d2-isc.c +++ b/drivers/media/platform/microchip/microchip-sama5d2-isc.c @@ -353,33 +353,29 @@ 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; + int ret; ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(epn), &v4l2_epn); if (ret) { - ret = -EINVAL; + of_node_put(epn); dev_err(dev, "Could not parse the endpoint\n"); - break; + return -EINVAL; } subdev_entity = devm_kzalloc(dev, sizeof(*subdev_entity), GFP_KERNEL); if (!subdev_entity) { - ret = -ENOMEM; - break; + of_node_put(epn); + return -ENOMEM; } subdev_entity->epn = epn; @@ -400,9 +396,8 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc) list_add_tail(&subdev_entity->list, &isc->subdev_entities); } - of_node_put(epn); - return ret; + return 0; } static int microchip_isc_probe(struct platform_device *pdev) diff --git a/drivers/media/platform/microchip/microchip-sama7g5-isc.c b/drivers/media/platform/microchip/microchip-sama7g5-isc.c index 73445f33d26ba..e97abe3e35af0 100644 --- a/drivers/media/platform/microchip/microchip-sama7g5-isc.c +++ b/drivers/media/platform/microchip/microchip-sama7g5-isc.c @@ -336,36 +336,32 @@ 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; bool mipi_mode; INIT_LIST_HEAD(&isc->subdev_entities); 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; + int ret; ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(epn), &v4l2_epn); if (ret) { - ret = -EINVAL; + of_node_put(epn); dev_err(dev, "Could not parse the endpoint\n"); - break; + return -EINVAL; } subdev_entity = devm_kzalloc(dev, sizeof(*subdev_entity), GFP_KERNEL); if (!subdev_entity) { - ret = -ENOMEM; - break; + of_node_put(epn); + return -ENOMEM; } subdev_entity->epn = epn; @@ -389,9 +385,8 @@ static int xisc_parse_dt(struct device *dev, struct isc_device *isc) list_add_tail(&subdev_entity->list, &isc->subdev_entities); } - of_node_put(epn); - return ret; + return 0; } static int microchip_xisc_probe(struct platform_device *pdev) From patchwork Thu May 30 02:06: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: 13679657 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 487ABC25B75 for ; Thu, 30 May 2024 02:06:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1C92E10EC90; Thu, 30 May 2024 02:06:18 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="birZSt60"; dkim-atps=neutral Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2077.outbound.protection.outlook.com [40.107.114.77]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6177510EF21 for ; Thu, 30 May 2024 02:06:14 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dtbjcjPYnl6EZtrGScC2QOSUTH5lc2+bI/ps1nfVGJEp74i+lacPqLZB15Y17aRtkMRaJZPTt+67b3718TqZvLi7A+M3GaE213gW3GgpQQnvTssiB6bKGxRSiU/wLvAgXlFkwguQyTat2K62zH5N7Huvo1L3vTOpVzwAqTWvbYWZ0iRafJO8PEePH2nWbfCSt0S/Wwd8T411PBR2LS3Dxo98rUPrpUX7kZv6yGbObF0hHwJMl78OmYvkaa+6pG86VHooXUO7W3RVgPTsOnn5AWVEgeFGPcS4leta/Iuvb6Eo5itG28ynWGdCi5HjL/maRBAFyaiKmjacmzdRAMwLKg== 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=gjGsaR1b+XxwTO9Q3/woPdYTEnq443MXMgIOL4ktaTs=; b=j+g0J3CiU/kxy34tATq2uF6L2ZR4xQd6gXixGGnkR27O3auelcHTN05CJ2qsfygunOhA7832lleUOqspJd3euG64T7Vfj13LFqY7rcJ8D+IH072r9qYyKagY+ZIUXFWUlE3UGv7sRIff5diuM8fX0/VDkM2fIxsFQ4BVlq84c+2sBtViIgsHfHEkjtXRCuIRBd3m4ISwJ82dGakPkAdDfIzz/Dlbof5qglaVCUxHW1vKRXhu1gcieVTRkPxBvqpdRE/IZrKTSoWA/gEmykleGivGZhvbBlzeO/A9dwH5QYgIKF62f25iw8YxGGcRMx4LeTTKK1I3X7kGeBWpGJa6Zw== 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=gjGsaR1b+XxwTO9Q3/woPdYTEnq443MXMgIOL4ktaTs=; b=birZSt60Lozkygvd/UX6aiOJY/O2vPOm8da3OSjhPU1CKhs0Rd9LCj3JOfOJhKH/dotDXQ4M2cMDr9+OzgUDtaQLZa5d7pYcenQulthuy54RMJo8FJJsB1Yt6qYHkw+GX8BFG6HhxGXrqLv5BvFYgoxgbPPtrylFYMiQXUe/PMs= 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:11 +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:11 +0000 Message-ID: <87ed9koxyl.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 5/9] media: platform: ti: 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:10 +0000 X-ClientProxiedBy: TYCP301CA0069.JPNP301.PROD.OUTLOOK.COM (2603:1096:405:7d::9) 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: 3e270c2a-d1f9-43f2-6499-08dc804d13c9 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: A0a16wCTaxgvdcabJ/merXRjFpJiFMPjobF6/vL/2BkaWwJOpQr9cLWw9Y7u8Jnn6T36N9IWMEOKUmokEAIkcQmfaCaM1YZ4MRhmsQl4YqK5mcGbUL5ihRH0L3f6qvqLpU6QQ4Z2MV4/ti6AicO5LQB3b0lOtqLP9gdXDIHrfdQmIypzImfknbbj4pHCC3Fu0X1m1h8ViAUsOwgEM5B1Yw4XXD+oOQOePkoin0ZQYB9ciZpDVu6mRLJyXhij5462e7diiLcJFGHa3Gr50PhtZjvdOPELo8Puahfd+nB21jT/jTStr8QVgWGIF2Nhi5x8Ot1/F4d4Eu/Qv7NS5HukUaY5iZLbG4kbIf0Kwq69CqmKvPI0e/2UDy9v4Aq3rllj2orfR/zgh1zFHbsYMuSti0DfvJuXn9DKsJ4VQ70Sqa4F4U8Mvs7nPXahzgwTjH0pEBnZLD3G4oHlNfXRhwBmke/zthdZHXVU07OnhOLphB1JkFKwjHBFbP0Hjxew3qe6lmT2uGUU/br/MZM8IV2rttvXdka4XaiQaWzfQdqdtqKH/Hv8u6QRPo+sgZWmRwiQnbe3YI58l79+AAcea2rIYSmGe1BXBaV9fcSgdVSwmFVtjwlHXFgr7ZnfwSoCgedAlNMhK9sVYYUwz3uyu96H8+FzL9Mdbz3FcKSi/O27+bW+iTWCorQ1QO0qTx8nmVqAMx6VqvVt1HW1+M71xlZo1sfHybICpYJoA/d+6Npy0vFongR1+KPNgpsIuneAJ7am29f+/I8izJVr/S2kYk+lEE8FUR6/gEKHK4cCV0UN4jvhczwhcUgKvRKkmEOqBSafMuCfgJEBuHICl3a5pk/qDBmwyieuMsdbBTCxJ3S1vaW9WWneB/kOmn91PbNLCoxKkZMDJ2z5hcTcMHGIhdjq/1eiRTEl0l13Fj33/LxCrcQSkoebIJSdddNrDGTGiwV5H6FuhMhbQCtsJ+a89zZkOifrHxYP57HwsbC4i2zl4DWMMj8Dz60zT6va3LXTw4OvPPnG9yphaOI+N8cQPCeJfPkau6YPy+CLzKJuguZlzAkyqOPlXlhAmlnUQ4HPjqO/V0xxW2C28SswDHOZrYO453whnlCbA+aNaSOkxT7dHDjWiSyl+Y+V8L9D129uTq/k3tnmrsZMNqLU0hg1ThZtlw68LlkEVNuPk3Q9PS1e6Ahp4aa41qNTqHwxcMse6rQjORVpa/ip7Mzk/6NKnBgjE653upKqOK0Cn1CVTGRo4TndzFnV9OaVbQvL2TPMIWBJ695d2MFOR/b0hbFehkZMPoQQTCIgCwfXOkXkDhicowQk70+VGkj32awMTqFvYsfzik9GapbKt4DDcrQkj0KjmTUgJHcHSxeMgjcWwoRnIjc= 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)(376005)(7416005)(1800799015)(52116005)(366007)(921011)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kfsNTyfeJVeCUT6v1C4CPGz8Vaq5F2mb7H9RtDCsPTn/63Kv4E+kU2toiTFPZO7VU6wnydNZgUQg6l1j3CsKp22RKjWxRRq9xEXxn0ijDDDO0cT7ok4rPL6QZHhhx4ApLHn87RN4g7QXFto1sSk4+Etwcd04e3z3hEKRGLP5dcLclriMWZint4kd6KogryWvKb2kXLoP+3fIoopqMGVNBG957pd4TkJBaSRcEoW5W+PC6Ii/bZtVis9pTJf5NNxi8OhJfTiLHQCJ0KiBetTEwwZgSzSZs3ovGvkRqCp2GtFIni9IHbMAMfL23FbLVJ87o0DTnSwKA3eZOlip37Cj5J+Pkc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roE2+3F4n45UfOaqkgvebe67dM2BOA42XuwbY/hVd/88RL0mssDVDvNqKoV1t6XNKQ55SlIzLFddZZAJGyXlrEVgrkSx6c16BLPS3rQEHzItz2qilQjaltfnqU/mlgI/jSupY6T5HZNX3JtanGD7m1UnuMs168QI81LfQXmeHZ1DPWs+gmyi29GiZ0fToWLjbILs5OLA278kJB6c8QMsqaM= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3e270c2a-d1f9-43f2-6499-08dc804d13c9 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:11.3906 (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: AIDJN+GKJv0+tciRAkWrN/bhdmscUzH88HIEtclcROmwQvoWoVmH7HQjoFjNV8kZrVp9KzNC+Qwkvs6LdjTWY6bNfTlnN8HPG9lndboIhXE2XNYzEYU5E6BljPGi68/I X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10240 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 Reviewed-by: Laurent Pinchart --- drivers/media/platform/ti/am437x/am437x-vpfe.c | 12 +++++------- drivers/media/platform/ti/davinci/vpif_capture.c | 14 +++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/media/platform/ti/am437x/am437x-vpfe.c b/drivers/media/platform/ti/am437x/am437x-vpfe.c index 77e12457d1495..009ff68a2b43c 100644 --- a/drivers/media/platform/ti/am437x/am437x-vpfe.c +++ b/drivers/media/platform/ti/am437x/am437x-vpfe.c @@ -2287,7 +2287,7 @@ static const struct v4l2_async_notifier_operations vpfe_async_ops = { static struct vpfe_config * vpfe_get_pdata(struct vpfe_device *vpfe) { - struct device_node *endpoint = NULL; + struct device_node *endpoint; struct device *dev = vpfe->pdev; struct vpfe_subdev_info *sdinfo; struct vpfe_config *pdata; @@ -2306,14 +2306,11 @@ vpfe_get_pdata(struct vpfe_device *vpfe) if (!pdata) return NULL; - for (i = 0; ; i++) { + i = 0; + for_each_endpoint_of_node(dev->of_node, endpoint) { struct v4l2_fwnode_endpoint bus_cfg = { .bus_type = 0 }; struct device_node *rem; - endpoint = of_graph_get_next_endpoint(dev->of_node, endpoint); - if (!endpoint) - break; - sdinfo = &pdata->sub_devs[i]; sdinfo->grp_id = 0; @@ -2371,9 +2368,10 @@ vpfe_get_pdata(struct vpfe_device *vpfe) of_node_put(rem); if (IS_ERR(pdata->asd[i])) goto cleanup; + + i++; } - of_node_put(endpoint); return pdata; cleanup: diff --git a/drivers/media/platform/ti/davinci/vpif_capture.c b/drivers/media/platform/ti/davinci/vpif_capture.c index c28794b6677b7..16326437767f8 100644 --- a/drivers/media/platform/ti/davinci/vpif_capture.c +++ b/drivers/media/platform/ti/davinci/vpif_capture.c @@ -1487,7 +1487,7 @@ static struct vpif_capture_config * vpif_capture_get_pdata(struct platform_device *pdev, struct v4l2_device *v4l2_dev) { - struct device_node *endpoint = NULL; + struct device_node *endpoint; struct device_node *rem = NULL; struct vpif_capture_config *pdata; struct vpif_subdev_info *sdinfo; @@ -1517,16 +1517,12 @@ vpif_capture_get_pdata(struct platform_device *pdev, if (!pdata->subdev_info) return NULL; - for (i = 0; i < VPIF_CAPTURE_NUM_CHANNELS; i++) { + i = 0; + for_each_endpoint_of_node(pdev->dev.of_node, endpoint) { struct v4l2_fwnode_endpoint bus_cfg = { .bus_type = 0 }; unsigned int flags; int err; - endpoint = of_graph_get_next_endpoint(pdev->dev.of_node, - endpoint); - if (!endpoint) - break; - rem = of_graph_get_remote_port_parent(endpoint); if (!rem) { dev_dbg(&pdev->dev, "Remote device at %pOF not found\n", @@ -1577,6 +1573,10 @@ vpif_capture_get_pdata(struct platform_device *pdev, goto err_cleanup; of_node_put(rem); + + i++; + if (i >= VPIF_CAPTURE_NUM_CHANNELS) + break; } done: From patchwork Thu May 30 02:06:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13679658 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 728C7C25B75 for ; Thu, 30 May 2024 02:06:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8F79B10EE09; Thu, 30 May 2024 02:06:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="oHujOBbQ"; dkim-atps=neutral Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2041.outbound.protection.outlook.com [40.107.114.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 394A610EE09 for ; Thu, 30 May 2024 02:06:18 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GtkTF5fD6uChLKjxdIxu9ImDOSbgF15ItY9NyX2jSeVxMHYcnpYwcwaydcFw+2cTP7Gck5c70aF7h3ZcuDBNwmdOnNo74FghO8HjOL9I5/FyYSdlrqWiqVhkAdzWpKy1aXacLZnNPCj0tJQ3pa+7zg4pmBnSjBdeUt9hldDQn2q8WT4CzUOINeeiY1DZoTBIAUMDJEMS7t8G3EJ2h22B/6zqfLuYAHyYyfgD+J+5v0NTL7YcdNWNjlziVTH1oMKyo3I+ehkYsOzngtxIk0yYaQb3J4/h1BmRNLiNgfft5QppL72dZrIRk2WZscDmfgmoqbO0FMJ+4TgQFonKSBYsQQ== 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=TzMCVV5NPWYM3brKH+nwYP+wX2ZizcEpv6rpzs6d6YE=; b=Uu6cSaWW9Rd4Y4JNtVFryGDgZ1Y8gQ7qXCYRMjCes8/HWWEvdt4Ah1GLFroz48ukjXnlFG4KCaTlLcqFpE/SmhziD24AOhV4Aztc3/n0psE831jEP70upgKk/ce7v6/AhjlRFuK6LJ/iK7PQJfUdUPZ7YWbc/75aV4Ig4gAT1Rhx32adb0fNP51P3ArXDrrUjjyZO3dRUVCYt3dbBPVhA8OvL7/J29HUD2BiPzEbsc180CE7FCn2vA+d81HW/dJCukhZz2FiFsr6XXX7ba6sWT8H3Gd5sDtewz+fUIx6u/AbM1CQEqOw235/zND2j4J3BImMLtZ69p55Vuq486e3JQ== 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=oHujOBbQRQLshEs2SXXmcygjv5BbtZ/lcDLwOflAYwUCpNMXxdDOpH6URFjhXO/9a6B4PDmqFUrl6W5utEJdlSRcOlyF41SmZduQOujLtYMri8GAvupCb5Wi4ktP9FktQsG8EIYhhQEWPbjdH895poLDJRFsQv8UDQuSLJIpdS0= 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:16 +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:16 +0000 Message-ID: <87cyp4oxyg.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 6/9] media: platform: xilinx: 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:15 +0000 X-ClientProxiedBy: TYCP301CA0066.JPNP301.PROD.OUTLOOK.COM (2603:1096:405:7d::7) 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: e4cc77ef-ef6d-4ef7-8fbf-08dc804d16cc 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: v+RxCrn4k7gWXnDkavsHHYKpktUZbOlld0ggo3kvGJlRUsu8DPeXbgv6TlK9I0/ywuFtqkmeSwQMKb9TM61xjkq97DUPhfufvO8Pb30RxrpgU+tNlb6VqD/2e/ln9Bo6HT9apk8c1Zp3hrXhm+e588ZLrlvEpTd7cpG9PatgAOw7t8gIASjVzKpmZnZgehM6KlXYgPRgnyeF+S/sUD5eNLpJRvPnvU2fguHQqj3gRzZv3aNmONkzN2FlNGp5JOuwaP15hOmGcXuPvSpAtGyxUawNEjfF9MRRxOBHSJMeOVNExe/JVrdhGqeY9jeVUsPvc8KjhmUAuMW7dhOJCiYRXSVK84f2h3HnzbbDviwZcHoL3EdsGWYOTtIF7JzZkBoKpOBFc1rna1cfzvimGZWEAwu2aN8Xd8TI6MNZ4shc6o6Bips/u7SuMQ1VafXixxXI5No1D+pDVBVKnJQI5E3g+jXFGL3qSBCUIuMw3q/pWiqEjuJgqnqsZXLrmnRWUI17ftH+nGaGS67pA4d0EwnicfFoh1ON8Ki+QxXgDQzWDUHr2NGr1MH5cGBx5wRivxbrV46kX5vJ0hoCKGeRz7TUXXpNC+I1bxzayuEMpJiGX7Vw5CZGktw/PXFbX2/HhKNUGGEIpZ3R+zS99CL0wGINdwDgBdGAXFBfeiXYD/6f+U/9bjyRfZ1p6/udbMcDvZTPUCmfEJ6fG3K8hUImQ6tPpQzOGN8bN/pUc66SnvwZTExTj/WT0mYPEcfX+6EgLi1VEqGQzEhu24qRrLf122fQX9ehgOYApgLZPp/mdOQFinmsRfFhGmjlzhhmUOtEH4quEB5L9s34sV6PbRTtDOQMZJRnqY3Lgmi0DX6L0cYDegtIp9x+s6E7pgQOQGE7UTawDek1/Ojd3Tg2g8uKxbuTbyH6HF/pGOo24/2r5q5SlS9ehdamOBNF7CF80aJu5NBeILV3UpNsmP+Ay4quV9RpcrkXdMsaKWfgkjitgYMIXHLmwn2kmbld/VqNJMNY2iCmde2W66uwspzzQujDzA21+Ag6dItw9AHdtnKrFI1VXX4/HrdMLDJXFpQqkP/JgtVBiijA/sEjN3j01M0klK0JnhEe7cAJ1uOArLYflc+16dTE9/J0CtYO+E+LQi+MRKql4NHhZglhKmpdQlNRaBGLLF8dzmBouxSJOituNM4VM62D/fqR8fQjY2VisVxbEPp9ZFG7NMJRFKlcj3zs/b68k1CFCxBcg5ccHuwYYi/HU6ReaIlsXQKRHOVrVKRSD325eIwwm1TT6WJN70jyhUhblvIYJt0Oag9rX/qmkIiX968sg24+a+W4KsDSnvyr96sxsqdtVcRUuDldxnwSjZxpAt77wSjp/v0xg+OsbBAGDF8= 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)(376005)(7416005)(1800799015)(52116005)(366007)(921011)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0Oi4nsCbeaFp/xCFHUDbetyvlbeTMFnaWkJZZB2mQG7PpkjqaUN2Fxr/IpqpIlpQ/75KKYxkXyBgIhnr/t+gDhsZW5RYinxXkn5LjGT6+7D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U3Uf/RGL39PhGEZkSAaF+UeaaXHsyLfDMNuQro+gdpSBjieuKuviwsbDzYG+CamKVJPMiS6P4kBhbIF/kwvaqlIrmI9f6UYKXx4gKlYpVK+T4aGysez2O+fZ8RaoCbeWE52c/eKact2f0QD8cIW1AVpqJBkjY/68Typ1nIUOerqMbSgRsUqRRD42k1BDLrzs18lr72O31fAOp/HJK+4S1Df4FN+RslfAj25bhDUwBvcan3SnQPtC/xGR5t7es8J3qAw23lIyp6GAlo/Osjd3dc7mTiCVvCEZluKzoy5gvMUqBumMxzlhbxzJMbXnOGhyX3OwnQYvs7aKFni/e+rUy1Mj6PPP62tAD79qYWdDXxHo18YDrr2ZYn1UdI3No4uVEd3G/LmkIaN6aP/cAjd6w0Hq8/Ix19iAmKL9Dl8/aa34364Y9RnhMcpOY4czcLP+3k7Rs= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4cc77ef-ef6d-4ef7-8fbf-08dc804d16cc 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:16.4125 (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: f3O1Vi7W1KY7lwztQ3dMhWKe1nc6WX/yQS3lUPCvaiZNceXLXPt19kWRXgMpMFfkQsHHrTIp1u5phsOuPYdKAe9T2bZ2FtjFdc5RCZXTfpQPa1cmSBhnvu5uNkpy4pNt X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10240 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 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); 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: 13679659 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 E9551C27C44 for ; Thu, 30 May 2024 02:06:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AB1D910F195; Thu, 30 May 2024 02:06:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="MktLtXW+"; dkim-atps=neutral Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2079.outbound.protection.outlook.com [40.107.114.79]) by gabe.freedesktop.org (Postfix) with ESMTPS id 94CAB10EF21 for ; Thu, 30 May 2024 02:06:24 +0000 (UTC) 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+Oxp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255.255; CTRY:; 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-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 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) { From patchwork Thu May 30 02:06:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13679660 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 E91A4C25B7E for ; Thu, 30 May 2024 02:06:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1BF1F10EF21; Thu, 30 May 2024 02:06:38 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="CUGiCj8/"; dkim-atps=neutral Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2065.outbound.protection.outlook.com [40.107.113.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8477E10EF21 for ; Thu, 30 May 2024 02:06:29 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m1PvaM+Xgx26d19bBhbON1ZGS6RTQBL1c3mmQ8T9KI/kIDJbSlSzWIr5Y/9eiHSkAKg3L95dhzhEpZ+OPi3ZwOv/4zc6U+XfcHKkNH3aH4LyP/ZB4gf8vQHetB26/Xuc/f6YK37ieVAouV7iO9UqiReIH9pzVL5A2umLhKbGM1xFF+JIkZQ8DY534XGkY5gal8ysOrOMC0VWPUYVV0gtjmE7PliR45VNAu6pt6pb1jjCGXwdKBDUxJaiOOsvWj5H0DqjCb7hKOkFlAPqTQnjwBs78ErEeI69V+FN4Sf9zgArjsWldTD/Msv6jeVnOZ0sRBVnH1MIMOWL7eGiAaaCQA== 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=KJeioO+EW3xq2nPVxpRr6/AxHxgv9TxbDqgwEZtHUFY=; b=VPQk4l/ikdY5wW3o50ehGChjz/YR8qfcuyNjmr2EUENL9mu6HEy0z8xjUHFvMtQzAZIN9/QESUeUtAPEdIJ+UAUOw+/5kTfzQ/Y0ISX4qlR6Omb0Fo1iBLj2nYHwUwmJhKnCDRQjrEU8xYITfIColvzbj5JdIs0p48I20np5lwj6Cu9dMwmu3AN/p5KftCHA1lbUXlY2D/bXnLtGWEU0D5WsRmajulpecu+eHX2UxlQSnTaY7FWGW6F+BiCl9IUEnSBWCYZIQmF8A8x93ddTOJ5UvK2zPPTDnceLz2aqYQrhOCG7k3HahMHg0gcbJIkrv7ffYDpuawVZ0mwUGwxnIg== 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=KJeioO+EW3xq2nPVxpRr6/AxHxgv9TxbDqgwEZtHUFY=; b=CUGiCj8/UBjJ1qYXkVQxoX90z62U3GP6rxxDkZGlY42XU/yaeZ26vFloeEMOeLPi4GXDLZFNKavOdwl4+YuRVqltdOp8IP7fgBpQx3zI6wCSD5m0h4iBxmQ29sWnGnBvvStS3iglW/IIyMqf73caVsa0myW22+jVCkMxH+QxUdE= 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:27 +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:27 +0000 Message-ID: <87a5k8oxy5.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 8/9] video: fbdev: 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:27 +0000 X-ClientProxiedBy: TY2PR02CA0072.apcprd02.prod.outlook.com (2603:1096:404:e2::36) 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: b0723cda-523b-48a6-5822-08dc804d1d66 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: uZI0Epw3mfC++b/HtDTNP5nnswlO3wyEbKDuVN/IBtpQfF5BaXCIu7dH17c7hJcR+FlqN45hrmUh6wmVW+LguO4sDQgkZXTXZLpRgifQQf/8Ez8KQlVM+8hvxevs6m/m0+CM2KWs2bsqm70RZgCRPJz2t6kR8dM5bTLi6+MBAymyGfodgOc53jm2wM3DYd3JJr/jnt+/VOCtXQiNhic8OCydhOEeZiPDZ720iJiQJ9hOdrGFVkR2oI5/vgkz4PFcMETJO0hiGtJjfZc63A9h1NrK1sS0Z/hvSk12aZ1Fnz6lNqtDad7MlwnL6yzs+BXIMPUIWxJ//CX1zeMg6Qs/Z+mog0V+6poO3zpuuWHv5dcRAmukw4p82EvB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FV: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: FabE0vtv0Bcw8KkC7Yi7qiRdbLYeL9k+uzNKT+1CTvfvHIl8d8AqHOjoWkC7I2fROGsnu3rC2kD0GfhToMAWvt8vMn099SCpPSr0g4tzVaS3yCjJl82SpVXruYo3XNbV0jlWqzrCJ+n5aEv3flWkiVMOCVNGE9CyhU2gJCgqjvNV74e9dFzb8DARhMC66sBVhH7zlRPkuxpIVqrtnbX39oxCHqOEXa1UOustDZtRz21nJ63bpk9lfrokk4OIv5eJx3uANC5sBgzPcSQAlLessRQ2K2TcSy+c+fpkjwl0/A9GT1qbOrxNvB7KhTXIaKLAx6q41ZDYd6NNjGjjzg1HKs0BawRXpxSXP0fX3K+5neP51DPY8kRglvMoTf5qOncb1pu4jfwRXj3IH8Aj9fIQJrBY192sjPeFkLdCnqPjQIm91ZnvVksBGxHJINXSHYQJ6HdAoJlW2kgbAmZ+K6jwJBrqnScQSqL9UAs9kX5CAvKncYuQbunAoYwhIZGyWPF0M7sQf48FL4dnVxnmdZuiZN4ijOnZM2nGYE3o7eVS5kDjzWtgIk9IFQVJ7bfQchqAhO023NsrMWM2JY4cdSwoRz0GH5N6TQ6Aul1hX5pAx00CYp3dbmHcTdhdWF/D1KxXvpMgDDa/fGn3mHc1I+9KvbzKgW9vLnANuatb1OX24FcUdxKMInkF+7+d9jWy4f7KNFlG0511WdlyJXblhV8RL+UZDydoIxNIKEo9hcTPBeHsYu+bHyrizHxIzt8i5iLB3I+uyt9BtsNwU+q4yTJPPZ3bajLOwrpLNO76vKL7YtqloklQejt2F5inUBHlXVhzuP9yJHj2YMVhDtqqzsMn+lykVm81/0Fr7v49Z4jLeV/+o7h7fvYHgVIJ1ClZydeRmFb71g1tfXHgY9INd6POC3A2wSdOf2DyVN8chFirIxIbVeDKUXWI2kvyonHjRizaUJRRXHlGKDVJJPRgihOS7C8agiT4s2I8aXdrn5+nkkarQQtT6+qTY5wZeeZOYQorss9qxbiGL9T28DMrN4htTTFjsPL1EVoj0UKbe5juhB1ej6uO2xv6Gtlk7inl+MUOidP/RQK49eTESyOq6WC3Fdxys0tjcjPtaQ7nNkTM+7K3W9vlwDytmf06Sk1weWV9X7WOon/hApyDUmg5ibAiF94kOt5sYIBtAPe9rWCNsgeL9yf0NXrB9PR88oCszyMJimuTXEyaCDSBYi1R+XbUJU16DYi0lWOhOpSzPPP9d+feE63zD9r/U/xjF1+vs3rkL9qFDiNXwq8SQymS3xcfIQPtySyACU1D6GrKCz0UbEXxKUZPLYlsER8HI9jGhgZH3hapDIEXGeV1A2ckHqegfw3Fpe16Wvi+hiJIig4ohscALuoGTSZUPc0R+CN7EvIsjp5LtRoTQoIS//i7bwxkhX+CqZ+ftffTVwNLEjDwCrbl9DD+HHWrrI3EBT+EY4BdRwV5VAF5RsKxZxB+MrB5wwT2Vhr9EKkh7D0VMp172alG+vxpuoCqTTetBQF9aokD7hVrqGXDiAqDSH+UXyJ6l2pERrrruGVv9pcHLHudY2MkzMxWkcJtDwcVl3tUcgn8yKP/FhTLwf1aE/guAXGMu/qMTGQzAuNYcIOcNH/g5DQ= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: b0723cda-523b-48a6-5822-08dc804d1d66 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:27.4796 (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: 4Y2/KYOigko6atj3R4GlKBqkZQub2ftVL4zFK032ybk5Tt32Q/HDZ9TEmP0erouyFVasOxAl1bjvwOotmwiMIpuIVu1tsk3mmOCsG+/75Vq2NUGh+UbSvSWOC8VUPE+O X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10240 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 Reviewed-by: Laurent Pinchart --- drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c b/drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c index 09f719af0d0c9..d80720c843235 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c @@ -149,8 +149,7 @@ static void __init omapdss_walk_device(struct device_node *node, bool root) of_node_put(n); - n = NULL; - while ((n = of_graph_get_next_endpoint(node, n)) != NULL) { + for_each_endpoint_of_node(node, n) { struct device_node *pn; pn = of_graph_get_remote_port_parent(n); From patchwork Thu May 30 02:06:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13679684 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 EF0FFC27C44 for ; Thu, 30 May 2024 02:06:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 03D9810F2DD; Thu, 30 May 2024 02:06:46 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="lXJD3iAP"; dkim-atps=neutral Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2043.outbound.protection.outlook.com [40.107.114.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 34E8110F2DD for ; Thu, 30 May 2024 02:06:38 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JB7F0480Ty3MpotYWgVwK6DDRlpXKeOZ0PDv2/c+HhQuvgrpj38cTBJHDZ1TPWTWcF4JcFW9pQPc2ve7+B7lopM2XG6Efk3RMwX274tC/ITnTbxPMpoTI0u9G4w7hg3fel/QlVLZd7vZNgbqWDMbve3tYxWdGqWuy+vYN0rUuU88TslmcbviUxlS5lneEjYDXZp9vOKSG3TaDKos9X/1iCfWnemr5YMGComeK9jvIv6FTk96blphUUUPjo4qogRukhyH8geGQXInZ7ZLmOpwuhicxCOr/6gsSsJrUooldiMeWRHIXzGKj6LrEbPbkVrr2FdbqiU2r/4bzjZ+mijMzw== 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=MsagpA/5pNrylws56rjc/fEA7kqQPMX4DxQt4ow3FTA=; b=n/dJh2LJQT/EGG+0RSEETpU3/B01Jkp8v8srZeHw8aqNcavGBZJ5QSnnuZ2iVkDn2GuJknju97/4s8psUjFVipTT4qORlGXQi4KUvGn3r5JnJ5bmQL43jsnhmd+ltlzj7I+53NFfN/64JBEhwJKOFzWsS42EZV3g2iEfXpTdUPnF2HQilg7lA8UQTlCrDSKfM0/XXL/dIDiQSJrnaYTjGPV27Nxw2fewmftiDa+rPYcgxJOHr1Ms+9dFw0M7+GAk3yswh7+ewlTxPUsaUqOZzIXCub7Y22YYt6WWMVMLVWNOJ/66jcxVt8aUqiazWB+6KgjQzkfiShvKbNCCOY7KAA== 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=MsagpA/5pNrylws56rjc/fEA7kqQPMX4DxQt4ow3FTA=; b=lXJD3iAPv219Q3jIOHpzlTCtoJ3hY2voJ45HYN3jkwMWKEKLa9N4Jwq3AfN/5u3Wlcy7ke0EmGoDQALEn39FpxDVEttZ6rIztxjdiUJor1J7EugFG3Afbw2CbgLjBS753nVqy+cakeATFu7o8boMWHNRfHg4rAysGAjnKuVPYRI= 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:35 +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:35 +0000 Message-ID: <878qzsoxxx.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 9/9] fbdev: omapfb: use of_graph_get_remote_port() 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:35 +0000 X-ClientProxiedBy: TYCPR01CA0182.jpnprd01.prod.outlook.com (2603:1096:400:2b0::6) 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: 010c2cb8-4815-4cf4-9f30-08dc804d2235 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: rLh75B2clWn/ViVXcd14xojT8yvQT9zmUbXumD4xwdY/wzuh+1XH+DX37zyG9Uh87LOCIHyp1GhSj6uTBOfpRsdQfJgUrTNqqA04/CFePu5r2Thnus+9r7Y+/PQi0k01DvCNNOw2xlu+wXy8MwRo00mbOf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ty/2RxRWLyuCFeVTMzKFlDGlY3qyMurSkNTDFYWf9e0aeaIAurtLdWHCChZEfYbO9I/0Kr8lT5j/WSJ1Lggslik9fgDTP3DSjZGhwSVKWKPep/a3QzPefEYM63FcvGonOZ9fNA== 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)(376005)(7416005)(1800799015)(52116005)(366007)(921011)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fX3g7BwxqQdzfd9NKLRQLP37QeHA6Wvt59E86mNnvgah5kKTxdlUE/PZl6EweHZA+geOMR/uz1wMbAzbDCZW1nPABXSDbPZLkhYO8eYR/ugmr8H+vjnrb9hEEdM3XYmIZoxpArAKhHwfHcsbOMHGExQW/CCI2T4RKE8D4jCXBEVxQj24YH4C0mJG3EY0m1PjExOTpNSOuJdMREn5fECODt+q+QAP4pDjPfAuX2oJVo0SmSqW2a6KUDLJ+dRBKBqFzPKE0165V3SefVi7npAggOIOyhTKtLynpeRdJH73GwFMpXUpH5J/c1nbeX/G/wCXDBLK4Ig7bdctmRicXbrM7uG8rKDo5ssrYF8a6TCUZLCyJCf44HQ/y2N/laQqYJA6uLSsZMA9D2VrBO+fYFqrX9yiR618CoMHl6GmyunOf4AHzYzlhuhNW9YbwO0FxHGsFZ1WkrcThxhii/4Flk/2Y/YxsX3IkDd8Z44dn6Ovgqpe+ZXTTy9DAdcvNL93Ax3XHMCh751f6lAoHUdcg7YLWw2+vNz32McIwQ5pMEDI7E7hlmmUSKTK5Nx/uQ5/+b+/Z4hS84YwzR3iYWFl7oryW5WLAIfaZ1LjmfGCGnLCB8nCdrX5DAZXATn6u7xJcH29xHxue3p+DzuaqSTJS+iiY6G6Q10z2t5C9imIRJtn8r2PtfppWe73ryvGMyk8jnYUAznOeUybfdFciKXlE+0+6SHDAqrmIeWc5vrz9GrdW4qxYJVFCRYb+C4B8UkjopE8czw0lPENB0g5kcbeSxPdABBGAkvzFztHVQXGY1sLxYw3YT9+vXYj6lP1/AbqZOL198bFbdWGng+Ddz5ctLRTBB0Jfb7TI0KkAwJrkOYtxLe34O4XP8rW5Co62HqkfMZQUOvB7NNh2REfq565y2RHgAhlWn0ilxhsr3n3Pje1l76YnCZFZynLHXPdTWqubKrsJ13z2vTeU+D1o3eefZ6yw/IHjrDTvihvunkerX4u+j7SL59JVAa0GjkO4UOg4vPvyoNk5vLMYA244gFz+jb8B9BIGxxACzh9TVI9yaG6So6JVyTq4KpgBjVDdwx702FW5zrDhqGyRb13GxaIwGLfbg75sYAcQnI1iFoYYXMdn6kYW7H+41hhs0CYXkq37JOozfwmxj2er9TxDNof112eBgf90Osd5Mf4NpYtdXHgHP43j3JTpKmctcNV8Hk/SaFGUv6fZ/vlf4ALn8Ru8eP5zl4TT0TiRDCYHEsNRT+PRpYYwcliWaAb5DFQH3nX3kQ/lYSt1wA7vjq6mCooazbuq4DHuj5nLpCPKktcW2mT26xFSLL2bh/uGrcFQzUFt+UTKCYN5m8oLEai7ZBMhlU5DTvMdTR2GqiGKyA5GPwJf51fzcqoU+EJCpWx9HS0wPVWVGQSEGdi0gffLml6LenEBCVisndGb5Fj2WSd8AbY2cA/FSLafYpEZbtyZtzqdaERkY5rSytVT1fzphBAYDu8tLKmHJd2IxPydlnSObGtPT2231cp3uP+E6jk2CQbkteop6jfy8RvFxFyfdpXtuieRtaAwaxggDlf8eGSOd4STwK4t96JVe0TMP//th02dih2DmjVo+3+ETtpqhFTcslL9bWGqQaVGoWt7qZtgj0JSXc= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 010c2cb8-4815-4cf4-9f30-08dc804d2235 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:35.5532 (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: EGYfLmdPPc3gNwbTffUbgFy+VlBKfaMviXZyGG+aBtoxTLNwg9h1jgrQNQoFVornARPOM+D2pM4XfC5Q9JsUBieUOm+2KQuGytwL0tFE7sUsFaBF/eSwRbU/iCZ0lqr8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10240 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 of_graph_get_remote_port(), Let's use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart --- drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c index 14965a3fd05b7..4040e247e026e 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c @@ -117,19 +117,6 @@ u32 dss_of_port_get_port_number(struct device_node *port) return reg; } -static struct device_node *omapdss_of_get_remote_port(const struct device_node *node) -{ - struct device_node *np; - - np = of_graph_get_remote_endpoint(node); - if (!np) - return NULL; - - np = of_get_next_parent(np); - - return np; -} - struct omap_dss_device * omapdss_of_find_source_for_first_ep(struct device_node *node) { @@ -141,7 +128,7 @@ omapdss_of_find_source_for_first_ep(struct device_node *node) if (!ep) return ERR_PTR(-EINVAL); - src_port = omapdss_of_get_remote_port(ep); + src_port = of_graph_get_remote_port(ep); if (!src_port) { of_node_put(ep); return ERR_PTR(-EINVAL);