From: Alex Valys <avalys@optonline.net>
To: linux-kernel@vger.kernel.org
Subject: PATCH: Spinlock Macro Arguments Correction in pc_keyb.c
Date: Thu, 29 Nov 2001 18:33:15 -0500 [thread overview]
Message-ID: <0GNL00C2J5G9JN@mta6.srv.hcvlny.cv.net> (raw)
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 */
next reply other threads:[~2001-11-29 23:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-29 23:33 Alex Valys [this message]
2001-11-30 0:43 ` PATCH: Spinlock Macro Arguments Correction in pc_keyb.c David C. Hansen
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=0GNL00C2J5G9JN@mta6.srv.hcvlny.cv.net \
--to=avalys@optonline.net \
--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;
as well as URLs for NNTP newsgroup(s).