Commit 4c238c91 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] asmlinkage fixes

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.
parent 0bab0642
......@@ -48,12 +48,12 @@
* 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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -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 */
......
......@@ -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);
......
......@@ -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)));
/*
......
......@@ -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 { \
......
......@@ -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;
......
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment