提交 c9c3b86f 编写于 作者: K Kyle McMartin 提交者: Linus Torvalds

[PATCH] Fix incorrent type of flags in <asm/semaphore.h>

I still think using BUILD_BUG_ON() is unacceptable, especially given how
vague the error message was.
Signed-off-by: NKyle McMartin <kyle@parisc-linux.org>
[ And I already removed gthe BUILD_BUG_ON() in the previous commit ]
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 b8e6ec86
...@@ -115,7 +115,8 @@ extern __inline__ int down_interruptible(struct semaphore * sem) ...@@ -115,7 +115,8 @@ extern __inline__ int down_interruptible(struct semaphore * sem)
*/ */
extern __inline__ int down_trylock(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); spin_lock_irqsave(&sem->sentry, flags);
count = sem->count - 1; count = sem->count - 1;
...@@ -131,7 +132,8 @@ extern __inline__ int down_trylock(struct semaphore * sem) ...@@ -131,7 +132,8 @@ extern __inline__ int down_trylock(struct semaphore * sem)
*/ */
extern __inline__ void up(struct semaphore * sem) extern __inline__ void up(struct semaphore * sem)
{ {
int flags; unsigned long flags;
spin_lock_irqsave(&sem->sentry, flags); spin_lock_irqsave(&sem->sentry, flags);
if (sem->count < 0) { if (sem->count < 0) {
__up(sem); __up(sem);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册