diff mbox series

[4.19.y-cip,25/57] ASoC: rsnd: remove endpoint bidirectional check

Message ID 1571295929-47286-26-git-send-email-biju.das@bp.renesas.com (mailing list archive)
State Changes Requested
Headers show
Series Audio improvements/SSIU BUSIF/ | expand

Commit Message

Biju Das Oct. 17, 2019, 7:04 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

commit c8b222bf110ccb54d787f695fb3eb2fb6b723903 upstream.

DTC commit df536831d02c ("checks: add graph binding checks")
is checking endpoint bidirectional, and it is upstreamed to linux by
commit 50aafd60898a ("scripts/dtc: Update to upstream version
v1.4.6-21-g84e414b0b5bc").
Let's remove own bidirectional check

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 sound/soc/sh/rcar/ssi.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Pavel Machek Oct. 20, 2019, 10:38 a.m. UTC | #1
Hi!

> DTC commit df536831d02c ("checks: add graph binding checks")
> is checking endpoint bidirectional, and it is upstreamed to linux by
> commit 50aafd60898a ("scripts/dtc: Update to upstream version
> v1.4.6-21-g84e414b0b5bc").
> Let's remove own bidirectional check

I don't really understand what bidirectional check? Are you saying
that of_graph_get_remote_endpoint() never fails in 4.19.X ?

> +++ b/sound/soc/sh/rcar/ssi.c
> @@ -1095,11 +1095,7 @@ void rsnd_ssi_parse_hdmi_connection(struct rsnd_priv *priv,
>  				    int dai_i)
>  {
>  	struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i);
> -	struct device_node *remote_ep;
> -
> -	remote_ep = of_graph_get_remote_endpoint(endpoint);
> -	if (!remote_ep)
> -		return;
> +	struct device_node *remote_ep = of_graph_get_remote_endpoint(endpoint);

Plus the code seems to be missing of_node_put().

Best regards,
								Pavel
Biju Das Oct. 21, 2019, 1:40 p.m. UTC | #2
+ Morimoto San,

Hi Pavel, Thanks for the feedback.

> Subject: Re: [PATCH 4.19.y-cip 25/57] ASoC: rsnd: remove endpoint
> bidirectional check
> 
> Hi!
> 
> > DTC commit df536831d02c ("checks: add graph binding checks") is
> > checking endpoint bidirectional, and it is upstreamed to linux by
> > commit 50aafd60898a ("scripts/dtc: Update to upstream version
> > v1.4.6-21-g84e414b0b5bc").
> > Let's remove own bidirectional check
> 
> I don't really understand what bidirectional check? Are you saying that
> of_graph_get_remote_endpoint() never fails in 4.19.X ?
> 
> > +++ b/sound/soc/sh/rcar/ssi.c
> > @@ -1095,11 +1095,7 @@ void rsnd_ssi_parse_hdmi_connection(struct
> rsnd_priv *priv,
> >  				    int dai_i)
> >  {
> >  	struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i);
> > -	struct device_node *remote_ep;
> > -
> > -	remote_ep = of_graph_get_remote_endpoint(endpoint);
> > -	if (!remote_ep)
> > -		return;
> > +	struct device_node *remote_ep =
> > +of_graph_get_remote_endpoint(endpoint);
> 
> Plus the code seems to be missing of_node_put().

This patch is overridden by " 0028-ASoC-rsnd-move-HDMI-information-from-ssi.c-to-core.c.patch", yes I agree we are still missing of_node_put??

Morimoto-San, any comments??

Regards,
Biju
Kuninori Morimoto Oct. 23, 2019, 1:38 a.m. UTC | #3
Hi

> > > DTC commit df536831d02c ("checks: add graph binding checks") is
> > > checking endpoint bidirectional, and it is upstreamed to linux by
> > > commit 50aafd60898a ("scripts/dtc: Update to upstream version
> > > v1.4.6-21-g84e414b0b5bc").
> > > Let's remove own bidirectional check
> > 
> > I don't really understand what bidirectional check? Are you saying that
> > of_graph_get_remote_endpoint() never fails in 4.19.X ?

On OF-graph DT, remote-endpoint need to be pair.
ex)
	endpoint1: endpoint {
		remote-endpoint = <&endpoint2>;
	};

	endpoint2: endpoint {
		remote-endpoint = <&endpoint1>;
	};

This "bidirectional check" is for it.
Now, it is checked by DTC.

> > > +++ b/sound/soc/sh/rcar/ssi.c
> > > @@ -1095,11 +1095,7 @@ void rsnd_ssi_parse_hdmi_connection(struct
> > rsnd_priv *priv,
> > >  				    int dai_i)
> > >  {
> > >  	struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i);
> > > -	struct device_node *remote_ep;
> > > -
> > > -	remote_ep = of_graph_get_remote_endpoint(endpoint);
> > > -	if (!remote_ep)
> > > -		return;
> > > +	struct device_node *remote_ep =
> > > +of_graph_get_remote_endpoint(endpoint);
> > 
> > Plus the code seems to be missing of_node_put().

Thanks. indeed it missing of_node_put().
I will post fixup patch


Thank you for your help !!
Best regards
---
Kuninori Morimoto
diff mbox series

Patch

diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index 81d3864..65cd629 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -1095,11 +1095,7 @@  void rsnd_ssi_parse_hdmi_connection(struct rsnd_priv *priv,
 				    int dai_i)
 {
 	struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i);
-	struct device_node *remote_ep;
-
-	remote_ep = of_graph_get_remote_endpoint(endpoint);
-	if (!remote_ep)
-		return;
+	struct device_node *remote_ep = of_graph_get_remote_endpoint(endpoint);
 
 	__rsnd_ssi_parse_hdmi_connection(priv, &rdai->playback, remote_ep);
 	__rsnd_ssi_parse_hdmi_connection(priv, &rdai->capture,  remote_ep);