From patchwork Mon Aug 26 02:43:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 822522 Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazon11010029.outbound.protection.outlook.com [52.101.229.29]) (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 B1039C153; Mon, 26 Aug 2024 02:43:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.229.29 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724640218; cv=fail; b=mGASpcJFWFmt5u74EXvM+bUb1Dvuy9cm8nEx3CMEq4hfSV4WcuUT52xqDyv2aBShW2Qldss5z3/OVtpkXPQlpVbYyHJycFDl3YuVAleHi2nxj849Gi01M+9A3bXkv/mtU7J1jZpqODxbrsfC+9TPphZjJDQD+BkFSLJnIA2JWhY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724640218; c=relaxed/simple; bh=aAwd//EGarJKeiyaWBp2ckG6h9b2atqVkQcaAmwOeTA=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=W1+cEf4YVk/FwkRe+J2H2j8Uxt+dQED7hD1eY02cbScO3GUtl+78r2ejOnlELdLLsIs21VH4FUj6DYChzIIWSMIwB5rtgZn+txavHZ0EMrJJL6rElPM14/ft77uLduSWPl0oAzWgj7W0a+u9ipLHigjiMO/xIC2O4zIAzkKoYo4= 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=Lw6Kziwb; arc=fail smtp.client-ip=52.101.229.29 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="Lw6Kziwb" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MpoX/rm0mhWzYtepA42nH+pM5H+npbF49jTy0LicIhk9ul7PjlFgr4Gt7fojsXZQTWQNGGSF/f9PzzIICH3QXucGfySEBn1GftAWwV5QfG1jkxokmVvMxLC7dOPgi7eXIIZKR6zx80P7vcFEvFAKdB+eglfKWUaHsXkMW75a5UXBnl0wedv/MK8szIlj0/h/7cKEz0zCGg1IvUHsKKsrVQg9w7+3xxJJUuW6CaSkcosR8eDosk/ayYDqV1hB5B4foXbVJLi1u+CwdyD5XzWR1ySOJHXclyq+RW1a6J7SuK34g25EiOIN+TS2x24yrhPBPFDN9oQCfr38qG7sjrVEog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=xK9PRpr8g92RSfeAYqS0rsU3uHRBqDoo+3h1U7ObAgs=; b=LuozuKqDgkHJIz5luKmlm9lPbT+TZC7yieutD5MIemJVIk8HeKwrBBvcjipP75naDY941mg4XoWLX/X3WkzhG2vPcT3QBqJKQkjbJJMgwB98CNL4RE62Ti5Y/LqgS+ue/Nn9Xbibw7lOs705EqPAJPj6MvcOLLZxoDaNlIvUvUJfHr6evDUcbMg+NfvdsM6yNAlxTGIMjco1DQKfAbFfbHJk3uT1x1ja47l2Jxd+px35QzVATjnsIiY851AQxTFBLLsZg/DtzLjMEJJjm4CJ0k7PkU1TYurm7gKyBDHef7x5Tg2lv+ZerEABVyTJjgNKo4+d4S2HADsd4clB6XjsEQ== 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=xK9PRpr8g92RSfeAYqS0rsU3uHRBqDoo+3h1U7ObAgs=; b=Lw6KziwbVa8vC8hZa/G7afZ4ewBVHTkks3KBsK37Fb7huYi6q1Y+Xucr/Ttg5jRd4Q0k0WQmWAb7+pvYh2nNcCcE3t8Or+dCzMRq0DpOfzLreYwhBYuCXwhGcZyzr74fXuZ7VCWoFrRNPQH2ZKO//UX57H6GAiLVJzbV+yV8rXI= 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 TYCPR01MB10616.jpnprd01.prod.outlook.com (2603:1096:400:290::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.24; Mon, 26 Aug 2024 02:43:34 +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.7875.016; Mon, 26 Aug 2024 02:43:34 +0000 Message-ID: <878qwkqa0a.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 3/9] ASoC: test-component: use new of_graph functions User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Daniel Vetter , David Airlie , Helge Deller , Jaroslav Kysela , Laurent Pinchart , Liam Girdwood , Maarten Lankhorst , Mark Brown , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Rob Herring , Saravana Kannan , Takashi Iwai , Thomas Zimmermann , Tomi Valkeinen , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-sound@vger.kernel.org, Sakari Ailus In-Reply-To: <87cylwqa12.wl-kuninori.morimoto.gx@renesas.com> References: <87cylwqa12.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 26 Aug 2024 02:43:33 +0000 X-ClientProxiedBy: TY2PR06CA0028.apcprd06.prod.outlook.com (2603:1096:404:2e::16) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB10616:EE_ X-MS-Office365-Filtering-Correlation-Id: 6e7600f1-cb58-47b1-3aa8-08dcc578e0f0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|52116014|7416014|376014|366016|38350700014|921020; X-Microsoft-Antispam-Message-Info: +AsNRX0qBUbqaHRFfdW6Q2ofxjyIkp+mSKd/qX5C1bnYorVBFV1KORS6ZdQlzit7H6lZgCq50BQSRL24t8rEu2f6qK6O2eho8Vg9gUTqk7/e6l6vBIOPu04hrzRDeZZlZ25VjBunEAbBbofK+ktxFpLaDXpWyV/WrQbQOQLvBHNwuV6elJzQ7kM5JKm2EZd/eLJNtiN2VzL+dZbrqfCUmvuZn4VsdBXcI1b6LeWfr3fH5iTmS1Ex3+jF4ZzYZOEGzvPYutPzsS8ohGyrWj2kzAm0QhUarChhlezDO3nmSmnlB+5/h2kW1IIzQfEm6Yg6WJBX9JdjPMtDDV6qoiiIuUYTSkUmbt+SHoULWjNXjtBP68mJ0p8SPrKWaKtM4Lp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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)(52116014)(7416014)(376014)(366016)(38350700014)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 94o42hLFowFzvBBaK1NqVbEBYMQ+BD1705PPD1NWSsgm0ojjKKtzPKTqSMPhgp3LjNydri8x/viZJxxKFSMQngMTPS4++3Yyji1SufYcAsU5Z9fUIJwM1ejO7Zi3PijvlgMM7qTDwNQZa9KsrBo1EcEziilVSMbqb65Bsy5MfhnWkNQo4l7B6aGXPR4B/TKAlL1m5kly2BCIFuLYtelM7z50qa//CjNVLu1p+q8Tvr6Dou3viSRw2CLgHvbzcaosEbDrAHz881ZHQp+G3TYVzVD4bAnzYwS7hyOXgDkfy1LoaPhyBcx9bTojxQLD8LhUCc3aBx7Rbk5+dajzL1xIt3fMjz95nY0ZzCgF4VxAnpqJHplNW8maUWprnFB/8UJh5TQrcwtHuSB1N9mly1RLD7y/pzigJSYYcER8r57ddNeawE2OvNpWieSv9gIXs5FK4l2Wc0yEsvaV+2Vl9AI5IeAhG8oz4bIb2Oms/HNUj0ssOzO0MiVRyK0LmrVz3+v17GGE7NsMEg9SE0y5iVAudLoRoGobmNPkuAvdNdd1OlFa8rCUAAqoaMjDU1J3P9EWHt4ENr1+wJ1wiJo2Rtz2jpgZVRTah+GIiIrt/tW9wvt2D2UWNPXTIn34Zz9c21FwXSqbnv4fzLBZHLPQu1jiWYkXN6CCHER4nnmHcuDvIz+gl1yR9xw7X3bdjPsqAU1gKwWw2yww1D8Zqo8VK3vDIh/nMiGs/1CPU+h4id9/tmnPn/293EcJnwC2wzzhQ6F0JcofnDuNDYnGKLxptYWlUJn/kn3wqIifedJQpPBm5WXxejumU4ToE0kTmQss9BkX+KyPu+GFFIlX1MXfTmNjZ/y0Q5YGRZ4rFDJzQhK5vtb9YEBtS7tQBpluq+nGx8Zz2+SXNom7dsDakbkp/h9VfwlhktL9ayppWwpkEw2OPKDLeRGHyVSwgM/3qk+pjODDvXhM6vvkIpr9KCIKQ0VSXqPWyPd3Vsv/3ONh1wZwiKEAKlDld2ZWUg0AqIyu1iA2Goj3XVMxiIC4RP9ljAykupLCN9pQejhpnjRiq6m5biGG/aINj9HX7wxCLPToebW4JtuCpczwV1r/eKh8Kt6vdKqgExEQp4qe0qFCEzo3UbuPlZT1NPGiUoW0dAr6VsG4KgQT1uujPnK5qWv5Db9eQGhRhN2doAqPZgVBwM5OW3IeP7bbluf6y5pSxK1NXbicYMeyn3SMeZatkimOzeo1fMweaiMeumfAb83XD0pVYojRgRlWnq8qIqyetPchEG+72N5gcR+vvqDyH+/tVAOMAVCVyRORqhSIP+KP+4Am/4tEXNMwz4/wluXBAF1HvfLZZErMcMiE8vL4p9X4FTMdHpXgTZSB0THfxUOrE5YF6s7gRP6ZPtkR7b6l3M7t4K/oQEovl6eHGVwyZ93LuTym7wKBGiQekzPOP6S6JtIB2oY68phgD/18k6WGw1E9DG6WFcvRwMofLBP9WM73lVaXKn0F1qQrRiiL6naLRDwspXc9Ng/p71fM11Fwj/4zkMaFfZ7O67o5jBSKo3Zhz4r3J+tLB06p69XvJl5w2AZpyZrglreR4x7VOPemHMQMkW2kd+ccfILlIVc9sZuw5Gw/sIpgZqPJsAR8VwwXm1yTzq4= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e7600f1-cb58-47b1-3aa8-08dcc578e0f0 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2024 02:43:34.1092 (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: 7IqyBmu15slUaCazMWs6xtbqqqnOwGpfCl6Vn41safxeIoxZwlglaXDEOz4QSCbqC5nbtk7sRrAgmgcFuIKFrG5Nm4RSw0CkNOh/m5wID3Noj52QEDBTNCvahO0kXftY X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB10616 Current test-component.c is using for_each_endpoint_of_node() for parsing "port", because there was no "port" base loop before. It has been assuming 1 port has 1 endpoint here. But now we can use "port" base loop (= for_each_of_graph_port()). Let's replace for_each function from "endpoint" base to "port" base. Signed-off-by: Kuninori Morimoto Acked-by: Mark Brown --- sound/soc/generic/test-component.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/generic/test-component.c b/sound/soc/generic/test-component.c index df2487b700cca..93288f7fa3861 100644 --- a/sound/soc/generic/test-component.c +++ b/sound/soc/generic/test-component.c @@ -521,7 +521,7 @@ static int test_driver_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *node = dev->of_node; - struct device_node *ep; + struct device_node *port; const struct test_adata *adata = of_device_get_match_data(&pdev->dev); struct snd_soc_component_driver *cdriv; struct snd_soc_dai_driver *ddriv; @@ -591,7 +591,7 @@ static int test_driver_probe(struct platform_device *pdev) } i = 0; - for_each_endpoint_of_node(node, ep) { + for_each_of_graph_port(node, port) { snprintf(dname[i].name, TEST_NAME_LEN, "%s.%d", node->name, i); ddriv[i].name = dname[i].name;