From: Muli Ben-Yehuda <mulix@mulix.org>
To: Linux-Kernel <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@zip.com.au>, Muli Ben-Yehuda <mulix@mulix.org>
Subject: [CFT/PATCH] give sound/oss/trident a holiday cleanup for 2.6
Date: Mon, 29 Dec 2003 20:38:47 +0200 [thread overview]
Message-ID: <20031229183846.GI13481@actcom.co.il> (raw)
[-- Attachment #1: Type: text/plain, Size: 1900 bytes --]
I've had a bit of time on my hands in the last few days, and gave
sound/oss/trident.c a much needed cleanup. The changes are mostly
cleanups, a few bug fixes where we wouldn't do cleanup properly on
error paths, and the removal of lock_kernel()/unlock_kernel().
If anyone who has this sound card wishes to take the driver for a
spin, I'd love bug/success reports. Especially on SMP and/or machines
with multiple trident cards. Andrew, if you feel it's appropriate for
-mm, please include it.
The patch against 2.6.0 is rather large. 140kb unzipped, 30kb
gzipped. It's available at
http://www.mulix.org/patches/trident-cleanup-B1-2.6.0.diff (gzipped:
http://www.mulix.org/patches/trident-cleanup-B1-2.6.0.diff.gz)
Summary of changes:
- run the code through Lindent, and then fix it manually (this is the
bulk of the patch)
- switch lock_set_fmt() and unlock_set_fmt() from macros to inline
functions. Macros that call return() are EVIL.
- simplify lock_set_fmt() and implement it via test_and_set_bit().
- fix a bug wherein we would do an up() on a semaphore that hasn't
been down()ed if a signal happened after timeout in trident_write()
- fix a bug where we would not release the open_sem on OOM
- make the arguments for prog_dmabuf clearer (int -> enum)
- fix a bug where we would call VALIDATE_STATE after
lock_kernel(). Since VALIDATE_STATE does 'return' if validation fails,
bad things can happen. Thanks to Dawson Engler <engler@stanford.edu>
and the Stanford checker for spotting.
- remove the calls to lock_kernel() from trident_release() and
trident_mmap(). trident_release() appears to be covered by the
open_sem, and trident_mmap() is covered by state->sem.
- s/TRUE/1/, s/FALSE/0/
Cheers,
Muli
--
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/
"the nucleus of linux oscillates my world" - gccbot@#offtopic
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2003-12-29 18:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-29 18:38 Muli Ben-Yehuda [this message]
2003-12-29 18:50 ` [CFT/PATCH] give sound/oss/trident a holiday cleanup for 2.6 Linus Torvalds
2003-12-29 18:56 ` Muli Ben-Yehuda
2003-12-29 19:09 ` Jeff Garzik
2003-12-29 19:40 ` Linus Torvalds
2003-12-29 20:32 ` Jeff Garzik
2004-01-01 23:51 ` Muli Ben-Yehuda
2004-01-02 0:04 ` Andrew Morton
2004-01-02 0:12 ` Muli Ben-Yehuda
2004-01-02 0:26 ` Andrew Morton
2004-01-02 0:39 ` Mike Fedyk
2004-01-02 0:43 ` Andrew Morton
2003-12-29 18:53 ` Mike Fedyk
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=20031229183846.GI13481@actcom.co.il \
--to=mulix@mulix.org \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
/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