Skip to contentSkip to conversation

i386 semaphore.c: make 4 functions static

PATCH New Adrian Bunk 1 participant 1 message Dec 11, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i386 semaphore.c: make 4 functions static

The patch below makes four needlessly global functions static.

diffstat output:

 arch/i386/kernel/semaphore.c |    8 ++++----
 include/asm-i386/semaphore.h |    5 -----
 2 files changed, 4 insertions(+), 9 deletions(-)
include/asm-i386/semaphore.h renamed from include/asm-i386/semaphore.h.old +0 -5
@@ -92,11 +92,6 @@
 fastcall int  __down_failed_trylock(void  /* params in registers */);
 fastcall void __up_wakeup(void /* special register calling convention */);
 
-fastcall void __down(struct semaphore * sem);
-fastcall int  __down_interruptible(struct semaphore * sem);
-fastcall int  __down_trylock(struct semaphore * sem);
-fastcall void __up(struct semaphore * sem);
-
 /*
  * This is ugly, but we want the default case to fall through.
  * "__down_failed" is a special asm handler that calls the C
arch/i386/kernel/semaphore.c renamed from arch/i386/kernel/semaphore.c.old +4 -4
@@ -49,12 +49,12 @@
  *    we cannot lose wakeup events.
  */
 
-fastcall void __up(struct semaphore *sem)
+static fastcall void __attribute_used__  __up(struct semaphore *sem)
 {
 	wake_up(&sem->wait);
 }
 
-fastcall void __sched __down(struct semaphore * sem)
+static fastcall void __attribute_used__ __sched __down(struct semaphore * sem)
 {
 	struct task_struct *tsk = current;
 	DECLARE_WAITQUEUE(wait, tsk);
@@ -91,7 +91,7 @@
 	tsk->state = TASK_RUNNING;
 }
 
-fastcall int __sched __down_interruptible(struct semaphore * sem)
+static fastcall int __attribute_used__ __sched __down_interruptible(struct semaphore * sem)
 {
 	int retval = 0;
 	struct task_struct *tsk = current;
@@ -154,7 +154,7 @@
  * single "cmpxchg" without failure cases,
  * but then it wouldn't work on a 386.
  */
-fastcall int __down_trylock(struct semaphore * sem)
+static fastcall int __attribute_used__ __down_trylock(struct semaphore * sem)
 {
 	int sleepers;
 	unsigned long flags;