Stable Archive on lore.kernel.org
 help / color / Atom feed
* revert: ASoC: Fail card instantiation if DAI format setup fails
@ 2019-09-06 15:00 Ricard Wanderlof
  2019-09-06 18:29 ` Sasha Levin
  0 siblings, 1 reply; 6+ messages in thread
From: Ricard Wanderlof @ 2019-09-06 15:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mark Brown; +Cc: Sasha Levin, linux-kernel, stable


Sorry for the repost, I relized I stupidly got Greg's email adress wrong 
first time around.

> > On Tue, Aug 27, 2019 at 12:00:14PM +0100, Mark Brown wrote:
> > > On Sun, Aug 25, 2019 at 09:35:15PM -0400, Sasha Levin wrote:
> > > > On Wed, Aug 14, 2019 at 10:22:13AM +0100, Mark Brown wrote:
> > > 
> > > > > > If the DAI format setup fails, there is no valid communication format
> > > > > > between CPU and CODEC, so fail card instantiation, rather than
> > > > continue
> > > > > > with a card that will most likely not function properly.
> > > 
> > > > > This is another one where if nobody noticed a problem already and things
> > > > > just happened to be working this might break things, it's vanishingly
> > > > > unlikely to fix anything that was broken.
> > > 
> > > > Same as the other patch: this patch suggests it fixes a real bug, and if
> > > > this patch is broken let's fix it.
> > > 
> > > If anyone ran into this on the older kernel and fixed or worked
> > > around it locally there's a reasonable chance this will then
> > > break what they're doing.  The patch itself is perfectly fine but

(Sorry about the mangled subject line, I'd accidentally deleted the 
original message from my inbox.)

I'm a bit bewildered here. As the author of the original patch I'm of 
course biased, and I can certainly understand the patch being dropped from 
existing release branches, since as Mark correctly states, it does not fix 
any broken behavior and might even break things that happen to work by 
chance.

But is this being dropped from the master branch as well? To me it makes 
the kernel behave in an inconsistent way, first reporting a failure to 
instantiate a specific sound card in the kernel log, but then seemingly 
bringing it up anyway.

/Ricard
-- 
Ricard Wolf Wanderlof                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH AUTOSEL 5.2 001/123] ASoC: simple_card_utils.h: care NULL dai at asoc_simple_debug_dai()
@ 2019-08-14  2:08 Sasha Levin
  2019-08-14  2:09 ` [PATCH AUTOSEL 5.2 040/123] ASoC: Fail card instantiation if DAI format setup fails Sasha Levin
  0 siblings, 1 reply; 6+ messages in thread
From: Sasha Levin @ 2019-08-14  2:08 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Kuninori Morimoto, Mark Brown, Sasha Levin

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

[ Upstream commit 52db6685932e326ed607644ab7ebdae8c194adda ]

props->xxx_dai might be NULL when DPCM.
This patch cares it for debug.

Fixes: commit 0580dde59438 ("ASoC: simple-card-utils: add asoc_simple_debug_info()")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o922gw4u.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/sound/simple_card_utils.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h
index 3429888347e7c..b3609e4c46e0f 100644
--- a/include/sound/simple_card_utils.h
+++ b/include/sound/simple_card_utils.h
@@ -149,6 +149,10 @@ inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv,
 {
 	struct device *dev = simple_priv_to_dev(priv);
 
+	/* dai might be NULL */
+	if (!dai)
+		return;
+
 	if (dai->name)
 		dev_dbg(dev, "%s dai name = %s\n",
 			name, dai->name);
-- 
2.20.1


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

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 15:00 revert: ASoC: Fail card instantiation if DAI format setup fails Ricard Wanderlof
2019-09-06 18:29 ` Sasha Levin
  -- strict thread matches above, loose matches on Subject: below --
2019-08-14  2:08 [PATCH AUTOSEL 5.2 001/123] ASoC: simple_card_utils.h: care NULL dai at asoc_simple_debug_dai() Sasha Levin
2019-08-14  2:09 ` [PATCH AUTOSEL 5.2 040/123] ASoC: Fail card instantiation if DAI format setup fails Sasha Levin
2019-08-14  9:22   ` Mark Brown
2019-08-26  1:35     ` Sasha Levin
2019-08-27 11:00       ` Mark Brown
2019-08-28  2:13         ` Sasha Levin
2019-08-28  7:07           ` Ricard Wanderlof
2019-09-06  8:40             ` revert: " Ricard Wanderlof
2019-09-06 10:58               ` Mark Brown
2019-09-06 18:38                 ` Sasha Levin
2019-09-09  9:35                   ` Mark Brown

Stable Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://lore.kernel.org/stable \
		stable@vger.kernel.org
	public-inbox-index stable

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git