All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "ASoC: simple-card-utils: enable "label" on asoc_simple_card_parse_card_name"
@ 2017-08-29 15:36 Lucas Stach
  2017-08-29 23:53 ` Kuninori Morimoto
  0 siblings, 1 reply; 3+ messages in thread
From: Lucas Stach @ 2017-08-29 15:36 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Kuninori Morimoto
  Cc: alsa-devel, patchwork-lst, Takashi Iwai, kernel

This commit breaks existing systems, as snd_soc_of_parse_card_name() doesn't
return an error if the DT name property is missing, which would be required
to hit the fallback path in the offending commit at all.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
This should be fixed properly, but given the timing with the 4.13 release
being really close, I opted for just reverting the offending commit.
---
 sound/soc/generic/simple-card-utils.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index 7d7ab4aee42e..e6f472360cfc 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -125,21 +125,15 @@ EXPORT_SYMBOL_GPL(asoc_simple_card_set_dailink_name);
 int asoc_simple_card_parse_card_name(struct snd_soc_card *card,
 				     char *prefix)
 {
+	char prop[128];
 	int ret;
 
-	if (!prefix)
-		prefix = "";
+	snprintf(prop, sizeof(prop), "%sname", prefix);
 
 	/* Parse the card name from DT */
-	ret = snd_soc_of_parse_card_name(card, "label");
-	if (ret < 0) {
-		char prop[128];
-
-		snprintf(prop, sizeof(prop), "%sname", prefix);
-		ret = snd_soc_of_parse_card_name(card, prop);
-		if (ret < 0)
-			return ret;
-	}
+	ret = snd_soc_of_parse_card_name(card, prop);
+	if (ret < 0)
+		return ret;
 
 	if (!card->name && card->dai_link)
 		card->name = card->dai_link->name;
-- 
2.11.0

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

* Re: [PATCH] Revert "ASoC: simple-card-utils: enable "label" on asoc_simple_card_parse_card_name"
  2017-08-29 15:36 [PATCH] Revert "ASoC: simple-card-utils: enable "label" on asoc_simple_card_parse_card_name" Lucas Stach
@ 2017-08-29 23:53 ` Kuninori Morimoto
  2017-08-29 23:57   ` Kuninori Morimoto
  0 siblings, 1 reply; 3+ messages in thread
From: Kuninori Morimoto @ 2017-08-29 23:53 UTC (permalink / raw)
  To: Lucas Stach
  Cc: alsa-devel, Liam Girdwood, Takashi Iwai, patchwork-lst,
	Mark Brown, kernel


Hi Lucas

> This commit breaks existing systems, as snd_soc_of_parse_card_name() doesn't
> return an error if the DT name property is missing, which would be required
> to hit the fallback path in the offending commit at all.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> This should be fixed properly, but given the timing with the 4.13 release
> being really close, I opted for just reverting the offending commit.

Sorry, but I don't understand your issue, and why it happens.
It tries to find "label" -> "[prefix]name" -> error.
The difference from previous version (tries "[prefix]name" -> error)
is just checking "label".
Do you know why it doesn't return error ?

Best regards
---
Kuninori Morimoto

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

* Re: [PATCH] Revert "ASoC: simple-card-utils: enable "label" on asoc_simple_card_parse_card_name"
  2017-08-29 23:53 ` Kuninori Morimoto
@ 2017-08-29 23:57   ` Kuninori Morimoto
  0 siblings, 0 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2017-08-29 23:57 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: alsa-devel, Liam Girdwood, Takashi Iwai, Mark Brown, kernel,
	patchwork-lst, Lucas Stach


Hi Lucas, again

> > This commit breaks existing systems, as snd_soc_of_parse_card_name() doesn't
> > return an error if the DT name property is missing, which would be required
> > to hit the fallback path in the offending commit at all.
> > 
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > ---
> > This should be fixed properly, but given the timing with the 4.13 release
> > being really close, I opted for just reverting the offending commit.
> 
> Sorry, but I don't understand your issue, and why it happens.
> It tries to find "label" -> "[prefix]name" -> error.
> The difference from previous version (tries "[prefix]name" -> error)
> is just checking "label".
> Do you know why it doesn't return error ?

I missed your fixup patch.
Sorry for my noise

Best regards
---
Kuninori Morimoto

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

end of thread, other threads:[~2017-08-29 23:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-29 15:36 [PATCH] Revert "ASoC: simple-card-utils: enable "label" on asoc_simple_card_parse_card_name" Lucas Stach
2017-08-29 23:53 ` Kuninori Morimoto
2017-08-29 23:57   ` Kuninori Morimoto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.