Skip to content

Commit

Permalink
[PATCH] Fix incorrent type of flags in <asm/semaphore.h>
Browse files Browse the repository at this point in the history
I still think using BUILD_BUG_ON() is unacceptable, especially given how
vague the error message was.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
[ And I already removed gthe BUILD_BUG_ON() in the previous commit ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Kyle McMartin authored and Linus Torvalds committed Nov 27, 2006
1 parent b8e6ec8 commit c9c3b86
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/asm-parisc/semaphore.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ extern __inline__ int down_interruptible(struct semaphore * sem)
*/
extern __inline__ int down_trylock(struct semaphore * sem)
{
int flags, count;
unsigned long flags;
int count;

spin_lock_irqsave(&sem->sentry, flags);
count = sem->count - 1;
Expand All @@ -131,7 +132,8 @@ extern __inline__ int down_trylock(struct semaphore * sem)
*/
extern __inline__ void up(struct semaphore * sem)
{
int flags;
unsigned long flags;

spin_lock_irqsave(&sem->sentry, flags);
if (sem->count < 0) {
__up(sem);
Expand Down

0 comments on commit c9c3b86

Please sign in to comment.