From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>,
Greg KH <greg@kroah.com>,
linux-kernel@vger.kernel.org,
Frank Mandarino <fmandarino@endrelia.com>,
Liam Girdwood <lrg@ti.com>
Subject: Re: Public ridicule due to sound/soc/soc-core.c abuse of the driver model
Date: Mon, 9 Jan 2012 22:16:57 +0000 [thread overview]
Message-ID: <20120109221657.GE30766@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20120109213724.GB7795@n2100.arm.linux.org.uk>
On Mon, Jan 09, 2012 at 09:37:24PM +0000, Russell King - ARM Linux wrote:
> On Mon, Jan 09, 2012 at 12:31:30PM -0800, Mark Brown wrote:
> > If it's code like the rtd devices which is reasonably sensible and
> > stable that's one thing but wading into code we know is fragile for
> > what's essentially a warning fix is completely disproportionate.
> You're still under the impression that it's "just a warning" and not
> "a potential oops".
To repeat myself yet again: there are a bunch of other issues here, if
we're ever in the situation where we can trigger this oops we're also
likely to be running into other equally severe problems. As I keep
having to say we've got code which is buggy, difficult to work with but
has been there for quite some time without actually triggering issues on
systems. Nothing about this is saying -rc is a good time to be wading
into the code.
> And I disagree with your assessment of how easy it is to fix each
> problem.
> The rtd devices are stored in an array - this array needs breaking
> up into separate allocations for each rtd as the very first step in
> fixing that. That then needs more error checking added, etc.
There's a patch for the rtds already, they should be fine now - we just
dynamically allocate the device rather than worrying about the rtd. The
issue with AC'97 isn't that it's especially hard to make this specific
change, it's that the code is horrible and I don't trust it not to
explode underneath us if we change anything.
If you want to completely restructure the rtds as well as providng a
release function for 3.3 then you've got similar issues, you're talking
about restructuring which is *completely* out of scope for -rc.
> On the other hand, the AC'97 code in ASoC should need this to fix it:
Which is roughly what we did for the rtds too. This won't do as-is
though:
> #endif
> kfree(codec->ac97->bus);
> - kfree(codec->ac97);
> + put_device(&codec->ac97->dev);
We can't have potentially live devices floating around without a bus,
there's an assumption that a valid AC'97 device will be on a bus.
Moving the bus free into the device release function is probably all we
need to do for that.
next prev parent reply other threads:[~2012-01-09 22:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-06 19:40 Public ridicule due to sound/soc/soc-core.c abuse of the driver model Greg KH
2012-01-06 20:15 ` Mark Brown
2012-01-06 20:50 ` Russell King - ARM Linux
2012-01-06 21:10 ` Russell King - ARM Linux
2012-01-06 23:41 ` Mark Brown
2012-01-06 23:44 ` Russell King - ARM Linux
2012-01-06 23:49 ` Mark Brown
2012-01-09 9:51 ` Russell King - ARM Linux
2012-01-09 19:52 ` Mark Brown
2012-01-09 20:11 ` Greg KH
2012-01-09 20:31 ` Mark Brown
2012-01-09 21:37 ` Russell King - ARM Linux
2012-01-09 22:16 ` Mark Brown [this message]
2012-01-09 23:02 ` Greg KH
2012-01-06 20:31 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120109221657.GE30766@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=fmandarino@endrelia.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=lrg@ti.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).