From mboxrd@z Thu Jan 1 00:00:00 1970 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 B4147C83F2D for ; Thu, 29 Aug 2024 15:42:16 +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:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uVZcTYE2qXJg0smFIRDzgMjCz560Cs/7IuumIoqzllc=; b=A0Nc7KacFuDkHw86kxdrf6AZGy aOi91h0j3vBIrJFqG+Ef+gZpmrCCgSJMckiT56xMIM+t1ZSgtgl0H/Teo7VZWgysywlpR/hrX7MFR cRqpvBXsJH1Cg2SeC/67KeWnwBv5FqwWxLHfTGmXmiFviTeQI9Jfsky6VP+e5g5dAgqxpu25fGbdy 1YO0YE3Ro9oqdanrguCqGvVfYGustzDQ3seEPRzh842VgoTlbqmAXlPVtP70IWgjhdn+5KjtUNrlC tQyqTrIqxzuqa9uCpTTkijC1FVIGcI0da/trze71YB6zRQ1qN3eNNrsThU5CJbERochNZLVFNWaNJ B3KGBGFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjhHd-00000002f63-3huA; Thu, 29 Aug 2024 15:42:01 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjhGl-00000002ey9-0Igv for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 15:41:10 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 56667CE1BCB; Thu, 29 Aug 2024 15:41:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 519BEC4CEC1; Thu, 29 Aug 2024 15:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724946064; bh=/zGGPt8jYtuq/1RE9arY1RA1H+rfW2qjhyrvYnQ62ps=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pb6gtWIT0umdrydivzW3q3x+x8RffD3d4f4N9Pxo5JhkzOL8GdkTxGt2RfEsuuGSi gE3mHFkn/f7T7k6uL9vo3yI2u6IHdmN0Djc2HAjxOkgRhb/8WyNcUIEoyUisdKE1Br ghCEROt32J4MuG/nNAVHOMqq3lqSY6cFNaK47i8HiZDVeuY57YEG3cLwyCD1P5xOzQ G+KkCjkmLXNb6kanoNJHrT/6bKRODeYUrHYs+tIdkaIx9Z1/kXB9zOZuQXC20gd4+x T3IjAROTorQiGQtwEgGY9ag1AaUpM/U1aUQi70qibxS+PnWbwFTyMHZsQvuRrIJvO7 nKj26aueNEWLQ== Date: Thu, 29 Aug 2024 10:41:02 -0500 From: Rob Herring To: Kuninori Morimoto Cc: Daniel Vetter , David Airlie , Helge Deller , Jaroslav Kysela , Laurent Pinchart , Liam Girdwood , Maarten Lankhorst , Mark Brown , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , 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 Subject: Re: [PATCH v4 4/9] ASoC: rcar_snd: use new of_graph functions Message-ID: <20240829154102.GB465065-robh@kernel.org> References: <87bk1d2pvt.wl-kuninori.morimoto.gx@renesas.com> <875xrl2pur.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <875xrl2pur.wl-kuninori.morimoto.gx@renesas.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240829_084107_497055_BBD1AA11 X-CRM114-Status: GOOD ( 18.63 ) 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 On Wed, Aug 28, 2024 at 05:11:56AM +0000, Kuninori Morimoto wrote: > Now we can use new port related functions for port parsing. Use it. > > Signed-off-by: Kuninori Morimoto > Acked-by: Mark Brown > --- > sound/soc/sh/rcar/core.c | 21 +++++++-------------- > 1 file changed, 7 insertions(+), 14 deletions(-) > > diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c > index 15cb5e7008f9f..281936ece760b 100644 > --- a/sound/soc/sh/rcar/core.c > +++ b/sound/soc/sh/rcar/core.c > @@ -1237,7 +1237,7 @@ static int rsnd_dai_of_node(struct rsnd_priv *priv, int *is_graph) > { > struct device *dev = rsnd_priv_to_dev(priv); > struct device_node *np = dev->of_node; > - struct device_node *ports, *node; > + struct device_node *node; > int nr = 0; > int i = 0; > > @@ -1277,16 +1277,12 @@ static int rsnd_dai_of_node(struct rsnd_priv *priv, int *is_graph) > /* > * Audio-Graph-Card > */ > - for_each_child_of_node(np, ports) { > - if (!of_node_name_eq(ports, "ports") && > - !of_node_name_eq(ports, "port")) > - continue; > - priv->component_dais[i] = of_graph_get_endpoint_count(ports); > + for_each_of_graph_ports(np, ports) { > + priv->component_dais[i] = of_graph_get_port_count(ports); These are not equivalent. Besides now working with multiple 'ports' nodes, it's possible to have a port node without an endpoint populated for example. Rob