]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] asmlinkage fixes
authorAndrew Morton <akpm@osdl.org>
Wed, 25 Feb 2004 00:12:37 +0000 (16:12 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 25 Feb 2004 00:12:37 +0000 (16:12 -0800)
From: Andreas Gruenbacher <agruen@suse.de>,
      and me.

Latest gcc cvs is able to detect mismatches between functions which are
tagged asmlinkage and declarations which are missing asmlinkage.  Or vice
versa.

Fix up the fallout from an x86 allyesconfig build.

arch/i386/kernel/semaphore.c
arch/i386/math-emu/errors.c
arch/i386/math-emu/fpu_proto.h
drivers/isdn/hysdn/hysdn_defs.h
include/acpi/acpixf.h
include/asm-i386/spinlock.h
include/linux/preempt.h
kernel/exit.c
kernel/power/swsusp.c

index dcdb19179640912218f64d2fccc39c32feb44d67..5acd544f0cbdff2fead57c0e11e5a8c1a8bc7997 100644 (file)
  *    we cannot lose wakeup events.
  */
 
-void __up(struct semaphore *sem)
+asmlinkage void __up(struct semaphore *sem)
 {
        wake_up(&sem->wait);
 }
 
-void __down(struct semaphore * sem)
+asmlinkage void __down(struct semaphore * sem)
 {
        struct task_struct *tsk = current;
        DECLARE_WAITQUEUE(wait, tsk);
@@ -90,7 +90,7 @@ void __down(struct semaphore * sem)
        tsk->state = TASK_RUNNING;
 }
 
-int __down_interruptible(struct semaphore * sem)
+asmlinkage int __down_interruptible(struct semaphore * sem)
 {
        int retval = 0;
        struct task_struct *tsk = current;
@@ -153,7 +153,7 @@ int __down_interruptible(struct semaphore * sem)
  * single "cmpxchg" without failure cases,
  * but then it wouldn't work on a 386.
  */
-int __down_trylock(struct semaphore * sem)
+asmlinkage int __down_trylock(struct semaphore * sem)
 {
        int sleepers;
        unsigned long flags;
index b101bf318efa3e651af61466b4b68f870b19144f..48615454150414a43acb4751628fb4313fe5b43f 100644 (file)
@@ -291,7 +291,7 @@ static struct {
              0x242  in div_Xsig.S
  */
 
-void FPU_exception(int n)
+asmlinkage void FPU_exception(int n)
 {
   int i, int_type;
 
index b5f25b45ac21a17d65bc6393989f259e3b1acbd5..fb61163822bccd0c2ec1d6822e261d9ab94d5ab3 100644 (file)
@@ -9,14 +9,14 @@ asmlinkage void FPU_exception(int n);
 extern int real_1op_NaN(FPU_REG *a);
 extern int real_2op_NaN(FPU_REG const *b, u_char tagb, int deststnr,
                        FPU_REG const *defaultNaN);
-extern int arith_invalid(int deststnr);
-extern int FPU_divide_by_zero(int deststnr, u_char sign);
+asmlinkage int arith_invalid(int deststnr);
+asmlinkage int FPU_divide_by_zero(int deststnr, u_char sign);
 extern int set_precision_flag(int flags);
-extern void set_precision_flag_up(void);
-extern void set_precision_flag_down(void);
-extern int denormal_operand(void);
-extern int arith_overflow(FPU_REG *dest);
-extern int arith_underflow(FPU_REG *dest);
+asmlinkage void set_precision_flag_up(void);
+asmlinkage void set_precision_flag_down(void);
+asmlinkage int denormal_operand(void);
+asmlinkage int arith_overflow(FPU_REG *dest);
+asmlinkage int arith_underflow(FPU_REG *dest);
 extern void FPU_stack_overflow(void);
 extern void FPU_stack_underflow(void);
 extern void FPU_stack_underflow_i(int i);
index ce411e38d11aec313af2bd3ee3df2fb74618b83d..4cee26e558eedad031f528451ae9414f954d28a9 100644 (file)
@@ -235,7 +235,6 @@ extern hysdn_card *card_root;       /* pointer to first card */
 /*************************/
 /* im/exported functions */
 /*************************/
-extern int printk(const char *fmt,...);
 extern char *hysdn_getrev(const char *);
 
 /* hysdn_procconf.c */
index fcebceb3e23a311c22af234bda3d8dc095324b63..8ed497c30a6416a147aec3d85e7c56198029af94 100644 (file)
@@ -446,7 +446,7 @@ acpi_status
 acpi_enter_sleep_state_prep (
        u8                              sleep_state);
 
-acpi_status
+acpi_status asmlinkage
 acpi_enter_sleep_state (
        u8                              sleep_state);
 
index 47cb9c591a2ee29be6960574cf3a6a6b73734948..e8951167500109ac0ee95e2eb6699b435ce06f25 100644 (file)
@@ -7,7 +7,7 @@
 #include <linux/config.h>
 #include <linux/compiler.h>
 
-extern int printk(const char * fmt, ...)
+asmlinkage int printk(const char * fmt, ...)
        __attribute__ ((format (printf, 1, 2)));
 
 /*
index 0bd40fb2048f3a5e4e4d7e98f81285c032dfa567..a7ad90136d6429cccd579677eba7b4392f235dff 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <linux/config.h>
+#include <linux/linkage.h>
 
 #define preempt_count()        (current_thread_info()->preempt_count)
 
@@ -22,7 +23,7 @@ do { \
 
 #ifdef CONFIG_PREEMPT
 
-extern void preempt_schedule(void);
+asmlinkage void preempt_schedule(void);
 
 #define preempt_disable() \
 do { \
index 374b01755aa4ae6776fa0f747c00611f02735794..bbde654c70a7ad2795e2fd89a2e35a5863231ad6 100644 (file)
@@ -743,7 +743,7 @@ static void exit_notify(struct task_struct *tsk)
 
 }
 
-NORET_TYPE void do_exit(long code)
+asmlinkage NORET_TYPE void do_exit(long code)
 {
        struct task_struct *tsk = current;
 
index 7ca52f296f787ce4fcb5a6108689d310fcbc2f2a..a2819d415cb71115176e3655ce388c16687949a1 100644 (file)
@@ -71,8 +71,6 @@
 
 unsigned char software_suspend_enabled = 0;
 
-extern void do_magic(int resume);
-
 #define NORESUME               1
 #define RESUME_SPECIFIED       2
 
@@ -583,7 +581,7 @@ static void suspend_power_down(void)
  * Magic happens here
  */
 
-void do_magic_resume_1(void)
+asmlinkage void do_magic_resume_1(void)
 {
        barrier();
        mb();
@@ -596,7 +594,7 @@ void do_magic_resume_1(void)
                           driver scheduled DMA, we have good chance for DMA to finish ;-). */
 }
 
-void do_magic_resume_2(void)
+asmlinkage void do_magic_resume_2(void)
 {
        BUG_ON (nr_copy_pages_check != nr_copy_pages);
        BUG_ON (pagedir_order_check != pagedir_order);
@@ -640,7 +638,7 @@ void do_magic_resume_2(void)
 
  */
 
-void do_magic_suspend_1(void)
+asmlinkage void do_magic_suspend_1(void)
 {
        mb();
        barrier();
@@ -648,7 +646,7 @@ void do_magic_suspend_1(void)
        spin_lock_irq(&suspend_pagedir_lock);
 }
 
-void do_magic_suspend_2(void)
+asmlinkage void do_magic_suspend_2(void)
 {
        int is_problem;
        read_swapfiles();