* [PATCH] rocket: Fix mutex locking compile warning
@ 2007-07-11 23:56 Michael Buesch
2007-07-12 1:27 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Michael Buesch @ 2007-07-11 23:56 UTC (permalink / raw)
To: tytso, Andrew Morton; +Cc: linux-kernel
This fixes
drivers/char/rocket.c: In function ‘rp_write’:
drivers/char/rocket.c:1705: warning: ignoring return value of ‘mutex_lock_interruptible’, declared with attribute warn_unused_result
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Index: bu3sch-wireless-dev/drivers/char/rocket.c
===================================================================
--- bu3sch-wireless-dev.orig/drivers/char/rocket.c 2007-05-18 18:09:48.000000000 +0200
+++ bu3sch-wireless-dev/drivers/char/rocket.c 2007-07-12 01:52:44.000000000 +0200
@@ -1702,7 +1702,8 @@ static int rp_write(struct tty_struct *t
if (count <= 0 || rocket_paranoia_check(info, "rp_write"))
return 0;
- mutex_lock_interruptible(&info->write_mtx);
+ if (mutex_lock_interruptible(&info->write_mtx))
+ return -ERESTARTSYS;
#ifdef ROCKET_DEBUG_WRITE
printk(KERN_INFO "rp_write %d chars...", count);
--
Greetings Michael.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] rocket: Fix mutex locking compile warning
2007-07-11 23:56 [PATCH] rocket: Fix mutex locking compile warning Michael Buesch
@ 2007-07-12 1:27 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2007-07-12 1:27 UTC (permalink / raw)
To: Michael Buesch; +Cc: tytso, linux-kernel
On Thu, 12 Jul 2007 01:56:32 +0200
Michael Buesch <mb@bu3sch.de> wrote:
> This fixes
>
> drivers/char/rocket.c: In function ‘rp_write’:
> drivers/char/rocket.c:1705: warning: ignoring return value of ‘mutex_lock_interruptible’, declared with attribute warn_unused_result
>
> Signed-off-by: Michael Buesch <mb@bu3sch.de>
>
> Index: bu3sch-wireless-dev/drivers/char/rocket.c
> ===================================================================
> --- bu3sch-wireless-dev.orig/drivers/char/rocket.c 2007-05-18 18:09:48.000000000 +0200
> +++ bu3sch-wireless-dev/drivers/char/rocket.c 2007-07-12 01:52:44.000000000 +0200
> @@ -1702,7 +1702,8 @@ static int rp_write(struct tty_struct *t
> if (count <= 0 || rocket_paranoia_check(info, "rp_write"))
> return 0;
>
> - mutex_lock_interruptible(&info->write_mtx);
> + if (mutex_lock_interruptible(&info->write_mtx))
> + return -ERESTARTSYS;
>
> #ifdef ROCKET_DEBUG_WRITE
> printk(KERN_INFO "rp_write %d chars...", count);
>
Thanks, I already have this queued as
rocketc-fix-unchecked-mutex_lock_interruptible.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-12 1:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-11 23:56 [PATCH] rocket: Fix mutex locking compile warning Michael Buesch
2007-07-12 1:27 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox