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: 13717496 Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazon11010054.outbound.protection.outlook.com [52.101.229.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA033C144 for ; Mon, 1 Jul 2024 02:32:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.229.54 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719801143; cv=fail; b=Y7TJmco4BjhOCNQ+JV40xknPi3aG0alyAtXuQCwdp1CEMO5lBkCAHfNh6GSWKYnEju1vCWeVIZsB29rMHW9kZuDHsvejPCPS4D1Y1AVJo/ab870W3RhYNfVJBCnD7jhRWJFzdVeGHaG7WgzCuAvtb4uW2XIISconVIUhWpwKRj0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719801143; c=relaxed/simple; bh=WEITcrQ/kWE3HqZ0RI5jkI+3IbvSu0kSuhHWQYwp0Nc=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=qshKLTFTQIURMK0Lox/Ns9W3md2TVjf4SNBnIS+0g63wvFp+GjNXn6GYrPH5ptkEX7/7ZT8w2Ct1IlpyppSYGqlprvdSEp9npVEPTN5owRTaQZH0hkAuZpIyWxGQ5ak90+FvRmz/vesBiQuJeDGjTn0IUD0RBQFkH7MgMFm8QJE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=WqCw+t3h; arc=fail smtp.client-ip=52.101.229.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="WqCw+t3h" 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) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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+/eOKPoKVyLHP1vndujE6I7TxGZFvMpPAEcMr2IlKxvS5bwq0TJGKTI9dbXbT3GYl5deIa95lHFnxRG0eFz8rsGZeFrXcxorc0XwgqZVSoWAAKQATYqMEUAxGS64xQ9Ij25K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dbALoj0s1QRWF2f/ 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 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: 13717497 Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazon11010019.outbound.protection.outlook.com [52.101.229.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB213BA39 for ; Mon, 1 Jul 2024 02:32:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.229.19 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719801153; cv=fail; b=eLpB9EO1WY+ov4vAqrVe3NA/+bxSEV+LBAbMPLsCjtrFSH7xwOiavymg8izwOhFk7QHcZWSJslu9MDGKv6FSh3kxbqz96XMBU3KJJ2pCyF4HzwLccL0Czs6cexq9wDbeNX6DSZZod8KFKAAefOrUlrsmY7JH9V1i3ztuQGklP44= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719801153; c=relaxed/simple; bh=BVjixz43izktijw88kmboWloZI0iIlR3zQQ+wf6Qcyo=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=ojnfmz7owLeHX6GjLCe8fLIzgOSokjJ43tXW4Uyoi/AqYvVuGFBL6mdMatwouFmbbLUjaMCy3+XabpcE2rebnzTPLiC5WUf/31yvt1API87iclAjz+RnqnY/FgRLmiYcT7eMqKvUnGW2mHunJL659eyrhqqo2ob0kaiSMDtGi+I= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=PJn9yCj6; arc=fail smtp.client-ip=52.101.229.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="PJn9yCj6" 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) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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+bS41VScDYArYZmlktvB0wrPfCee2GXwfTYtpE9+8JZgCHNRvilZvYVnuBT4eNkowNVvnvSi5T2kkxKJyX94QGL9Gp1w4TLDY0wXT8+o7X0B/ZK+Un0wcKnw2P1p6/TTI4Dd9n1EizrpNgNZ94nsEJfWrGu/s98yu2kr+3NTyY4mzGzGghf53mcJjPfiTLzZZdifi5zwrUuuxWJyxa18FO7YEyjAnyOx7eAFKw1+gWsaK7RXBrSvt2MkmLAB5vOldEHk40SEx59rrkL+6+us19umP8GuOKene+s6b5tZ5+dCCBizDhqbkaJwbiKB5MrQ83/RiM3xDgJP0hhCqmheFLPz37I88tPMIgAIgjkDpfmoeMT+16jBmUpmN+M7kbmbzsuSQUY66OheHjFFsI6a8QPpYzgj6v2UbPC/ynJ8MQUMUlHcvhN/WNicdG0Si7WL+JtWN2EU1tMF0OQr4Qi+yfjDmGD2lnRW+z+JcRDEpZ68YFCWKjv5bg4ldi8O0u10JMkYq4xDN3Ms5ni3U0hHZGCzVu76PMmz7rYM+WPSbIJKnxB/XMKgnM+zWogsFGUPM2i8C5OQ15frDFrPUBcJMQLjQhko+zXh3Peh9q4LAXVVwyViD4Ozfymgb+Qa9SYaOwFxfPEjITZP+cCSHXAjEYS9MMomnt8zxMUyiuw8qIHlyQ8/J5kwdzJ0XQY266xLU3mJ+9KcKFUCLWxKjy0YzOnNTc20IcNZeJ3jeJEAOeXKX24FZFbjxwJz0kFNKsVzngYZVSKv1Qc93RnQ0VQB6vs9quXBcovNZvlamG7UW6bcbQTt1rCRHxyHp2ZvnfoeIdR3xUXzzy+mBmQtRxzflYCPugIC7/cbuIfYvnMJyc0d3FHkJib+ovc4yocxa/FfW4WtIThPtCGWP37ASVR2FCpiC6uVUaKExDAeBa5ix5yDV9KkDicC0nkllZRJqaZdkbE5H6KrXKrgbkTp+WDTIA0FLyYgLsYzti3sWXYihYIg5jFHbhofumFKKQVXDERW4Jlc= 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: SZEAeq87b6UMmxlkQ2+fLKFdeznc9q5MFAKDfRoZz64axSUdoIG76wWEBqkBu2FDevHf6Lltl8ZfqeSb/uNZ1vNOY4zdnAMHyJa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HhvbYxfm6ki2bJhwIByG+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 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: 13717498 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2077.outbound.protection.outlook.com [40.107.113.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A94AFBA20 for ; Mon, 1 Jul 2024 02:32:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719801161; cv=fail; b=Pfhbs3dGb5JbqmuWl6WpQyDnUqF0aCCbJRCYSF9ylEG6CSdhejarkzqoNvjub1SszEkZKgcIsEzOg3/2pL5H46TQdiyMIpsOK3IzzNsE7tkmMFk6CwV45GiU/WeBQRiYD3QNoRg66nnoEirfGhXAaC+oIV7+Ik6WejuXZnoK6Go= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719801161; c=relaxed/simple; bh=mKKNx7bUitwUHJLTA8oNcX0ITZdLRKs6naMosZemhFU=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=Cbn3Chdvc409g8GQxQ3gD0F6nmjjnNchmZgdbL4c7juzEUhHh2JNnFasL9Jq1wEaGKhAH+z1JNHpSEVN5MGpI6U2StU2TJU8CTGnlUhZfG0OJCPecvcCP2A8Zygwws16qFNZPqaCVVJq5OMEvZv2+Obsw8Ly4HqgebK4k16FkqI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=e2Alh41v; arc=fail smtp.client-ip=40.107.113.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="e2Alh41v" 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) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: sSf5zA0FUm1hW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e3rsXSkpdW1ObWTEhm+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-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WI2tf8XxbDtMdXbxEmnraJobFIlYjKvMxnt9EwN8RT6wO3NrZ0AgU+/Qd9bl2Alx0Udp/wlSD09VZ9hYvPL7DlAJkDc1KzgpJcHoH9fLLEtZY2Fdz7iLBp7Ra2pwaeUR8i7E5j/RHErgk5omEWjCT+wASoH8L4dOf4cP+66QS/UGDNg/EhYfuCtngcC9lCS+mv4pZn1yIiM9PrFYZ3F7M2rYVMo+wwLxRNj+Hsb8ao+l2kSurWD1OSG59plyynU+DoJRvcCzGAn+Akf8/dst6/SI0JMddDiqxnwhMIV1a6FSvV/F3c3rG4Wu6QxGrGovUlQEKSxLQuOy8U+62ANLMeM6r0tC4NK8DaiTLBHl/5VF2KD7J1TsleDbOHGPCZi14cHTCHMa01qyiWeFF9miccJ0jsHfJTUTKcMrNRbyUJX1cRCq0FHZMiGnTxBzGdVSnQczIF/b/a0ays9SQ7IB4XcNd8veBYc7O5x0QrkGYaJk4n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oOkUiPZ5YHdin/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 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: 13717499 Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2044.outbound.protection.outlook.com [40.107.114.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A36CBA20 for ; Mon, 1 Jul 2024 02:32:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.44 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719801167; cv=fail; b=LvgkQr0e7B/GBGs5m8PIpoPy18AuBEXYVuSr7DrwDRZLusxz0i/PVfdOLmbI1JelgUSbNuSX3MMTMDeMulTwmEDhDRTlGHh0PuBec5kP1FmlVZw/eGAkKwrdZk5zPtyazVR2Q/OPJLhHQ09EB/d7D/g80cYUyHwrNoEAhsse+qU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719801167; c=relaxed/simple; bh=MruyyDoRCpS+H2JRsPOF74YJQ2xsUw6IOl/rBHpAACU=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=q/wM3bM8KcHJfY1cE7g+V1KSHuDb16H5p+C7bPMrtq9P0HPmEDL6SKK+OGRzHvaIVSWZr9AWM6c7HzJW2R3TW4ZxyFH80F5aRHvmMZgHkYZx6FmZtSHfqcdRcdophWrr6sqJ/pNIruJoI4dDDUtG3i3VQYUjarhqYqKxMhTyuhE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=CVFkWOKU; arc=fail smtp.client-ip=40.107.114.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="CVFkWOKU" 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) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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/+DgGMrCIoO3ZPJW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5A916g7QjKOc+eVdSn98G9Wsv1CB3LBY5Vaz6PHSOOfzbCoBjx0AILdfJ1DA7TbtU/FWCMVIiIFnoPeDU48cozC0gwvANg5GOes7hgwrkB6LrIZsR/jwRoNi5n/K4DAgvf4+PiFU2LSpCsU= 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: 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 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: 13717500 Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2088.outbound.protection.outlook.com [40.107.114.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35E566FBF for ; Mon, 1 Jul 2024 02:32:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719801175; cv=fail; b=LGQyW+YBKLWuawjMHIJvTSKgHL3+c7KH3mlhLrwMNEV7mySrpCOzOtvAWwMFo7mSyZMXO0CyYc/Te1/0Ul9G/X0heAm+4mKKrSx23BGL7de0lVTH0BIgo5Urss7fpJJH6nYOti+7F4Sci/RJAPzx6XbutNr5EHy1QG7/J1jhE2g= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719801175; c=relaxed/simple; bh=m9FodWOXtgcVpT0HqGUn9+GpLOpTJ9TepCsFbbDpLDA=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=H9ml3ClaBP4AWYv1djOhg8SL7G1oLnmG52k3hgfB+RuCuUmKm6E41SjkNWIYnMiU30Xvho+xjPpaYFNsdyfSaOsvHYrkjXxSsLbIUMaYRX6qYnJmfGVesx1o3v2RwkrPoTKeh6BpM7sYSnK7t4VWveTJo7p6EyUEGC+iXsQK7N8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=htcsHxVW; arc=fail smtp.client-ip=40.107.114.88 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="htcsHxVW" 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) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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/a3QP4IMKle5WoEoF2txSf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RSBPRSJxh69h0sOiuZ5nuXnlbrWSf/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 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: 13717501 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2056.outbound.protection.outlook.com [40.107.113.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3074C144 for ; Mon, 1 Jul 2024 02:33:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719801183; cv=fail; b=NzEA4mZeUlVFqJHmGxT3qKGS00YMpY7zAyv4uG2pnklRATng2VaY0HfnPSDlVKjO2fuLyimuZ9j2nrXbJ/BkYNBZiSwq/hPgedSC5sCCum3JrPG+UyRvbB78lFBgwoPygvQRH3MMDXxxCtYZrzWy75A2EEvDBD16qYTDPNpjQ6Q= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719801183; c=relaxed/simple; bh=DwLtoxNla6DkvikOOTVjb3y53SRtnptzaIjj6rURwoE=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=ZoP5IQkd3F8uHDpgXEW2sQV4HdP+tpAiOggEbTdcgw+Fql+b/JmnLTm3/iuGCWqcPa/RMPk61+A6Q3BrTZFZ4IbxaGtIHKC2u5W9gKCvHCzHggGCZtCvgRiUvvtemkR5LU9RfAD+eMi8Y8R5If7aLlh/XgFcpHFq/zgS0V9Wvd0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=F6G95ptW; arc=fail smtp.client-ip=40.107.113.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="F6G95ptW" 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) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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+I5H3UhzzhL0LIqIvrK1MJgcRVxYX/ABARCR6Z42bWCEaWZV0UPrTxg6VG3/2cvN89pNm6NUbXEejfqUMkmmMPZGRpn2OCqfIa+KLku85oLfHlBYiEjx4dEh+eXTHw9SmGXuzKMWTfLdfmfTjWFIOjfIFzqUEkhPak5t16XD6tc0Jan2Z5CsPopQlc2KOsMxx+8rfroX6tg1l2K/vA78L5ef26sS6+C0bpcKC3GIkcNRGT+KlYHWLIE80MKWTWnl2Bkb1TB06xpgmH9xr/AunzsAk3jBG1Dz+TnHjJPJ9rZLCB+yOQe5upcZYnK8EkZPOJZ6trwUP2Nspauue5kmqHn/vfAzq66hOnMdZwziBN9jtP7gvsA7VzLOfFnYOz9lyVs7imLPYmiF0pmU0vUsSyVfzZspKEoLVyMbgRpPLvTD/DFHGCrmT58vihBstUhbr2QfucyCpir4QY7rsCeXVY/Yq0tbbN94tjlDAIykOYOlAVqQdFZr3w0Xt9yHY3tJkBmCVh5EdBM2n0T/xhZmHnVUFuoIShmaZfC0UcCw6Pt6B5pwfZAWOBGR5TH67S4KrOLR6NRPi6/feNBnnSxyrVAzwPRk9xj3OEGWgqc3YHleTm/AVK/znYn0OdoOXGV6Yl4FhcbHdv9VOGB9qNrwmzhFWaAfSGCBRXmdlKnH0hkwqm9PNhilekumYZmJ1Tii7tUjsh6fTsQ0I1iIj8Kz0MRwZ6CrtsxQB9KdJXBf1HDkzIlEwiMw69nKvYHC5ri5xAIAVjn1FWZImwpFpGu9RagrpuQ5N3+F/Gb1V66UscZ2ru5mtH/USiAHiK28DHCFSuAy8tTscpnVwpwgHQQEkSisoUL7TSdrHqMwyBx8Xmmzz3Phmoo/myuJ+2I88+KMx4o4wrQUa3WN+8aDOlo+wCaCVXmz+t2BWoyuBjfck8mY+TvOEPTF7p9qRLEPj3/qsQ5bREokF+TJD60kVDsB0i7GQtmA3I9E5DHqQnjaf78djmd3I1O5DJm1cxRqdwyC5PIvlVffJhhJqkeQ4ybcxGt5bs+7dNqIz8VfgxWxSAa61jmaSw= 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-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: C94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vfSWfsxQA4aaBux0tD/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 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: 13717502 Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazon11010040.outbound.protection.outlook.com [52.101.229.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4982C144 for ; Mon, 1 Jul 2024 02:33:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.229.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719801186; cv=fail; b=dVgR/Ly2i9wHpvah7NMnYYSnxZFCbghD1rv5NPBc0sn21LRLtbLbNSJPzW28mkyUdxVL8iBQ1zxvJPeSWIQpsO/bELa2ibOx95N97g00sdOQq64pgl4biXI9oQB0RTWY2aOz4f//dBAiHoDm/ZfUKNbASDsmkX7uTuvy7hiXUNU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719801186; c=relaxed/simple; bh=BdnZXUfuXUf5qLwS8rvuNqFCgjIGH5e1g1U3vc/YJWo=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=JXOi0ZwtcAh91AzWlmx1N7dMANHktH8LXOwNhf72hPUrLrzVvvqk2awQtI59RlBrlLi3jiE/GbBHoZIOr3mGg9ZTGEA3zXzTpDkduKtAPDjxm9g0cQ8VaMmsZM/UyP85F966vsEQjg6/piKZkx1EkNZSK7Hu3k7qiiZbsJDiqb4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=mmO0EgDR; arc=fail smtp.client-ip=52.101.229.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="mmO0EgDR" 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) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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/8JjhbQeLUuk5EfQFiDQKZA12pPn23EJs3m9CgS5f1sJ84kTgsh/skfw5N+EW0xFAyfJo2jFxEFynFVM852RgKuDfZ7dOFUCLbDEfPB/GwYRdVQv5nutNWIoleihTKTw16zxJdoj99ZnvPAzlNNTBJqZwBWFB/ZTdme0gT32aHoLkdHz90w1+uC6C8Py11ZCHyJ0Ep/X/0RwihrxtptZ7lWXV9tr5L2Oa21MQiK430mIEch9wbDF7dHGdWDOqYGUK3bZQvdrN39duQcRxxouKlKMGnSPFApwp4J8QJSN4+Dy1O20c0vqEt1tIG3sc18TfSV4unZAqJDK0UKg7ZjDYFCUgcWwLYS5R+w9wCqsTmjw6EFOBYKxgQw600zc3GCZE5VDqhlM1YB5ttsSh0vceQgYrV0xoRExvDwYmENFyTEq9yerLr6tQklDyb6HCQGo6nZePbl+wRUfP/hJZtdeOokfeAk6LOQp+cB+mjb1Ys9alWcPtfNqY1pOUWa0QjV4R+hKteuaZ1S5DBQtAZPlemhp0PSS1grnUSeMfm78PsJc9JE25GD967S39TdJHNj0zOwn1QbxKG6naD6G0on1U9wU5GthIn3cVhz2PH7JtWAHhfBxrN9p2S7P4fXLgb/wNW60uFhmkP11Vzdh8SCw5l78fWfSv1sKgNBgjuEipKx2ttatpAe3UOfJ8pkbMYZ1ak9pAEZ4gYr9/tkV63yUr7/OZw6b68KB36XybbUK81g9QDorJ45ceOhJvhAVUqmol2JJ2qhGm9zGNGApZ3680QWn0Tz6nJOLu/uVQ8TtK4ASA8pyQ9P0nIIsgsI9Px62CpfWxeJJz7JiSO9rtfe2MzOdx34xds5lhgv8Y4OSDRo0IWyeFkGQcc4nytP0anA2KND9JwQPAGeR/yQYXEgoD4TYy6U368qgOf0h9Ly0mkSieMb9cMPRWY95jo72dwtU+5UBwqPTyh9DkptIffleJcvzBLuuWANBIrjNUB8VuVusU1TSu8qal0WdCSzfKUkympOQafsyR+1KG2I8VmIjQrFsiYG5412yz5opgcy4Jv5+fMOwwFnaHTYG6tLv4aAqKNnZYSYYK5YA6cQEN0f9or/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/bnO0DJ4CoEnGBcyF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Lx/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 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) {