diff options
author | Arnd Bergmann <arnd@arndb.de> | 2009-06-27 09:12:16 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2009-06-27 09:14:58 -0400 |
commit | bddc605955bca2d914ca621a7ef4ca6c271f55d8 (patch) | |
tree | 7cbdf36efa44d35d5ee6b7a73771004e8a92bc7f | |
parent | a1f8213b9518d0e9124a48a34bdd58b4bc2650e5 (diff) |
score: fix function prototypes
Syscalls should return 'long' and be marked as 'asmlinkage'.
Functions that are only used in a single file should be 'static'.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | arch/score/kernel/signal.c | 22 | ||||
-rw-r--r-- | arch/score/kernel/sys_score.c | 5 | ||||
-rw-r--r-- | arch/score/kernel/time.c | 2 |
3 files changed, 17 insertions, 12 deletions
diff --git a/arch/score/kernel/signal.c b/arch/score/kernel/signal.c index 1634aaa7c2ba..afbfe33dcf17 100644 --- a/arch/score/kernel/signal.c +++ b/arch/score/kernel/signal.c | |||
@@ -42,7 +42,7 @@ struct rt_sigframe { | |||
42 | struct ucontext rs_uc; | 42 | struct ucontext rs_uc; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) | 45 | static int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) |
46 | { | 46 | { |
47 | int err = 0; | 47 | int err = 0; |
48 | unsigned long reg; | 48 | unsigned long reg; |
@@ -76,7 +76,7 @@ int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) | |||
76 | return err; | 76 | return err; |
77 | } | 77 | } |
78 | 78 | ||
79 | int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) | 79 | static int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) |
80 | { | 80 | { |
81 | int err = 0; | 81 | int err = 0; |
82 | u32 reg; | 82 | u32 reg; |
@@ -118,8 +118,8 @@ int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) | |||
118 | /* | 118 | /* |
119 | * Determine which stack to use.. | 119 | * Determine which stack to use.. |
120 | */ | 120 | */ |
121 | void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, | 121 | static void __user *get_sigframe(struct k_sigaction *ka, |
122 | size_t frame_size) | 122 | struct pt_regs *regs, size_t frame_size) |
123 | { | 123 | { |
124 | unsigned long sp; | 124 | unsigned long sp; |
125 | 125 | ||
@@ -134,7 +134,8 @@ void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, | |||
134 | return (void __user*)((sp - frame_size) & ~7); | 134 | return (void __user*)((sp - frame_size) & ~7); |
135 | } | 135 | } |
136 | 136 | ||
137 | int score_sigaltstack(struct pt_regs *regs) | 137 | asmlinkage long |
138 | score_sigaltstack(struct pt_regs *regs) | ||
138 | { | 139 | { |
139 | const stack_t __user *uss = (const stack_t __user *) regs->regs[4]; | 140 | const stack_t __user *uss = (const stack_t __user *) regs->regs[4]; |
140 | stack_t __user *uoss = (stack_t __user *) regs->regs[5]; | 141 | stack_t __user *uoss = (stack_t __user *) regs->regs[5]; |
@@ -143,7 +144,8 @@ int score_sigaltstack(struct pt_regs *regs) | |||
143 | return do_sigaltstack(uss, uoss, usp); | 144 | return do_sigaltstack(uss, uoss, usp); |
144 | } | 145 | } |
145 | 146 | ||
146 | void score_rt_sigreturn(struct pt_regs *regs) | 147 | asmlinkage long |
148 | score_rt_sigreturn(struct pt_regs *regs) | ||
147 | { | 149 | { |
148 | struct rt_sigframe __user *frame; | 150 | struct rt_sigframe __user *frame; |
149 | sigset_t set; | 151 | sigset_t set; |
@@ -183,9 +185,11 @@ void score_rt_sigreturn(struct pt_regs *regs) | |||
183 | 185 | ||
184 | badframe: | 186 | badframe: |
185 | force_sig(SIGSEGV, current); | 187 | force_sig(SIGSEGV, current); |
188 | |||
189 | return 0; | ||
186 | } | 190 | } |
187 | 191 | ||
188 | int setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs, | 192 | static int setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs, |
189 | int signr, sigset_t *set, siginfo_t *info) | 193 | int signr, sigset_t *set, siginfo_t *info) |
190 | { | 194 | { |
191 | struct rt_sigframe __user *frame; | 195 | struct rt_sigframe __user *frame; |
@@ -238,7 +242,7 @@ give_sigsegv: | |||
238 | return -EFAULT; | 242 | return -EFAULT; |
239 | } | 243 | } |
240 | 244 | ||
241 | int handle_signal(unsigned long sig, siginfo_t *info, | 245 | static int handle_signal(unsigned long sig, siginfo_t *info, |
242 | struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs) | 246 | struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs) |
243 | { | 247 | { |
244 | int ret; | 248 | int ret; |
@@ -278,7 +282,7 @@ int handle_signal(unsigned long sig, siginfo_t *info, | |||
278 | return ret; | 282 | return ret; |
279 | } | 283 | } |
280 | 284 | ||
281 | void do_signal(struct pt_regs *regs) | 285 | static void do_signal(struct pt_regs *regs) |
282 | { | 286 | { |
283 | struct k_sigaction ka; | 287 | struct k_sigaction ka; |
284 | sigset_t *oldset; | 288 | sigset_t *oldset; |
diff --git a/arch/score/kernel/sys_score.c b/arch/score/kernel/sys_score.c index 16ace29935bb..5b3cc4e685ae 100644 --- a/arch/score/kernel/sys_score.c +++ b/arch/score/kernel/sys_score.c | |||
@@ -34,7 +34,7 @@ | |||
34 | unsigned long shm_align_mask = PAGE_SIZE - 1; | 34 | unsigned long shm_align_mask = PAGE_SIZE - 1; |
35 | EXPORT_SYMBOL(shm_align_mask); | 35 | EXPORT_SYMBOL(shm_align_mask); |
36 | 36 | ||
37 | asmlinkage unsigned long | 37 | asmlinkage unsigned |
38 | sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, | 38 | sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, |
39 | unsigned long flags, unsigned long fd, unsigned long pgoff) | 39 | unsigned long flags, unsigned long fd, unsigned long pgoff) |
40 | { | 40 | { |
@@ -66,7 +66,8 @@ sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, | |||
66 | * Clone a task - this clones the calling program thread. | 66 | * Clone a task - this clones the calling program thread. |
67 | * This is called indirectly via a small wrapper | 67 | * This is called indirectly via a small wrapper |
68 | */ | 68 | */ |
69 | int score_clone(struct pt_regs *regs) | 69 | asmlinkage long |
70 | score_clone(struct pt_regs *regs) | ||
70 | { | 71 | { |
71 | unsigned long clone_flags; | 72 | unsigned long clone_flags; |
72 | unsigned long newsp; | 73 | unsigned long newsp; |
diff --git a/arch/score/kernel/time.c b/arch/score/kernel/time.c index cd66ba327ca7..f0a43affb201 100644 --- a/arch/score/kernel/time.c +++ b/arch/score/kernel/time.c | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | #include <asm/scoreregs.h> | 29 | #include <asm/scoreregs.h> |
30 | 30 | ||
31 | irqreturn_t timer_interrupt(int irq, void *dev_id) | 31 | static irqreturn_t timer_interrupt(int irq, void *dev_id) |
32 | { | 32 | { |
33 | struct clock_event_device *evdev = dev_id; | 33 | struct clock_event_device *evdev = dev_id; |
34 | 34 | ||