From: Jean Delvare <khali@linux-fr.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>, Ingo Molnar <mingo@elte.hu>
Subject: [PATCH] Clean up mutex_trylock noise
Date: Sun, 15 Apr 2007 12:54:44 +0200 [thread overview]
Message-ID: <20070415125444.4f06f233@hyperion.delvare> (raw)
Ingo Molnar's semaphore to mutex conversions left some noise on a few
trylock calls. Clean it up.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ingo Molnar <mingo@elte.hu>
---
drivers/media/video/zoran_driver.c | 2 +-
drivers/mtd/mtd_blkdevs.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--- linux-2.6.21-rc6.orig/drivers/media/video/zoran_driver.c 2007-04-14 16:00:12.000000000 +0200
+++ linux-2.6.21-rc6/drivers/media/video/zoran_driver.c 2007-04-15 12:47:37.000000000 +0200
@@ -2034,7 +2034,7 @@ zoran_do_ioctl (struct inode *inode,
* but moving the free code outside the munmap() handler fixes
* all this... If someone knows why, please explain me (Ronald)
*/
- if (!!mutex_trylock(&zr->resource_lock)) {
+ if (mutex_trylock(&zr->resource_lock)) {
/* we obtained it! Let's try to free some things */
if (fh->jpg_buffers.ready_to_be_freed)
jpg_fbuffer_free(file);
--- linux-2.6.21-rc6.orig/drivers/mtd/mtd_blkdevs.c 2007-02-04 19:44:54.000000000 +0100
+++ linux-2.6.21-rc6/drivers/mtd/mtd_blkdevs.c 2007-04-15 12:47:26.000000000 +0200
@@ -236,7 +236,7 @@ int add_mtd_blktrans_dev(struct mtd_blkt
int last_devnum = -1;
struct gendisk *gd;
- if (!!mutex_trylock(&mtd_table_mutex)) {
+ if (mutex_trylock(&mtd_table_mutex)) {
mutex_unlock(&mtd_table_mutex);
BUG();
}
@@ -314,7 +314,7 @@ int add_mtd_blktrans_dev(struct mtd_blkt
int del_mtd_blktrans_dev(struct mtd_blktrans_dev *old)
{
- if (!!mutex_trylock(&mtd_table_mutex)) {
+ if (mutex_trylock(&mtd_table_mutex)) {
mutex_unlock(&mtd_table_mutex);
BUG();
}
--
Jean Delvare
next reply other threads:[~2007-04-15 10:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-15 10:54 Jean Delvare [this message]
2007-04-15 13:05 ` Ingo Molnar
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=20070415125444.4f06f233@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®