From patchwork Mon Jul 1 02:32:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13717503 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 375CDC27C4F for ; Mon, 1 Jul 2024 02:32:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date: Content-Transfer-Encoding:Content-Type: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=apLBFbhxk+jqGAuccc7SKowoAWPHLJ/lrLshp2SEEjg=; b=bbCIA+DJG0k61rbvpsbptXyJrf /Uhg0aXhcGI7cXYfhiqWRxIkWgxOFfiWPPgfPFxubQ6MQY61Ry1ik+SfurJ0ljQXKP9Ddgh6j7R/Y xW/eYwiBbagphcaTaFSF4ZHqAAgdIo8Ozf1ov6KgMLq4ddHrtwwK9RFquLNQKr5bOmw/rQh4PJWYf pSFhSGRVdI/Jel+yA/RNXwPRWUfJ8CQ36jCKnUyK7jiXpZW/CaJR7PhFQyHf7/40+95AuujG3mCzL mypAtlQ6nfhPQR8MFujL13ckJlRsGqys6GlL0lJ4ouAMQrMikU3cD19u74h2YZ+kewUDj4XN1Zsyh 85ifoDCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sO6qJ-00000001TgG-1bVO; Mon, 01 Jul 2024 02:32:35 +0000 Received: from mail-japaneastazlp170100001.outbound.protection.outlook.com ([2a01:111:f403:c405::1] helo=TY3P286CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sO6q8-00000001TeC-2eR9; Mon, 01 Jul 2024 02:32:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jdM7BraiYXSlGOdKNV4otB9LTVa4DVYFDxBjel2vixs3uLPLXs3acrp1Q/Hs0/jijVrBs9YP4YRc8xhuEYa4b8Jgy0rmmLbazNk4ALzTZ2pu7L8t4pmvDy4goPKCWKsnBPi7L/pevXY47riBpuzGE5VC8Y0wVtXLnYOjM9ZVu3a38WlVtcO9z4RrjMFbmA53fNlbB8UxrYUcOM0dMSK5iL6h8x/k0bJHHyeFkXU+schmWtOCVJ+Gzq9Z/ztLh5EoVR/fZjvjtc7trgv8ZaXkEYr0+ZXlxeES/zueBB9wBPjmKoTK2L3YwtqgOKinkak3l4JsmR7Fp7yW0aFyF+Sllw== 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=apLBFbhxk+jqGAuccc7SKowoAWPHLJ/lrLshp2SEEjg=; b=MmjA+OWFCB2XrLVbofV9GG4YILGo8kYvPYFQAAPl9XapY6OW+H7LNrQfXxUuEq9snYr2VJYc0FbYpvScmN+svaoINK73mNwUm2vQrDLVvJNnF/5Cvxp0kXmOATtcg2J+YKcE7Pt/JzNDVhzLIXmKdhaS21i7fidX8KgSR1qG0NIkJvksEpVVxhNBSbJeh97h2+VEnKbQ6ZskZmIgIjAtua98RvXER6LgmOX9Yrk0eowuP1rMxo79vAyXAYH97/VN6O3U8t9F3lxO3ApuIvem3nmIMMGTocN0sZNi+/ZfZQ+zPX0UDG7wwbwZxmmBGK+3RDc3lR1RIDxkWqSpe9j6Lg== 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=apLBFbhxk+jqGAuccc7SKowoAWPHLJ/lrLshp2SEEjg=; b=WqCw+t3hEkMZ+ez1qXhD2dPDZ+UxRoO1lALqBP9q+HLciKglJFY/aJ+CGNVkidnNtg+J6mdK+zzm/ymyXUvDwU6jRHA10WaLHzMxDvc7y8o2uU8hoorZNCxwyK10nA0YAKpCk2DANN6x+H00cTxb6opUObTIgIBSh2Kt9aqiOLY= 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 TYCPR01MB9627.jpnprd01.prod.outlook.com (2603:1096:400:193::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.32; Mon, 1 Jul 2024 02:32:18 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7719.029; Mon, 1 Jul 2024 02:32:18 +0000 Message-ID: <87bk3h970v.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 1/7] gpu: drm: replace of_graph_get_next_endpoint() To: "Lad, Prabhakar" , Alexander Shishkin , Alexandre Belloni , Alexey Brodkin , Claudiu Beznea , Daniel Vetter , David Airlie , Dmitry Baryshkov , Eugen Hristev , Florian Fainelli , Greg Kroah-Hartman , Laurent Pinchart , Maarten Lankhorst , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Neil Armstrong , Nicolas Ferre , Suzuki K Poulose , Thomas Zimmermann , Tomi Valkeinen , coresight@lists.linaro.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-staging@lists.linux.dev In-Reply-To: <87cynx971l.wl-kuninori.morimoto.gx@renesas.com> References: <87cynx971l.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 1 Jul 2024 02:32:17 +0000 X-ClientProxiedBy: TYBP286CA0011.JPNP286.PROD.OUTLOOK.COM (2603:1096:404:ce::23) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB9627:EE_ X-MS-Office365-Filtering-Correlation-Id: 69f37b87-c9d3-4b12-8739-08dc997606d2 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:13230040|7416014|376014|52116014|1800799024|366016|38350700014|921020; X-Microsoft-Antispam-Message-Info: kYHnzN1SqlFcPJnqxbVoXUfbyibnasg4UKSpLjycsOUmexUBIj1PV86qhzGWMEMsoSZSDns59jsLWK8Kp3wvfnb9y8AaYiO6DLFtXbv7vTVGQwfj7ei8ecYiS2uoagN+M8JfwxXTsTkZr+3Bu4XFHXtdCPuAZD08s2YJlxqWlqAmXIYJ+/eOKPoKVyLHP1vndujE6I7TxGZFvMpPAEcMr2IlKxvS5bwq0TJGKTI9dbXbT3GYl5deIa95lHFnxRG0eFz8rsGZeFrXcxorc0XwgqZVSoWAAKQATYqMEUAxGS64xQ9Ij25Kxq7LEo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s1QRWF2f/ 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:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 34rmV5qTuiRmvRzU/Sd1sWI7g5N1jEUYN4pB8H7YKwfa7BozXuBopeXTc2TBKqV/wN3Yl10arg89nSYx0g5/gm5Txfu+Uaw2dZDtYN6f0Cf1eTfFcUYn+kW2Hry9npupA61XWgW8jPbvoL2WpEIPRH9Yhe85Z0VLnYFlmdJjgekXRznwHbVPSBY3OX5dkx0kGv2kU1wGHydWGdc23C2snuvADptXEYL8tCSb82ZamgnijKkVtVRqi+J+lMig+vMxiWkO+ozBYezXAENxDyLHQqqbrKe4gW2ITxhGgmsUMyNdmXnE3asR/AwtZEgyjUk/18HbMkblgGO/vVAkGiuCRR7lDK7BYP449SMoex5UXLdLbcZ1OOhvgds1ZDVrY7wObg9GKi5YF13bqMYmA4OR7B5W4ThBIbjit2lNohpEPa++BjJD/D9iWwrzyjl+G3bJX1yE9gwiPBOyYhLI0ZzRRwbQrissV3F3Phj5VtQ3LYasOPLj+wuJAP3l6prq8PPI+7PRd5OzIlAyWlTeFv6B339YypS34rKpJRwhBxADQAeDiOFMFhogd713F+zlz6KP7q4fg/9nloIgvh33UaAxYiUOv5Oc436ztecZTT8OOKr0L6ThQ92XvMZeo8+11EWVTZ0CDj2DrG8T0tR/v06Q33nw4yzE/aqpdXHVBiscmgXOGVUUxT/Okf5kY+beXLv+f9KyeT2dF2tJRRm12Z6Ko+imF20bVpATrVf33KI6IaQL95CKrqgB7AVH605Ii7tyMK3NsBYLceeQ5WmKXaFN2TwXM8eG8wyRLIMkP/zJHd8p5QoQBmSKpaKT9OaIUWdiSAIorarRDOhUZNZbj8rX/t7TXkENFbvR9G1w6BNL+n2Qu6/ZxoDygo67QSH2dvl6cawxYCfINNtNoAaz5Bc6muTfAo8UD1vy2evVKUYyx2mJIKJcwU0NJDNUk72UNhit8YvPScsrzw96ODDOMmgBvIZAOVOCY7EPX7VkjxTC/Mu6z6hSqGuQ6CLZaEshY11a44IMyEui/wj4irq3M6avJbumggjwv/YuUKSquXtk4cy5kvA/kfwwULZdwYX6mBqFBU9WdSqMKQH9aWpVoNGXQjXYKJxeJPaJn95fXpd8fFkNjRBAGConLWYwzqPMZG64EWc4MtRBl7fr0rXFFMTihNh28SPqD58om+oY6ToucNmof5kexWiSe5zuyu7tF0HMxZHUJX2fH30LKzdU+yrbw3kbHaRBbre7xxdXqyC0h9VuWy0Q/3ZKObLHZgrswTKIVzDwckw2eqyr17w4AtOHQn0QiNqB6GCJ6NyrfKAiYweUvZD79SxGbdqbjqS2oadkBG44tR9W7Ug17+EGhtpSQC9zUvDdmb+r5tfhd0vQAm1piu7ZgOhUPkSgxNOwA0qeyyBtj9MQwnuYAjSsAHA9Dk7uuRcF5bHdl2T9bJQ1TB13OiBLmdMZfTRPp40DVJPD14muI1TYT5+8rQ6RMKFBud16ur5rnzkpa/iMKVgXjpfDtOGwcqrOtF+4/rZxBv4Iztuqr//j+xwTnoLM1YeYDrvfZoIbEHFwokhKgjSAomp0va1msAVcB8UUppvmQWetR4rS58t4L2lgVWR+h/oXkQ0F8y/W7RSs5R/YNn356PQ= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 69f37b87-c9d3-4b12-8739-08dc997606d2 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2024 02:32:18.0775 (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: gKF3SbnxvgMPdB4xHSZol0CFzvZghR8L7SjrTm6pt/HF4+4K4qa/7X9t8rvtpCYrhb9Bj3M69UPoIoDC0z+5BGz4xlTgd1p4UfPVhHB3/q18+Fk3Xb+GIIH2vJeskk9b X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9627 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240630_193224_696168_609AF019 X-CRM114-Status: GOOD ( 15.29 ) 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 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 177b600895d3..b6b2cade69ae 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 4618c892cdd6..e10e469aa7a6 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 4f8f3172379e..8c29b719ea62 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 Mon Jul 1 02:32:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13717504 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 4B22BC27C4F for ; Mon, 1 Jul 2024 02:33:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date: Content-Type:References:In-Reply-To:To:Subject:From:Message-ID:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8qQYdnzwgiJpwqNy4G9/w3ekIk9sqx4o5YOeurQuIcM=; b=1gjR4AEdQt/VxWAv+byebd7J3p oY5lEyXhjhDK4Ex7lrr69d+Y0e7ooRfzlGq/cwOjIQwd7eTcEvEMtlXcwoPdPo0VoqVHFYV/BPcCD MJR1swwDBWj14S1KXq/+vSfArjFDYIdu4YwvX8fZBjzk+Lowh7sjprBN/ZJguxsBMwNvZpjJULCh1 difUcdWhjRe2UOd3DMzIY/U64qakC/WCVkEEBoqwkePOngD74QRAu4LBaAwBBNeGkiqZvY1+tmFMb BBeSuYKgZa8uljcasrZPi3DgbP4cPVbv41zWrAUfkXSsHPB0XisXl+SuiFb9ozBvk1Z21rQOVWpg1 mjzGpCEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sO6qd-00000001TnQ-0C5f; Mon, 01 Jul 2024 02:32:55 +0000 Received: from mail-japaneastazlp170100001.outbound.protection.outlook.com ([2a01:111:f403:c405::1] helo=TY3P286CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sO6qK-00000001TgD-0AYn; Mon, 01 Jul 2024 02:32:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B/vNI27WLfZ+Kkcz1GNgpsxBMC8F/G97qZG3qTd+cR8gOolooqMJLwmml6kpmXj8cyA8xGRLhRYRikVx6wmFjbPb7UMA7QiAXYBZPTS2swCdx/edJrwhrCS4pYaTulwCPh39zwlEH1OBpZvC4iDI7LLiiUFplPPHr1LOQX63Nmcc6vnhQekPG6Xkh7p8iDUzsZUb7jL6CjuGvMZ9f1hvPPW5t/R0gzjv3u6s+Ydm5wzEu2uVaXoarEGZakBRrjP/+995YS6xAwl+getU/PIO3UANqh19+DdxMQSUvAGiFsPqYv1FeoFOvpc0ajHwHpP0Zp0b3MWJOv0NmvZzVVZRmw== 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=8qQYdnzwgiJpwqNy4G9/w3ekIk9sqx4o5YOeurQuIcM=; b=A29TMtZZHEFaO1qX4sxXrUmMgTNzc24IB/FMsxcHHxFpkVnd57VBq6b5GiX/3Xhskx2Jo4gi8N/PniD2rojyYjCHAFPrDzqqkX7TsPn117jsxHtAhPG+VcSfGFGPPL0/l+I2ADa0ftQISWg/tCtW8vUgLSyG80jtpzRslHjI+XOok1IoAAyq1TCVqwtbly0fWoYVtdD9PMH8WfHLQ6YdzfMOy1hxXaeX382Jy6WJ8knTm/l/qFqiYQYwWONz3vJGcyZGwvmPQ8UHILYS8ODtKyCa3HCvR0OU/3PRFV7Udlrjsxt2GVu/bQf2Rto+mjUj/OwzFmPzbOYfF82qvAsCmQ== 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=8qQYdnzwgiJpwqNy4G9/w3ekIk9sqx4o5YOeurQuIcM=; b=PJn9yCj6VKFrYrkh9ZLZzCXkKwqu/ayld82P/DcTKd1Bp4Y4p/dVp1GnVxrjNHrROlpDMCdHvKiI9GnhGwsu/GJWL9I3DJVJl2hYt1MEM3vU+zuSNtv1p7PXFpCQ//KfQefeL/XYmNMdwzBLpgSToc1sYed2mMd6+T9PtxScR4k= 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 TYCPR01MB9627.jpnprd01.prod.outlook.com (2603:1096:400:193::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.32; Mon, 1 Jul 2024 02:32:29 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7719.029; Mon, 1 Jul 2024 02:32:28 +0000 Message-ID: <87a5j1970j.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 2/7] gpu: drm: use for_each_endpoint_of_node() To: "Lad, Prabhakar" , Alexander Shishkin , Alexandre Belloni , Alexey Brodkin , Claudiu Beznea , Daniel Vetter , David Airlie , Dmitry Baryshkov , Eugen Hristev , Florian Fainelli , Greg Kroah-Hartman , Laurent Pinchart , Maarten Lankhorst , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Neil Armstrong , Nicolas Ferre , Suzuki K Poulose , Thomas Zimmermann , Tomi Valkeinen , coresight@lists.linaro.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-staging@lists.linux.dev In-Reply-To: <87cynx971l.wl-kuninori.morimoto.gx@renesas.com> References: <87cynx971l.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 1 Jul 2024 02:32:28 +0000 X-ClientProxiedBy: TY2PR02CA0031.apcprd02.prod.outlook.com (2603:1096:404:a6::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_|TYCPR01MB9627:EE_ X-MS-Office365-Filtering-Correlation-Id: 016432cc-ffb5-41f7-c588-08dc99760d3e 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:13230040|7416014|376014|52116014|1800799024|366016|38350700014|921020; X-Microsoft-Antispam-Message-Info: DGlB2Z5dy/F5TDMFr3wQq6UOoRJdAYDq4iB0VWumF/Vk7JIq9J1piDwk9UqI//apQYD/nFvi73/tGLCWt3iiTXE3ttu2hVpJeTE3Ra/Mc5rS9Gag+/b6BMsaxx3xitsZqIv44eCGMAJSADAhhKrTNFWwX60a8Dw9C1y4yUhOFOOcdQaRuembAgulVvaZ+pkhTCPwftsoltWCLamUxyhE6f+lAddzuISPd9FEmEHyL7vczb31Y4tb/rZLsK7myjFtLEq4aNZs9VC7t/Te/0zw3MWATfqYGBRasPofPPCYuGRR44hmQ/A+0JjOFYQz5rNWJ9M52wJ0ObKZQ9CvUpS0Fg1iXlOqj7X28D+5H5Yxv2HLfzA9VnY3ozSklIj6Gz2EV1lC1REYF9GDDVWCBT9IGrjbfDSm1pxsU/gF8Ku+bS41VScDYArYZmlktvB0wrPfCee2GX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;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SZEAeq87b6UMmxlkQ2+fLKFdeznc9q5MFAKDfRoZz64axSUdoIG76wWEBqkBu2FDevHf6Lltl8ZfqeSb/uNZ1vNOY4zdnAMHyJa/89YFMdWbaDZ5y/VIl2D1C5E+zpNqlSSnUXetsX0mSyA7HtH2cYHBiBqVemCRcGaOUyAu3nyI+MrQZX6HAcYl0t1m7bSW5uHGIHIAQr9xI4VIDMYeZNaHJPOyqG97bexf3+JH9YxI5kwYyzIcD610NaZouc78M401S8/j5qQqQJ6ciaCX+v+NdzB3QNQ8NI3YOuPpM3Af614IwIr2nsQELAZCH/UNoJ+3hfoyeHAGmBk68AG0w77hWS3qLOggqg9ac5R8BwuDg40s99HMnDngqVlQkjxRKRkbesI3mba4mz2XeWQwiCWjzH4RBG1l388/7CSyKsNVvMwGd2BWAIkouLuXvt4S0+wzQX44/z+J5LM/mOqGMlgX5D3Ii8w8BQGOyV8ZspDIff+2WyzAYhy8S8E8CFc22MODHX06bIVmBmCuka0VaM/643Fg7lejUc11aGnQRHlZocr3MYjCtj0ehzc4vjn+AfRSxyxAe9czaQFY/4DpjT8Y/lxxoNzhsM03lwtt++PehUGvyEGKV41lyo/T+SQaQL9l5DgwaFQzlj9cnTgXOmz1015sZ1iH+KfD8639AXSIz9ZKX/IEtnciAradALfRIXHzEymserPcsGZ0a4P+bton8jJPcOOGdRE3eST+N9HmixaPNmx2xGcr7sXytPdj0Fk5wKY6uOSBEZyIAevMQgPVXtJAH/03JJW9TUOByWnYQPUgbMnxioeNVe7ot+8V/kU5ifUW2eati4MJeCVeiFGX3y9N3aBX12XfAw06Nj+oxZ16mHQ+QhLCneYOMwZFFlFRSrlEWBnjNvE11awFIjk232brlhBGk3qUIRuJ0aB1uMXBpJIJLCwrtIid1+bornW+MVVW8vpWP/2ZHSNMAr1HRXliX/O9HNCMuNjCdSZIAsMpHAnbs7D4fukB+M/mXLPogSxZBOLl0eH3iqx2LkBczzaj3DL4VmdWN91B6U4kaolwB6IVbEFDA/z6i36DdD8dZFEetoyyYAv8N5HfPobCSnwuLQ1HdcSqMLqPGXmVsRmNDg5a3TRHgmG4cQsCoMvCJLuHF3mojLeIb8V4tGD3b42JLhrTZNj/A3ZHhvbYxfm6ki2bJhwIByG+TotahQ8DD68zRzES2VOwUD+KBq/XwY6fQ8dS55OpEaopRVEbdgGVO3SpYEZ/RQrrqAXj7FOvKQG+nqS09GYphcvptHD2Zvn/U0TZ578st3N7oZ8/jZj7pcPzqED6DdmeLEo6v9jgiN7HRIlpR7W26BczKvakJQ851HZONmnNiXHBxDmq4cLrTDU4GPEtxyGm54ToSHPH4t6G3x7sdwGXeWsdjom8zD3848qz2Y779IqfrDQ04UZDmi9BtgelGShyzo8r4Oo/qvRPEpErgqJx1Z7Sr4d7DXx6iqE2vf9IeYRRdSx+X3G7RYLT55p7S7j1x2OeFsP1c8TG6GbI465pMXEX2x29cGcKhtcDDOmqCzUqgFc/9Mo4nCFMKxs6k+FgV9l3Jfn8GVoaeuWoidx98aftuxvnGxK/RRswrwk8QwL7OcQ= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 016432cc-ffb5-41f7-c588-08dc99760d3e X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2024 02:32:28.8736 (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: pOikd2MRU6dQEHNHvwk4MKhzLIgCdpl7WPC2RcAI60Jyx6A4H7UfDc3dQoWetHeVkCktqXYBTwArusI4whw4TXfxz7hmw6EA6lK/SaOXXxN/DDmIZ3+IMq4kIKJI0G2c X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9627 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240630_193236_176552_ADF43932 X-CRM114-Status: UNSURE ( 9.37 ) X-CRM114-Notice: Please train this message. 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 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 050ca7eafac5..5f8002f6bb7a 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 Mon Jul 1 02:32: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: 13717505 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 EFDDDC27C4F for ; Mon, 1 Jul 2024 02:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date: Content-Type:References:In-Reply-To:To:Subject:From:Message-ID:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=jCaReUbvej2eyrJqLz7qdvo9wWO//WyaJ59QR7IITVE=; b=B5R91U8vk4hexOU6eE1araroQ7 LXsfF77xy0mMZSXcm6TS2PLaRMYyokMpZ+t4/SWL+i/e2r4z/MYFBQSFSUHwRqbzjGiV/eJsr81N0 BZIQVmERl6JXwPIT3bw7XTSSCsvoHQLXgFYTDhJPTXzlAo//j/JQ7LIIrRmC5T6RDDtBLECzSOlX+ yNYeVkMKzZNPvf4tEiacRcTh5sy2FWMhhWkjvaGWia3ZGniHrzJTHwWuXWSpgRYf+te9EXQt4nFq0 hvcMvO2enT6Sht/BvQz7wULsM4M9asKLiCPSJIlp39sk/Iic+EuByv01yRD6sDRpPmzXdHP9O2/gT HajbBNtg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sO6ql-00000001TqP-2d5e; Mon, 01 Jul 2024 02:33:03 +0000 Received: from mail-os0jpn01on20604.outbound.protection.outlook.com ([2a01:111:f403:201a::604] helo=JPN01-OS0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sO6qS-00000001Tji-34Pw; Mon, 01 Jul 2024 02:32:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JoGRzxWSGVzYG/DUJExPxhbuBDYmvgdZy+qh6YBCGqvpdD0DaCOubMEQl5RUd3L2+vfma61wQqZQHsVVyyZHTfcTCEikTyz4+EI70xrt7ngaa+cZyK+/B1P3xAqlrTtX0lg4IDnBGVOLx5QE6tDmt/FJ5j5kw84qajrmQaB6nOHY+47yNA0lxkk9CpHByG7pLXhLN2jcsGpUKbnC7lDnpnK8ZazKDXRHrI6QAfyeAfMPP00zLNn2EZ5T1Hsl0DcmM9gEVPXh558qRVCRha6rVwkePp4HGHLCEOb7CnKZLJmh++Xi1VmjNPeBpdRif+xI92UDsNRr73GqY8g7gH6cXQ== 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=jCaReUbvej2eyrJqLz7qdvo9wWO//WyaJ59QR7IITVE=; b=ggASuezI91fEC7Au89LsrQLWL30FC9V80UwPN+bl9u7ORY0K7/QVk26xQhgMHu/ru2ekl3ZLWXqYMM7P1lVZydWV54Wely/HUijYXc8TAwLRxBa2p5XXBMvjrUBUwxvOVcJAHROFe2DBF4tw0tv0SPl3pZYakGZsBWESUXg8Yj75ES6+0QNTWZluBe/pbDQ7wT7kvvhxQfz2cS4G2H4b2GTocInhSyXXYoZGcGCnTwJl8HL/8Nh6xI5Y0Xrs7OQahDRen5vqMogSGEvMWNPaZ0H6v12sEjNJnpRKYNEHYjpwgOre/2u0gz9I4uuq27J+xzvbx3bDrS/GoK2iBa0nyA== 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=jCaReUbvej2eyrJqLz7qdvo9wWO//WyaJ59QR7IITVE=; b=e2Alh41vC58viaZpaDN+NCA8SkeZVdvYOYGbUMw790mLoM6bY223w0gws7hNlyOrFbzUi2I+htpxiQyngA3gj25J4zZcOiR8L7mdd5J10YH9RYlBgcraBdZb/d4dJtfy1/sl9q+yyheou3FALDptOaLr7Tu/28M9Wr6iIMMu8ug= 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 TYCPR01MB6704.jpnprd01.prod.outlook.com (2603:1096:400:9f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.32; Mon, 1 Jul 2024 02:32:36 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7719.029; Mon, 1 Jul 2024 02:32:35 +0000 Message-ID: <878qyl970c.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 3/7] hwtracing: use for_each_endpoint_of_node() To: "Lad, Prabhakar" , Alexander Shishkin , Alexandre Belloni , Alexey Brodkin , Claudiu Beznea , Daniel Vetter , David Airlie , Dmitry Baryshkov , Eugen Hristev , Florian Fainelli , Greg Kroah-Hartman , Laurent Pinchart , Maarten Lankhorst , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Neil Armstrong , Nicolas Ferre , Suzuki K Poulose , Thomas Zimmermann , Tomi Valkeinen , coresight@lists.linaro.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-staging@lists.linux.dev In-Reply-To: <87cynx971l.wl-kuninori.morimoto.gx@renesas.com> References: <87cynx971l.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 1 Jul 2024 02:32:35 +0000 X-ClientProxiedBy: TYCPR01CA0017.jpnprd01.prod.outlook.com (2603:1096:405::29) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB6704:EE_ X-MS-Office365-Filtering-Correlation-Id: 59d84ac8-9715-4238-b41b-08dc9976115a 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:13230040|1800799024|366016|376014|7416014|52116014|38350700014|921020; X-Microsoft-Antispam-Message-Info: sSf5zA0FUm1hWTWr3MXRX33nZySafqWGUSomKFyEcQawYWGilyTFO9bedQthkYykF8yCFqe0DSHoLu/CDFX1teyzdagO1/BNeGfJIslwOKkkP/d/+Gq0w96yLINSlKV371S9XEBhsftyX4B3/pS31rjbscaQrkCWbZyrWVQ/aU7FFsdXTPy6x3/fZlOxl2gebNBFbuXtWFMdHWNd3tiU7UKL+Cvg7lznoGB0qXsQqsJ9tXKPOW3Zjt27u7gV+WGVQsqqjHRjLXTHk7iyYEo9+c4pu381ixhu4JjLH85VA5UK0Xu/220SKxvbKUZoDivnYAVt0P4B/CLl2whs9Y4pDUbXihsuodS0uHFxW3THDSShTM8DcNrR+9wSQhSAu7oiyp/G3QV6dWbmyj4PP5/pScGvfyHrwKtYKNv8rSeiWhLRC+y0oKxZMAB8oen9TA3mJFlRc/uv0E3+K4wW5ShsdL8+o7vkTxn8tBaqr2yyyojek52spGxZVMgsjjQGBkv/Ho5ws+qVnmcdgtE18midh4Hakx21dDZPo2NieF/KtkxQuJ/TnsBytfw6j6BtZi+uv7TsUU9ofcu1ZgMb/XPea/74iO2LFJ3taoNY9dqorlDgqgpPJ/2pAu66U+B9nrrMA+8mXE83V13wDIIMeX35QjFPIXh4XmrCpQpwpI2DfmoC52KyUpWobSXsUa70pe/FZSIsZr0iHRBLC1SjKrslX+0SN6E1TYexPxZjkA7hO1e94cj0FiVj0mUH/SIOBLRl5830QATCbBdthBmuz7hjLzYhzPYlfh53lwUtkBTfLTh8tR7Q2cQf2pk2n19E55NKEXWmdlU0pIe//fR6oZMM9pWny1wXRHmLFVosEVXTbwVxK6I07gi2LeFre7BEWUNwiTmgUDktzV397hwsUwUyBKItAfA7EUc7JpLiC28IkqiWmFGumwVGXC8ntTkaU8Wn5NzoJ51iktPpB/QamQZATqlC3gLiv9vy7k9fOTSwRJZbW3EofiLFpnBShnNoM2EOtIN83eAeZ8lBAlxVOAF1hrPmpJc3RHivJCPXGXJI0sp+JpOHcJc41wzWfKQmTmP9UfurzkX8vgBOrD11X45dtBe3rsXSkpdW1ObWTEhm+Ql6yQOWbHWs3mnmzpwi8LxolcABFqLiwe3fb+2W5hxONjYKVQUuuemvfIg8y4GMniYiv87YQau0QQS4Co+ZsRvwHYwWnfwbJiUfXp6PVo7qD3j3LpMiV2hwsXypSKOtG08Ubd765H7XuD3Msfz0DW7nAHNn5Rc+qd5/bECqsqZHEAqOsqjonGAK/a8CutXCSWr/hhMl76QzZw5hNfk5wkKdeSUMmv/vqmUlP1sjqs8diLJ4T4EWpqmULCnPpufI15B3A9j2vJvEmYGDbwdaznCLD7oMJUom86vw709ubplspL+GYwgLGpQtwqiaysGqL7Q= 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:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-Message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07xpdW4t8+obxXb97BaB0x3ik+jjnIp6W6R7RimbYQkVIKtsdH3VJSJZU+e3KofteA1zIWJpQbZRcnaaDleKcRQeRj451ckuYYslkEQybtRBUYaNTPaC1BZooHhliuXzLwW9nDsr6lpcLgdUMTtad7oIY0T0jI2OxCYqbiawIaD3CfVDIRqZtD96dbDCyIc0ZAqW+cKUE1shEOVY9CLNEVcOGeC3QIfjszWpv4npjkRMAYVFo8mV/xLRuAZosYJUuiXCACqWhVMcVAFv2/x6e4yMyrYIUdRW8UrbXYkZmLU0ZgA3m+moygFEDwsAr4Hmgfd8tPGiJQA52lkNkXKfh/fAiobojTPjln3ey7zUPPnLODqKvhSPSG0yYZ8Auhit5pL9Mia3YuccepN82hrXJUvxuyXwNNX73iKgXBEtSdqlmJj+sevxxGwwGyxDVWgaWxuUSfGoiUy+mpOdDddMeFJSBHIp/cfESXXteIlruyJ3vpUFGHyO9fc2GOhC/y2rF072qeQQAm7MVqHUkU+yOHcBmWnjx3gJ1N6PUDoOkUiPZ5YHdin/FDXjEIQ3cGaz2m6nwtvua38ydo3zrV+CSQ8bBpqJRxbifg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 59d84ac8-9715-4238-b41b-08dc9976115a X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2024 02:32:35.7739 (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: xCI0qkBXJgMuK8pbxRJagOr3XMJluQJfkTO6nTXBlYAtcazWh5V2BN2WLLRyhVQAOdcDwIrPtBb6ub6CjtQryx9uwrBMxISseeja2duxVBmV6nlWs5fqZcWHAudO3lxC X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB6704 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240630_193244_783103_9E5ABA96 X-CRM114-Status: GOOD ( 11.25 ) 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: 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 57a009552cc5..64e171eaad82 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 Mon Jul 1 02:32:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13717506 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 719C7C27C4F for ; Mon, 1 Jul 2024 02:33:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date: Content-Type:References:In-Reply-To:To:Subject:From:Message-ID:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TDYtQKJOJc+EDlCZzEvwK/6q2HUOMib2w9uKHniF1j8=; b=RYM6Sf5BE60sFGCtB30yzkszF1 bVIU2jxs1jr+fvmm5xbDJnIc8s4nZ8dqGjihBLfnLsr1y3X+uAK7FFe22szk5pcdWuN22BnnXVhR1 YVJ5ZwrZEICEBViZWnei43OE0dxLtkyUyjJdpdTpKwhLTMAlIf1Cy+a6+ux+HBb2wkUEQeyVlc5QX cbC02VB0QWDDTyqXE6JC0iXk/fX4wiPK3A1JowQO/qFi8S8la66nNTA4ti/VcW6/Zxk83NyitP9Un pKZMD9af7SREvsEDxJH/XcKtjLWSXBgQaEQuiIjkUr32bdhnRXrMPODtTAgmOOGqCzMHwG8wZk1Hl 2G3yZ6gw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sO6rD-00000001Tzn-0gyO; Mon, 01 Jul 2024 02:33:31 +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 1sO6qa-00000001Tm5-2RnK; Mon, 01 Jul 2024 02:32:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XP7jzcrF0y+YWFt2PkxriwlVrkfDUfTRIn7tUO3KsgXt0GJRLTjRK5Xz1LttHu/uJcKRj+vAPCN5mZK9qFR2vNhBu2eBKRiasUYVlb0rcL96U3MMj+fFLenwe+INgHXijtBWtzAtMqMW+Jl7X9dRV7O5+SwoQeOcUn+9Z47fuxil6sckv8mJL39RAPTF2RdEGT1xzGJn8VR5ISvZ7WXRWuuUkeXWoH5lwW1ZkKngy8S/fYpyFonczXNtnxOK7LXcmjcUChO7h2WzfxGTEM5dPemMUhZJL+E0pzKGwQvTg9dLH9FkwhtIYYMePyloXHj8pygCOsEQvVlm0afUTbiQ5g== 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=TDYtQKJOJc+EDlCZzEvwK/6q2HUOMib2w9uKHniF1j8=; b=DAlw3Wm4k71aewkxueIR15IVkqS/jrVBJgk6SrZ7G1wMHIPVxzNBbeyHq7TG4GebUapP38UYomyDIqt+sUn8CPttz0EN2JQj4iW5Jg5nqtTQGelFlPN13eZRxnRAD1XTMNJ6dhECcrAhZVr+XmRLTJ5xB8i2DHTqA7ckc6tEyWku8MvkeB9pJuBhwcq1JLmEIHdb9l6RJN/fso/DPL7YfgQcXCfhNC3gR/ZaLN/ZUe8nVdugNOSEfjeWw1dbZFfGet4xp4/78e5zBJk+CjM8fu25p9TKUauzdxJU2I/hxpsf0M1VSNXoQ/WAUSbMgh424WQc3YdkClWx1JdLl6Vg+A== 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=TDYtQKJOJc+EDlCZzEvwK/6q2HUOMib2w9uKHniF1j8=; b=CVFkWOKU3N/IxUFqLRsJ4vLmKhejlJxhgarQJoeXqXSVzQyktRfZfF0+Y3f298STIrnR1mOUZ4oF+n3lARKc7ctK17ut4+7gA1b9CAWnyRltYHuFtZ5OqMOZhGDdRs4yPU5iG9jFSIPtzgBs8g0vEdlnaPvUo4Y1pwnLZWBW7GM= 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 TY3PR01MB9730.jpnprd01.prod.outlook.com (2603:1096:400:22e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.29; Mon, 1 Jul 2024 02:32:42 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7719.029; Mon, 1 Jul 2024 02:32:42 +0000 Message-ID: <877ce59705.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 4/7] media: platform: microchip: use for_each_endpoint_of_node() To: "Lad, Prabhakar" , Alexander Shishkin , Alexandre Belloni , Alexey Brodkin , Claudiu Beznea , Daniel Vetter , David Airlie , Dmitry Baryshkov , Eugen Hristev , Florian Fainelli , Greg Kroah-Hartman , Laurent Pinchart , Maarten Lankhorst , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Neil Armstrong , Nicolas Ferre , Suzuki K Poulose , Thomas Zimmermann , Tomi Valkeinen , coresight@lists.linaro.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-staging@lists.linux.dev In-Reply-To: <87cynx971l.wl-kuninori.morimoto.gx@renesas.com> References: <87cynx971l.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 1 Jul 2024 02:32:42 +0000 X-ClientProxiedBy: TYAPR01CA0021.jpnprd01.prod.outlook.com (2603:1096:404::33) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TY3PR01MB9730:EE_ X-MS-Office365-Filtering-Correlation-Id: b4b5d8b3-f0a2-454f-120d-08dc99761599 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:13230040|376014|52116014|7416014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: +smDaZwwrq/3sKCp+/M+nu1y+Ts/R/mHI9b1mxU/T3v2tDgXTwHpuEkBpasTM2g87bk5AM6pPmO6J2c4nrv4xJGCP/MkCMmFoNdGpyG2/hPEfz3V4Fx/vHLaNJFoMIwFEOXBA4ppROcOr06+d2A6mBr/AxQPfaRHThgQHRJmsnESrgTVvoTBOQFDpbJZpTbCg6uckDuK86TO3t9yEX/+DgGMrCIoO3ZPJWfhfx013ag88r0VQ5v985dB3A+z9fRcMqzF5+SWj6F42vCml5E/msIasdub3SV5l9R5uGO4v+TeQRyEg7Ne+Q6iLSHca4wYt7gyU/rVbP7n72qNzWXVBgTBKFBe6yv4OO/gGF81EVP2IIYkzunYTXGwbQD2fmodCFYWVGHY/ZGSEyLrPqk+NwQ9oK/S7XHfyildf/Fxg+h+N/sVUJUIXC3HBLszJV33BJxaELTWfKtVKYPzneO1K0ftsOERoVZBqdiKId2xE2AIS7LElSYQSUxdrS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52116014)(7416014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RoiObshygGhjiKFYlrtFaVmXNsC9mSMWtCYccZgLkhriHk9PI2YeuO5RzryBeBFSbeTOwjotFmXY3eiqYEcNa9YUqZyS6vD0nk6+g3Joeu/8bd9Ai8ie2iv+KqXtZu6FJ9OASuri3VOgPZc6qpgFmJ54bOU78Whz2CfyGzkQSkiOHgRGxNSCMHCspkr0t71jrvwmX20GO5Q80PVWiGPUilwF2DWw2W3skryKRUzXIXRrmYUvxHWUciX7k8dAG5h/eLrDsWQemK7zjuM/sjRTAHzrk3YwqX66E9Jv2iH6a7YwN5LtNEX7w+0FZhkwJJTUc/9G+XJggOMkn0aPBIKK1c2VcozsOUcqc09prdIZjT6tMvt0ACyvtKxczuGyLYnHmeVPVV/85eDM552jU2K7uXqXYanZocjPSgUxj9BHt2ihonIEHCB9Y/w4z5rTkycYcd6FRy54XHEDc0vpQ9FmSJ6bHMSez6AMp47soWPvYb4RMBkBPPv7j6c2E2RBreVnKtW54EWmpx1t7DkSrAZessruoUjJhjzHNXec85LqQJoRuNNptp/oTABW+J5dxqtUiiCFByNxm+3eB375xY1VX9qHUDWl5GxsvBZThEiJAPueux4MwdTTjZKQT3wepXihLTF6arHUovBCxGcqXykbUQPqepCCDxTJvzd21xKuCaeJAuHir/TerrKj0KpFw/xT2CagIUL0bdx8tdfaGJZ0RV1PmgJLZKPbaDun2FVVwRSmgYQvPf+3saMfVug8D2Ki3XuExRfhpulCxRx1VqJT96GyoqiJlSiJwpwvG/8vMH5COuasp2qCjXdspXH2l7BtsBV1Gw+1h/WdxWCPhMTy8Osa4xkBvq1CgdqFN0gLARoVeMcakR6AQ6F26I0+gZfYTH2OnIH71R0kzOZkyz/GT4Suou03/PK7e5kDFidkxCMNMO35tv82/u8henlwQwhANikuXgCWcdo91vMqpUtCx8+ATTXHcEqY0OkAJNbU2z+SKdQ/vEnPm07hivL8v+GzBn2Yh2gQ7UQCk6Ms1wv0V0twIIj8MWaIwWXivnt8Ge9E3LnirwA1VbDrlo8R62pWwVZS2d6HLeD62aNnng2NYSADo0wfaV2KDoxUtoFfjmgv6Tv3+2J4cMaBOeI1uE7TSo7RYyLuqwb98GIhXw38mG7iuR77jP2t5CQCeA/Btn1MK7O1n1rS9Ia1pBnVhD+QkJRmvvlVudrF6nAJPlqPGTZRrsK9F1uawtn+Dd8falPxReBOyVTx7vLStMr6HPBZagS0u9E6tEzPfjdUUxe2oMI1FaPEBTa4rTc5e6DsTBql8PtWLdw+pdiqSZA3GJ+1UsoBjOSF89C1ng9khNMM1eQVNEw99Z8gbxn2Rq5rVPKFXeHBH5VnD52CQfK4zfboDsDZg9jCTsSATp9XfGne87e1s/skYFlN0w9qDsWLtvs6J9gkHO09mn5+hj5JDWC9Dw+8eRkbogJIGjlTC9RURIt8qIncOFpiZmgyosXWcKW+2u2GD4ADvq6wzdWN22lfTt05h+D61Iw3Jgpv+/g4AByI53rVDaY8Z6WP3ZIgejprd/S1Nq49GnYemC5OTfZn+/h+N35P6MsONWhCE6tN7Q1LKnAhI5r2F3v+PX0V6n4= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: b4b5d8b3-f0a2-454f-120d-08dc99761599 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2024 02:32:42.8261 (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: 3ZIaKOSk9LS822DFhTXzvCh/VgYOTSlpu89amdIMvlflFDla7VIjmOyEpgUQ3l+Tfd4vNJBkfMT8k7qNytLYIuz3kbBaER2XxlE4uPd3OL2hvfYFmo/8yU+/XYZdd8q2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB9730 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240630_193252_636197_1D3917BB X-CRM114-Status: GOOD ( 11.64 ) 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 --- .../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 5ac149cf3647..60b6d922d764 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 73445f33d26b..e97abe3e35af 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 Mon Jul 1 02:32:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13717507 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 2394FC27C4F for ; Mon, 1 Jul 2024 02:33:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date: Content-Type:References:In-Reply-To:To:Subject:From:Message-ID:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9j3NpXbcZa2ngsRcLst0L0Ff9XISFwF0hb2TrGyyJro=; b=AE9S+hqu3IoKnJ4DZ3IoZcwarw lDhjqcllKMLd4DBHn6P0WplWt235cK55YVNamYhJpXP+u7MnE9dIiUrjBpHwxf/4PiRHxkBS7aKf4 dlBq3on88U+DS8zXbuiHqcmWux/ivX+lCaqucBHjaYLmZfoUYIzY/9VKaJTfhVvSZWrK/phDmAEv4 P25d+H13HyEtM22Tmnem0OagMyDVxZE5MGlkxn5iHDi/6QIyMRC01NC9zYAWDPEOd7LuLERoKAauL J9YsPMY59PcJ99RFGxsck2PdIcvc97qxcXDvmnP5z599cDeyT5kLH7xlbO3KVR/YSpZrUDkUBJEdm RucUH6rQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sO6rJ-00000001U1K-3xAr; Mon, 01 Jul 2024 02:33:38 +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 1sO6qc-00000001Tm5-0kHu; Mon, 01 Jul 2024 02:32:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cwmOQso3Mkccxy6/X7ycww7qir6d4yS/KFhtinnimbiyoUCYV/wwfmlhWMO9vx4xR3tADg5ba+6SJNWnjCqM4stie6zycifTC+p+LERxVxnJoYmBS7/sYv9Tc6yMWVjVF2xeEGcYRZEQmuPUXAuMVSjZM7K84t6OSP8AL0d4d0J8y+13sslkvcUhGkS2lnKCbO/r9p2A8YCYfN671Nv+YIfd0gPYoUPS1VOEU4BjWxDg1ZiDC3tEzjH5EdGHy/Jiirgj+1wFMEm68u1byF5d49IptvHI+mMLYGP+ELy4OxbTVUkQMy4Md1EXtOemg4x5NF0f/6ZFg7+NifEKEBNaNg== 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=9j3NpXbcZa2ngsRcLst0L0Ff9XISFwF0hb2TrGyyJro=; b=apPl4xpJsJntNvC/O5yLr4HEoFMbJ/XV9dkMUZzx8HpZZjYtQmF6JDPE4+RD8ClWHwuF7++Wf36ExYM8BkmeIe33utqdGAJUCBfGaCX2vfc9bLRNetNEHmclHTwf2/fBVVftV4ZuwvQUr65aUHcTaZeXapjSh6LNWpEuFd5dFVbUidXqAiR/1gBLJiG8k4vhn+IYVQVAb/Ivkc/y0i4vN3mTEsDaMcSCDamIhwx3H33FFjK3NqRflrRnk47LMBqPhUeOm1QsCF8UAWZuaHkdqaWD1oBh8fB85H0iA7bhNsjwoBCMXNlkePXh0DsyPSFuLU2moD48uBgJSRoTcavHXw== 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=9j3NpXbcZa2ngsRcLst0L0Ff9XISFwF0hb2TrGyyJro=; b=htcsHxVWO/fIFaMjaDP01H6NE2zZUlg3AzDsK5PrI6zQIyKL28SfJrBW1BPlCf2eKOZMiAJMqK28iH42veJvkraBTCpzRVkH9mQ/0/DfI5in2gqzvhdZLQlT/+uNjA+X8nvJgXGHFPCQ+P0Wvrfz6Ys71oiW0x/VEseW0Ck/nZc= 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 TY3PR01MB9730.jpnprd01.prod.outlook.com (2603:1096:400:22e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.29; Mon, 1 Jul 2024 02:32:50 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7719.029; Mon, 1 Jul 2024 02:32:50 +0000 Message-ID: <875xtp96zy.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 5/7] media: platform: ti: use for_each_endpoint_of_node() To: "Lad, Prabhakar" , Alexander Shishkin , Alexandre Belloni , Alexey Brodkin , Claudiu Beznea , Daniel Vetter , David Airlie , Dmitry Baryshkov , Eugen Hristev , Florian Fainelli , Greg Kroah-Hartman , Laurent Pinchart , Maarten Lankhorst , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Neil Armstrong , Nicolas Ferre , Suzuki K Poulose , Thomas Zimmermann , Tomi Valkeinen , coresight@lists.linaro.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-staging@lists.linux.dev In-Reply-To: <87cynx971l.wl-kuninori.morimoto.gx@renesas.com> References: <87cynx971l.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 1 Jul 2024 02:32:49 +0000 X-ClientProxiedBy: TYCPR01CA0024.jpnprd01.prod.outlook.com (2603:1096:405::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_|TY3PR01MB9730:EE_ X-MS-Office365-Filtering-Correlation-Id: e2188268-3bbd-4408-40fa-08dc997619c4 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:13230040|376014|52116014|7416014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: givcfFCSGzYzKg0MW8BRR1EdxCLoNLMW9MiDkkrz7FZILZi4X7aOfN9fjZ09StrXSXuujS8clX635MiBUoOjJ03uL3hVUZi5tWs69OtEA5QRcf+LsNhIbYD6fjIHmwTVFXgiO87SLyihTcHobgdsULY1FVfLrqZ8xxvXeEH+p3aBqtwzGgrA9mxHhXaH+lOGOfcwFmNemKaCXhVa3E8iP4tSzBykIJCXf/44TekUj54D2c5hsfZFMVNZYJq7LczmtL7HFJelXAuHV9EBZyU1Cxa2x25Yen58aPnZ3R6G132tNyAo/a3QP4IMKle5WoEoF2txSfEuca5MREYGQ8kacaTxqGs/Bzr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lbrWSf/ZZT9wTmpsX05wjy8= 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:(13230040)(376014)(52116014)(7416014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XB7wU6OmI84dZANLDy/vNgPRdsXm6KMR03zOOEUUUN1T8fCZjnjm+L2MjV+C4twNLRTEggGZpO7dR3jHgrvmny8QkchvNv6W6892uqsWdkW+hzzAz/gq1enJOVBEy5j0CeRekCvqlBUOmygTky/1PUbB0SCV5oWmXGPOsrjCwGgVK2/xOJIft30REDnoIBfZi0XKFMWRAYSXfrgWz0Cs/Oqt57SwXpMzj5Un46EfhIG92l2rs69yC7huR1Z+HjCjq+4xccglNleW/gFO3DPcNlgS/w302NI5wAZS3xxp1AmmDBB6//aOjTBl8JD8gN8DC7hvJBfMZqYm6tHpwvY4b/b4TjSjX4QsMdFTPlcg4BWcdDXwjUUpuvvVX/Hx3aHdxexWpW5qauriV+fNapLY+llGHMpNWRvJ0ZLia1L/qRn1/9W/Euf+UVU8SUpA4eg7loUIGcwJD2Dvj8QxmOcoKqRB0E8oQlGZY+Yjaoj/bQN2+zefkE1Zjoa0sO5DGrgvyFfOTWyyapXbQCJCAkKPl/DVnoV0NMlvpZp8FgHNi7Z1GUp3UGaqUZ2hcg558UJKkOkd+MiqQbVKZPqnr8P6cnTB0tlAES03wQmi9FUMKJlzJTWrN4Mhx2XUZ1VNkOVWXcG1pUDFo3HTHq4U9hcAlIEoavx9blY6tOANTp5ZB2a1iWubBPmY/RUYaSdJ6TSLbUCHbjWzEVEjLkHSuQBVzXB2AbcgCA83vglkatTdyFBGlU101jlo9Bqc9E3IF3Qae2jlLQA2YIKlv/0y6EH965j78M6G8YkWZn2d/hezwf1Nwm5YXv1F+1Pmk6ra4sqoMth3b7TTnFlSCEPb9EPim6dkmUuOX1qCQqXxhmpOz+v1qqjyeeIe1kNkbDyZrRGtMlf4f0ty7vD9aLeuuQXHa7+a/sW5/quo337c9SB2por/LaJo+5yaI9xzSIapyMqKLEhqHKZGJbtWH2Spj6grT67tzIcW71tD6CidfM0QFIYV0O0QRksltNCuhmXiswuZpXR8/h82cgXPZKc6OwqHZfIQbau8Z/JTVffeno6qFQMXvtO9PMEExFSo2G3q8VOOwOWYJFfoJokX76UhLi8ABB5wtQ2YniweEY/LQ2c7GHF35MMiP9oXTWmbMOmYOqY5pQ/MloJUGoy0/wcJHvNDHrU89OtAli1B9wOycW+r3geK9a4bL+NvkzNKSaxIO6PWARB20tgVQFS6L9r5ydr1Smc4tWKB1Jr9ePtG7WDhrzhwIaSjBVutSmZJ/OONOgVJfnH8W+JMsYbDl+VUcgpmVoScRgW5Gyvn4oGDi1vdz08B+OUh3uD1893jYpVXc+8Pbn1HjSZiiamZhZ38sy4aU+anH9aqurvDzX5h6Xy+mTu6HQVmAIwn+biw+x8/ZImqv3g+ncZuvPF6rY0fRiz7DdasZBvjEFrdTri4JIRPzyGjY5i0H1Xn6ETQbLO1aabYcf/FtUCn8VCZiyQWRn3gmRuVCDF0qqm5iJuyj4i5PgOxg//Lrs3n5SgwGp4gXj+qOzd2oNdGEbhYaO5QC8W6ZErwpTUmOUNR1ClSaChRsYPYWIQ4FnFuuweOfTzntIoSXwhTg59ka5TBhdaSsWa1jlsSFHj6Injj04BdG+OPQdg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2188268-3bbd-4408-40fa-08dc997619c4 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2024 02:32:49.8572 (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: BnZDQ2/0DTfhbHYJWWVvtVQY7dAM+uEzgX+CGeDFUyjVD5a0YarB+0/PnF7Fv+ukge9gb0Bd9syrBUVzUHqnHGjFqap4GhV1pDcMEDT80hqwshh5SiqDXI22dWMv9Jcv X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB9730 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240630_193254_249130_B4AB5DC4 X-CRM114-Status: GOOD ( 14.15 ) 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 Reviewed-by: Prabhakar --- 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 77e12457d149..009ff68a2b43 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 c28794b6677b..16326437767f 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 Mon Jul 1 02:32:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13717509 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 8BFC2C3064D for ; Mon, 1 Jul 2024 02:34:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date: Content-Type:References:In-Reply-To:To:Subject:From:Message-ID:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EizFzsMXfbQm3/2Lb/FDIskE2XZqm0mVAacTe880PQ0=; b=Adf4uTeR6gtaPIMtiMkqcHtpxP cax9YNQZnSB5L4hu14WoQLAw1QtoVCkawqjjMIplV9Za19ubDutfSbmM/Mp3OvdiAUzas/HRkcBpJ wJ0KdO5QLgypvYlpUawPwpvlhgdt1Jn/BfQMnCRPRJluty7HRwzBqK/uGbSI7HbStjMPupdHpGuv2 Irji2qoezGOk5HM0kkj09Q8LGvvwRuoXCQnmsBEtmd6jkm9n/PUnGs6oPd6IYgi6H14iI8Qhkw3O9 U9USj0E1sY01ga227Kojm96M+tKtWnmGb5uPb3pdAXJW3Wr9TOYZup9K7trv4GYREW0aV902nihN2 a2InrjTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sO6rt-00000001UGL-1UYF; Mon, 01 Jul 2024 02:34:13 +0000 Received: from mail-os0jpn01on2062e.outbound.protection.outlook.com ([2a01:111:f403:201a::62e] helo=JPN01-OS0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sO6qm-00000001TqL-1uCp; Mon, 01 Jul 2024 02:33:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ebiKrYAEWxFASlBFsuzlmcXZNNWCMrrbQw7DXTuVMN+TmbJsTUyliSzrORcGOeYnYkgtILOZZEdw/XMwrl74TuqZk9BaSziy/p8SwXvY4ikQr35+4EoQig6T4j2FeXZ70TWepFjDeKY4x3fmQ1OtBJRGzpsW/GM7i7hsUNEGNoHKC4U1hmMb56J54+z2ffxIdtm7Xz9I/VwCslaSFaaTzA0tx8/yvY4Gx1KTHb0kTfhqADVs/iIGojhPhQQcueT7JcMWnobjZL4lAoGyeWSUPb5cG13IojmQUZB65FGm6Mjp4Pe74686a2Kk7JltqSN+LyvjUvN+W2VnCrDBG17Gbg== 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=EizFzsMXfbQm3/2Lb/FDIskE2XZqm0mVAacTe880PQ0=; b=mkRhnJqibcUd6vWBKWJRzWlT/Ly0Xnkt5K0S5WLo0JNMYBfwdQ0HCYXpujIp25T23OJC8RDclPt9kcqaxENS5JQ8V8LISjHQQGaBIHnzsZiOb45FxjtUdX7+2C0uWckXWfbVEYzW2IofZ6ijJa85pSbLW6/DVLae2HU9WUqJr/nVKKmqH+1aSKdKFU9xKBT12Rp3VrAvB9t26se94KGPGa/hjmUzdK51Vq3efcL5pkMed0gbTpJKklchi8ETECow3IVuQRicp7hFaeEV/8hLr6HEQqQjtLTGVRMLSggYuvb0ehk7TM4hB3IKaTk4uWebfJidUBxh3q8OHXgDM0fYgA== 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=EizFzsMXfbQm3/2Lb/FDIskE2XZqm0mVAacTe880PQ0=; b=F6G95ptW6F7U68hg22+Ew8KoEpcPoLjv/x4Yo5M4Hzw4d/2jNlhIfQUfJZS9E6CmKutqmRM6ysb7CWzHadC8l+W8Zt3wndEEjlrKh4pDwNtQNDUsN9UluCiS53ZcATv6Xx4przRF8i16813+blHhI3AhYTPgAQ6i7Ug6wNm51eo= 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 TYCPR01MB6704.jpnprd01.prod.outlook.com (2603:1096:400:9f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.32; Mon, 1 Jul 2024 02:32:55 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7719.029; Mon, 1 Jul 2024 02:32:55 +0000 Message-ID: <874j9996zs.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 6/7] media: platform: xilinx: use for_each_endpoint_of_node() To: "Lad, Prabhakar" , Alexander Shishkin , Alexandre Belloni , Alexey Brodkin , Claudiu Beznea , Daniel Vetter , David Airlie , Dmitry Baryshkov , Eugen Hristev , Florian Fainelli , Greg Kroah-Hartman , Laurent Pinchart , Maarten Lankhorst , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Neil Armstrong , Nicolas Ferre , Suzuki K Poulose , Thomas Zimmermann , Tomi Valkeinen , coresight@lists.linaro.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-staging@lists.linux.dev In-Reply-To: <87cynx971l.wl-kuninori.morimoto.gx@renesas.com> References: <87cynx971l.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 1 Jul 2024 02:32:55 +0000 X-ClientProxiedBy: TYAPR04CA0023.apcprd04.prod.outlook.com (2603:1096:404:15::35) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB6704:EE_ X-MS-Office365-Filtering-Correlation-Id: 7cc68beb-1644-4f31-2218-08dc99761d48 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:13230040|1800799024|366016|376014|7416014|52116014|38350700014|921020; X-Microsoft-Antispam-Message-Info: Jik6/g3BrnM/eChqqIJ4btqWtMkY5t4/7gAgoWn/ABMyOLn+h1h1x5s4ZyjBGu+5a1SWau1HvkiOx7Lla8M1k0YRc5sssU6KVVBaZSWm/Ubmcs1pD7M5JRirIUeUE+GToq/Ieh38XnqjnBkySxy88Gpr111fnViBaGUFnBeTZMFu7pjTSr2oUwjaadNJEHsoA3BlSFZ929uMBoWHNMobg/eB7FJjfrt1q1FYYs7qshn26oARr5Ov+UjzffMPLziYD19nu8P2dQpGmh/UtZ3/82PD/c8/g3vsRPbEjG7ZNq9DZb9uFKb3ZOAOAeMa7PIqIzu6fkMwR5loV1ZyqWny5FQDyWCKiquGIAcTYL5DmZqaBRWn2aCKam2c1+I5H3UhzzhL0LIqIvrK1M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-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:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: C94I2FmY2raftHtrXTHSVKsSoqUg9mD3Tgr3YeJgkbJ9QUkIUR1CTmYgOOp9vXHhslM+lIsBxJSvHR4R0apSvzTCefVnv80pwl76gmZ8nM+ORGP3Mmo3HwFeDG0j4RAFkz8QCW6B/9dHM3J+pUBO4KsUYaaiitN5Ph9nwbqTn83QjbwqkLl9J8b9k1Rm5MD4/OlXqHsRVYxkutzMUqZQ3nEdRaDsYPEqTVjwp4TWXyFoabaO2OLJHih0TrJ6Nk6niqSqozv2TtB9AeKj6bP9Qyvig8ovHepQJurrkkoXCnbKJ/E3uqjwR6RkxafK8V4ZKLjAE2jKi0CX7yiR3aIWDwIVRKFH1m85KEcrSNpDohtggqZFYYIO2T/WZYBp1ZP/6iKAmXUOZtR/zOsNtLrSJrarcaomjK6u69MuLhV1H9jgOo4C2S/E1vc5jLDsZ6M8z5bvsG7sixkvL7unD5NF1oBJcQrEyQhcWykvdOYiZ4LAx8DQtoMLiopTM+PZ6c5Faa+2xleYv0tPToBeLLnBTirEsJQpbArdgzdSTmtQpvgV87TpWHkUx2qmEH5xm0gSdB0hF8JoqM0zNvo4URtTI46ocJqYXVZx+sWBhdPDxZppLoNBwUe4M53jf0Q2vO/RDeigzvpcu881gwrNvkMrpS4CIzf6Hbm4RFE8M6R7nvg3rMl8u+db4rrpQYQBSJqKP6Kh0F2r/jEaucDSE9To1mhTRXtrbLpTrJZr4ojc07HWNUk16T2OcYIYfxqPXlmoYp5/96M3LmR2F/eqW3Uk0dWrQ4np7WJBvViBEz2nXJIq/IcZHx6ggYahbsDy3c/bASB//bT8ykklelGxJ1ixMlMc8cAatFEdavOhOVJyRoSZJbX8KyWZq6Lglzf6N9kNhgbIOOFvO5cfYwaR8qILNuzFDOU08XrJTC6K2jqEcHvb1lS+pSpigavSKtK6vaVbLpgDNbpCFcSpCnRIV1Ky3EpgUmQVLMZCu9zoWeHHo+ssIHcBEQBEnLUVnvZ+wnjn8gb4O/5IcfZY0NkuBydUM1KleuGW0U94yNbcLcOVKvfSWfsxQA4aaBux0tD/CznPJPSAI9iTM93hhn2xzWNcOCQa27CuM7ZjGHyDzSY3a+Mg4bPZmnczkE6UjJmAK1NyOMwM6JsNdiF+u5sT72BNa44NvVj+O2HRCUi2pFFw2/SG68GHuqDacG1GxtgvD7P1/t8OI2TyitT63ozOcu8O/YbmpnCNLvmZ0o2mGyzQb85NXkyVJBW8OcD2mAVggmc7SYvf/MizrI8qlkX72Cj2EkHP+kbVaZC9BxM2j4hezIRJDf/jlyl+r5raQhoduD895+mbOfSxqqj6jKeI8Fcext9Dgtv7AhwGuGXKTvurm+y6N5EhxiIO81anreXH+OIRSPoM3wUT2TejpX47FO46PbC90Vv9Oo4W0EfhyZomVF1EfudkycDlepzQs2/4dt6F7BhIqDMKyZRHLi5sN6OU+oDiV0hvHvSKNaJUkSF9+Idizt3X/3+dcwFUjcTPl1mAeHuPvZrIAWVxWFBS+/ripDZu8CK4I4tff225F+qBr5xa+ylYki4mCkBLi7PiSgpRwWqHD5IJDZdHd8UYI8FjnTMnTbnArPytfbsi6HqlQ4I= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7cc68beb-1644-4f31-2218-08dc99761d48 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2024 02:32:55.7071 (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: 4/spJ6PT47PjhrhWOgnS2y9w3qKvry55nIcImbl5IJauCmvp7qOigfnI1Y9TRvmy7Ii4ZRRE5652GJhyO+Rr0e3ISJhBkUj/O5Mm5N9MpVLk2MibUi55UY57BhAxny1h X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB6704 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240630_193304_537885_361086C8 X-CRM114-Status: UNSURE ( 9.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org We already have for_each_endpoint_of_node(), don't use of_graph_get_next_endpoint() directly. Replace it. Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart --- drivers/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 996684a73038..bfe48cc0ab52 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 Mon Jul 1 02:33:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13717508 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 80FBBC27C4F for ; Mon, 1 Jul 2024 02:34:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date: Content-Type:References:In-Reply-To:To:Subject:From:Message-ID:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=aYlWh8XuVZYCFYjBwCC4koBvO8Vel+UdsPWmd3H5cvw=; b=4F2p+taKQbt5x5c5RJQTvAV6xx OARxX41XqVa8vRIpoYogSZLyJjUAUy37OicbS6LBwYxPqu9W2ucuoiye2brZPPvTfhJIz9QiJkP3L H7ERKttvGHXlfL5rgEbYvKUtuZcYMvHbFhtadlndNOQd0nOFaixSv/i+8RXvVTAdYvcpK3P32PLGp 38UQQdzopq66K4iesP34fx6LIZkmrcOMUZSNzdApxj5EhWgZsLkhkT1J3uA22hIrhzUJ4dlDYnOcl /DQeTm4wK5o3RzKbftCV+lyPEeoqK1ZIOQb3KSU4knsrMnnwOsZUV0FspIiZdBm8pl/SwZOgv2P4w A/39p17w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sO6rl-00000001UDM-1UWw; Mon, 01 Jul 2024 02:34:05 +0000 Received: from mail-japaneastazlp170100001.outbound.protection.outlook.com ([2a01:111:f403:c405::1] helo=TY3P286CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sO6qm-00000001TqX-36pI; Mon, 01 Jul 2024 02:33:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HTC/3HPdk8zIT2LRv24y/0cIsr6Ph6rdKYsKosdHDN+FqBhk6sV1TEiGZY9KbsTDEzepjYaiyPlCuOLUV6sQ1gbrrweYKp/rZJnp8LPgh6OzbMCvpNrjz5IuavBFvjoGF5/lzGT+8kFU+qbC2RN1cxm5XiHpn2pE8zMz/z4hAjmnXuCNJ+mymN3gpV7GB+fuHb/1JceCi91CeEbypi05c8/4m0mRfFYByMvH3vIjCI9UkM8dgJsQ/UtX7BkcxEYfhOrMlNBfTbJM9c0L63FjIZA7YZQZqCkHctxiDv3QqRFcJ6sYMv/WVLfuxiJtlJLp9H5zr0D1Y8jGOA6VJwAR4A== 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=aYlWh8XuVZYCFYjBwCC4koBvO8Vel+UdsPWmd3H5cvw=; b=h4eXc5Zm5HL26tyq2rUzy4nDZkGDCqhYJr3OAdKBdFn7/+um0+aHWCl4cyWe7uNm8uzFv0HaX0TqY4Bfm0A7f6Ke9JnP97/civctw2o4UzaKLK739XxS0DU+8N/Obp49ov+RfnDJ0jN0j/s+8/P2a3JB8kNDPhm26AI/IWpG/uKgbNPAyuFWq3S/oGPVm5+4RIxCccZHoK55V7z3bcAX4qQtpbsWeOt5YjEd4YMAWVqLotGAb2i6ZtHqieHbMR/rom3sNIMPQ0lhSBL4Sh78Gv++HqJsYdpRKdZkUsUj/xrZqqPKuF7nkjtHUeIfWsSx4qkLL3EUGgYbCy2hJ6XOVA== 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=aYlWh8XuVZYCFYjBwCC4koBvO8Vel+UdsPWmd3H5cvw=; b=mmO0EgDRv5NkjtO1CgpL6xhJ9QU2Cwl2dHOZAI/1AkRthy2yV2PPoHOCat8nL2hbYYjpvocj30Cfye1psoDFU/+FDwSUfm/Es6ELWBhQx8x9bfyZ1m7pdbmdkzv+sO1DQfWgjAHK691YL2e8gJENxEJn8H1feW5qMEabxoPxNAQ= 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 TYCPR01MB9627.jpnprd01.prod.outlook.com (2603:1096:400:193::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.32; Mon, 1 Jul 2024 02:33:02 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7719.029; Mon, 1 Jul 2024 02:33:02 +0000 Message-ID: <8734ot96zm.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 7/7] staging: media: atmel: use for_each_endpoint_of_node() To: "Lad, Prabhakar" , Alexander Shishkin , Alexandre Belloni , Alexey Brodkin , Claudiu Beznea , Daniel Vetter , David Airlie , Dmitry Baryshkov , Eugen Hristev , Florian Fainelli , Greg Kroah-Hartman , Laurent Pinchart , Maarten Lankhorst , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Neil Armstrong , Nicolas Ferre , Suzuki K Poulose , Thomas Zimmermann , Tomi Valkeinen , coresight@lists.linaro.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-staging@lists.linux.dev In-Reply-To: <87cynx971l.wl-kuninori.morimoto.gx@renesas.com> References: <87cynx971l.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 1 Jul 2024 02:33:01 +0000 X-ClientProxiedBy: TYCP286CA0273.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c9::12) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB9627:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f3c7cc2-c06e-4188-fbf9-08dc9976211f 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:13230040|7416014|376014|52116014|1800799024|366016|38350700014|921020; X-Microsoft-Antispam-Message-Info: pNLFiJvCXBXpjqm17PW8aY2twQKL3xwh0GhcYANJn12IrHYPrgn8yq0wEXkduyTz1lK0W5+PO3pCfz5ZGsxx3e11HWKEWIrWDLVlYEAG+8sG7gFEPMIqfLkG88GZvxid0ORBgbuHrawzc/Ug06b4MYrAONEiYnYDujgm2ZUjhHy6/zG1Dr+9r6Dfx+VnueF1McA3R1P7RLyd9bYVO0kuye2RE/7GV1y4er5U1vOwzsXRZjJj1Flfa54eO/8JjhbQeLUuk5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6cQEN0f9or/AbR7Fy4P6jKjpptDsucF3/s4Tz6sIZU84Iiy1qrhQLnGP2Nqo/wHkRSN+Wlq1CERSUSaSBBVAeb/UoEQ11ib0Yws2To= 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:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6Vshg3wpGVocDqn1lc8e55k/yIxnkA4rYKKwP4uHl7luu2D0QwbQ9keAsA3rDpPw61fNf7t/1EWfcKnXGpHPHKIlHo3UFL9Zfs7RxB8wXU4B8pidYOfa6HHjHx/IsdP+QPQ2er/bnO0DJ4CoEnGBcyFqkjnqj2AhNGIift0ZFOU9yHCIZjHKdL+er9jVdsQOcQ1XvR5H7QD8ZgSrMVE6AhdpjEluPIXPn/z2gqFvcyKvv5Fq9DDJxeLwmLdbfWCg2MzJQWSKGEShwYamvDBXYMajt5Hp3S/ZWxm6MvQ326Ec/q5nBDBhfWQBEgospbCtC7g0qYhsiS3k9Mjz7TYl5asGfFYNXRuFTGPXVB4BLMHYlfFhtQi1mNa2MIPPL8BQxM79qxXiXxsG7fOScLl6wHg3OEVFHjcseq5DNEwZhaIaqTDygaPqLu/mhMAJtHmqw3JZb3j+Hy/R3x7ADnbPxymUy8CKSXh4Asp0fKpHu4iruso15nmg7PWPBMkLAWo7800BaBjdhF4Tdg+/3DmNBAqCmoso3WCPzH5TUbmWoX2Py2lYite7+WTTW7c2n3nC00rnHzQac7wyZl8ij+ocYuTJfqCNQ5uy31xIbgIfATZRvGQ882EqZ2LF0WCXbjArZ9kC5KLI3aNHaM3FbXqQg6zoLKYHy9ABonId6yVvu31349lJt5OMX5n/QYkQWIQd/VDea+6j2pu/swrB9qMP7//y0nAxTzWk3PxVHdZ8TI4sZAyd+mVmkSQd0lgQVodJUPKgKY0xDzSCL27AyVBO3WcL5CWmFCZPKiceTUWYKLaxds72VixjrDo6R0rlYsnxPp8DlYj/2mkqPgVi4A690j+P59nqwudOsLr0r/43Q61gwtuCM+MIXvS7kaOempNETre/xNtfcM1nsJ7jQyLO2k1mRfMbFBeil1nVipp++vV0GLItogqH3Cqq/tz0VqK/stvWKw8Fz0PDFZZ5GwxvfctUDHYy2iWO7/xaw++ThZYwrd5FjsjY1B9ZnVxaDQNRS/FMwzNC5NmnJysH1xJ3FQygOXCOvTm1Ar8OAkiM6jk8awPcHD5HMTY+w7MfN10chLsotkvYil8ZD6Vku6SfSqK56UTQ/ulOfxhW7Gs9zQdwlAEb++VqlUXm2uX9mPiPS/52K2eIEXJwm2ad3Rz61xfVlu+WBmZjMHOyIF0c6EpXInDAtwP8qvvGa6n+hYoSaIfyepHtLx/dxrbnb1ryLnDoiO2Wl2MNH7g87itLhyEgY2nYSAj1TW9EfktQrQkpdncqg0fAdVtGSn9EHQ2PE37WQHIZRaK2jIRDW5pWSnPeLqtzUfyrrb8zZER1POourzXMBHZrZmAmeTBsQE/5PQCms7QDLw/7me+ixAK/fsfXskbkyAv3TblEKpKcoAgGgBJrqkUR2YU+kzW2MEks7pcemk5HysNyHW6b+Z8ZqlTCvufhb9G2QAvToCTemFHrJ+kq2PzdkHfnBradgS2B30LlfMjDA3+PIajUT3P9smPDpvSZznDJGFrXTZyLjSTt3gLLCDYh2Cab0c6azrYBLgHzTOzE7WeYx9hFJZVSEpC4Y5kAfwkQRK/E6L3DdJxx/+BSayhqBeL7kTN3MsNooDQGCYnJ39iDwRE2rC3qQF0= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f3c7cc2-c06e-4188-fbf9-08dc9976211f X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2024 02:33:02.1639 (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: tlD9pWhWIDxlG85C4uL7eazSC1qwRvXnWfnPhPQ7CPwfDkH3qNtgqAoMUYGzV/mgOPhAt4F22RFA6tA/0MX4kyN9/mdFO6cJveywJKi1G0NYcF85XSb6+w/AuZuPalfO X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9627 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240630_193304_826139_4D1E2F1B X-CRM114-Status: GOOD ( 10.26 ) 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 | 10 +++------- .../staging/media/deprecated/atmel/atmel-sama7g5-isc.c | 10 +++------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c b/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c index 31b2b48085c5..712f916f0935 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; + int ret = -EINVAL; INIT_LIST_HEAD(&isc->subdev_entities); - while (1) { + for_each_endpoint_of_node(np, epn) { struct v4l2_fwnode_endpoint v4l2_epn = { .bus_type = 0 }; - epn = of_graph_get_next_endpoint(np, epn); - if (!epn) - return 0; - ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(epn), &v4l2_epn); if (ret) { diff --git a/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c b/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c index 020034f631f5..9485167d5b7d 100644 --- a/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c +++ b/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c @@ -316,23 +316,19 @@ 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; + int ret = -EINVAL; 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; - ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(epn), &v4l2_epn); if (ret) {