alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [alsa-devel] soc-core: Questions about cpus->name && cpus->of_node
@ 2020-01-17  8:32 Daniel Baluta
  2020-01-20  0:32 ` Kuninori Morimoto
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Baluta @ 2020-01-17  8:32 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: alsa-devel

Hello Morimoto-san,

I have a question about this snippet from sound/soc/soc-core.c

»       /*
»        * CPU device may be specified by either name or OF node, but
»        * can be left unspecified, and will be matched based on DAI
»        * name alone..
»        */
»       if (link->cpus->name && link->cpus->of_node) {
»       »       dev_err(card->dev,
»       »       »       "ASoC: Neither/both cpu name/of_node are set for %s\n",
»       »       »       link->name);
»       »       return -EINVAL;
»       }

Here either the warning message is wrong OR the if () condition is wrong.

If the link->cpus->name = NULL && link->cpus->of_node == NULL 
the warning message will be not be printed. 

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [alsa-devel] soc-core: Questions about cpus->name && cpus->of_node
  2020-01-17  8:32 [alsa-devel] soc-core: Questions about cpus->name && cpus->of_node Daniel Baluta
@ 2020-01-20  0:32 ` Kuninori Morimoto
  0 siblings, 0 replies; 2+ messages in thread
From: Kuninori Morimoto @ 2020-01-20  0:32 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: alsa-devel


Hi Daniel

> »       /*
> »        * CPU device may be specified by either name or OF node, but
> »        * can be left unspecified, and will be matched based on DAI
> »        * name alone..
> »        */
> »       if (link->cpus->name && link->cpus->of_node) {
> »       »       dev_err(card->dev,
> »       »       »       "ASoC: Neither/both cpu name/of_node are set for %s\n",
> »       »       »       link->name);
> »       »       return -EINVAL;
> »       }
> 
> Here either the warning message is wrong OR the if () condition is wrong.
> 
> If the link->cpus->name = NULL && link->cpus->of_node == NULL 
> the warning message will be not be printed. 

It seems it was added by this patch

	bc92657a11c0982783979bbb84ceaf58ba222124
	("ASoC: make snd_soc_dai_link more symmetrical")

it removes

	- if (!!link->cpu_dai_name == !!link->cpu_dai_of_node) {


Thank you for your help !!
Best regards
---
Kuninori Morimoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-20  0:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-17  8:32 [alsa-devel] soc-core: Questions about cpus->name && cpus->of_node Daniel Baluta
2020-01-20  0:32 ` Kuninori Morimoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).