* PATCH: Spinlock Macro Arguments Correction in pc_keyb.c
@ 2001-11-29 23:33 Alex Valys
2001-11-30 0:43 ` David C. Hansen
0 siblings, 1 reply; 2+ messages in thread
From: Alex Valys @ 2001-11-29 23:33 UTC (permalink / raw)
To: linux-kernel
I was compiling 2.5.1-pre3 this evening, and recieved errors to the effect of:
Line xxx:spinlock_unlock used with too many arguments
Line xxxx:spinlock_unlock_irqrestore used with too few arguments
Line XXXX:spinlock_unlock_irqrestore used with too few arguments
Not having ever done any serious kernel programming, I have only a dim
understanding of what spinlocks are, but by looking at those macro
definitions in spinlock.h (and their occurences elsewhere in the file) I
think I determined their proper usage. The following patch fixed the compile
errors, and I'm using 2.5.1-pre3 to type this message.
This is my first patch, so if I did anything wrong please correct me.
-Alex Valys
--- drivers/char/pc_keyb.c.orig Thu Nov 29 18:05:00 2001
+++ drivers/char/pc_keyb.c Thu Nov 29 18:07:14 2001
@@ -420,7 +420,7 @@
kbd_write_command(KBD_CCMD_WRITE_MODE);
kb_wait();
kbd_write_output(AUX_INTS_OFF);
- spin_unlock(&kbd_controller_lock, flags);
+ spin_unlock(&kbd_controller_lock);
}
spin_unlock_irqrestore( &aux_count_lock,flags );
}
@@ -1056,7 +1056,7 @@
fasync_aux(-1, file, 0);
spin_lock_irqsave( &aux_count, flags );
if ( --aux_count ) {
- spin_unlock_irqrestore( &aux_count_lock );
+ spin_unlock_irqrestore( &aux_count_lock, flags );
return 0;
}
spin_unlock_irqrestore( &aux_count_lock, flags );
@@ -1076,7 +1076,7 @@
int flags;
spin_lock_irqsave( &aux_count_lock, flags );
if ( aux_count++ ) {
- spin_unlock_irqrestore( &aux_count_lock );
+ spin_unlock_irqrestore( &aux_count_lock, flags );
return 0;
}
queue->head = queue->tail = 0; /* Flush input queue */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH: Spinlock Macro Arguments Correction in pc_keyb.c
2001-11-29 23:33 PATCH: Spinlock Macro Arguments Correction in pc_keyb.c Alex Valys
@ 2001-11-30 0:43 ` David C. Hansen
0 siblings, 0 replies; 2+ messages in thread
From: David C. Hansen @ 2001-11-30 0:43 UTC (permalink / raw)
To: Alex Valys; +Cc: linux-kernel
Alex Valys wrote:
>Not having ever done any serious kernel programming, I have only a dim
>understanding of what spinlocks are, but by looking at those macro
>definitions in spinlock.h (and their occurences elsewhere in the file) I
>think I determined their proper usage. The following patch fixed the compile
>errors, and I'm using 2.5.1-pre3 to type this message.
>
>This is my first patch, so if I did anything wrong please correct me.
>-Alex Valys
>
That looks like an error as a result of one of my patches. Your
solution looks correct. Make sure to send it over to Linus. Nice job
with your first patch!
David C. Hansen
haveblue@us.ibm.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-11-30 0:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-29 23:33 PATCH: Spinlock Macro Arguments Correction in pc_keyb.c Alex Valys
2001-11-30 0:43 ` David C. Hansen
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).