From: Takashi Iwai <tiwai@suse.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/7] sound: autoconvert trivial BKL users to private mutex
Date: Tue, 14 Sep 2010 23:16:43 +0200 [thread overview]
Message-ID: <s5haankqb44.wl%tiwai@suse.de> (raw)
In-Reply-To: <1284494022-7346-7-git-send-email-arnd@arndb.de>
At Tue, 14 Sep 2010 21:53:41 +0200,
Arnd Bergmann wrote:
>
> The usage of the BKL in the OSS sound drivers is
> trivial, and each of them only locks against itself,
> so it can be turned into per-driver mutexes.
>
> This is the script that was used for the conversion:
>
> file=$1
> name=$2
> if grep -q lock_kernel ${file} ; then
> if grep -q 'include.*linux.mutex.h' ${file} ; then
> sed -i '/include.*<linux\/smp_lock.h>/d' ${file}
> else
> sed -i 's/include.*<linux\/smp_lock.h>.*$/include <linux\/mutex.h>/g' ${file}
> fi
> sed -i ${file} \
> -e "/^#include.*linux.mutex.h/,$ {
> 1,/^\(static\|int\|long\)/ {
> /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);
>
> } }" \
> -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
> -e '/[ ]*cycle_kernel_lock();/d'
> else
> sed -i -e '/include.*\<smp_lock.h\>/d' ${file} \
> -e '/cycle_kernel_lock()/d'
> fi
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Takashi Iwai <tiwai@suse.de>
Through a quick look over the patch and the actual driver codes,
I found no obvious problems, so I applied it now to sound git tree.
thanks,
Takashi
next prev parent reply other threads:[~2010-09-14 21:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-14 19:53 [PATCH 0/7] BKL mass-conversion to mutex Arnd Bergmann
2010-09-14 19:53 ` [PATCH 1/7] scsi: autoconvert trivial BKL users to private mutex Arnd Bergmann
2010-09-14 19:53 ` [PATCH 2/7] mtd: " Arnd Bergmann
2010-09-15 7:42 ` Artem Bityutskiy
2010-09-15 9:01 ` Arnd Bergmann
2010-09-14 19:53 ` [PATCH 3/7] mac: " Arnd Bergmann
2010-09-14 19:53 ` [PATCH 4/7] ipmi: " Arnd Bergmann
2010-09-14 20:39 ` Corey Minyard
2010-09-14 19:53 ` [PATCH 5/7] drivers: " Arnd Bergmann
2010-09-14 19:53 ` [PATCH 6/7] sound: " Arnd Bergmann
2010-09-14 21:16 ` Takashi Iwai [this message]
2010-09-15 18:53 ` Arnd Bergmann
2010-09-14 19:53 ` [PATCH 7/7] block: " Arnd Bergmann
2010-09-14 22:47 ` Christoph Hellwig
2010-09-15 9:38 ` [PATCH 0/7] BKL mass-conversion to mutex Stephen Rothwell
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=s5haankqb44.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=arnd@arndb.de \
--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
Powered by JetHome