[alsa-devel] soc-core: Questions about cpus->name && cpus->of_node

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Mon Jan 20 01:32:23 CET 2020


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


More information about the Alsa-devel mailing list