Commit 958b7b07 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by David S. Miller

sparc32: fix sparse warnings in sys_sparc_32.c

Fix following warnings:
sys_sparc_32.c:32:26: warning: symbol 'sys_getpagesize' was not declared. Should it be static?
sys_sparc_32.c:71:16: warning: symbol 'sparc_pipe' was not declared. Should it be static?
sys_sparc_32.c:96:26: warning: symbol 'sys_mmap2' was not declared. Should it be static?
sys_sparc_32.c:106:26: warning: symbol 'sys_mmap' was not declared. Should it be static?
sys_sparc_32.c:114:6: warning: symbol 'sparc_remap_file_pages' was not declared. Should it be static?
sys_sparc_32.c:127:1: warning: symbol 'c_sys_nis_syscall' was not declared. Should it be static?
sys_sparc_32.c:144:1: warning: symbol 'sparc_breakpoint' was not declared. Should it be static?
sys_sparc_32.c:200:16: warning: symbol 'sys_getdomainname' was not declared. Should it be static?

Adapt systbls.h for use by both sparc32 + sparc64.
In the process modify the return type of a few functions.

Change return type from unsigned long to long:
sys_mmap2()
sys_mmap()

Change return type from int to long:
sparc_pipe()
sys_getdomainname()

The changed return type was done to align with sparc64.
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fcea8b27
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/unistd.h> #include <asm/unistd.h>
#include "systbls.h"
/* #define DEBUG_UNIMP_SYSCALL */ /* #define DEBUG_UNIMP_SYSCALL */
/* XXX Make this per-binary type, this way we can detect the type of /* XXX Make this per-binary type, this way we can detect the type of
...@@ -68,7 +70,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi ...@@ -68,7 +70,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
* sys_pipe() is the normal C calling standard for creating * sys_pipe() is the normal C calling standard for creating
* a pipe. It's not the way unix traditionally does this, though. * a pipe. It's not the way unix traditionally does this, though.
*/ */
asmlinkage int sparc_pipe(struct pt_regs *regs) asmlinkage long sparc_pipe(struct pt_regs *regs)
{ {
int fd[2]; int fd[2];
int error; int error;
...@@ -93,7 +95,7 @@ int sparc_mmap_check(unsigned long addr, unsigned long len) ...@@ -93,7 +95,7 @@ int sparc_mmap_check(unsigned long addr, unsigned long len)
/* Linux version of mmap */ /* Linux version of mmap */
asmlinkage unsigned long sys_mmap2(unsigned long addr, unsigned long len, asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags, unsigned long fd, unsigned long prot, unsigned long flags, unsigned long fd,
unsigned long pgoff) unsigned long pgoff)
{ {
...@@ -103,7 +105,7 @@ asmlinkage unsigned long sys_mmap2(unsigned long addr, unsigned long len, ...@@ -103,7 +105,7 @@ asmlinkage unsigned long sys_mmap2(unsigned long addr, unsigned long len,
pgoff >> (PAGE_SHIFT - 12)); pgoff >> (PAGE_SHIFT - 12));
} }
asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len, asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags, unsigned long fd, unsigned long prot, unsigned long flags, unsigned long fd,
unsigned long off) unsigned long off)
{ {
...@@ -197,7 +199,7 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig, ...@@ -197,7 +199,7 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig,
return ret; return ret;
} }
asmlinkage int sys_getdomainname(char __user *name, int len) asmlinkage long sys_getdomainname(char __user *name, int len)
{ {
int nlen, err; int nlen, err;
......
...@@ -6,36 +6,47 @@ ...@@ -6,36 +6,47 @@
#include <linux/signal.h> #include <linux/signal.h>
#include <asm/utrap.h> #include <asm/utrap.h>
extern asmlinkage unsigned long sys_getpagesize(void); asmlinkage unsigned long sys_getpagesize(void);
extern asmlinkage long sparc_pipe(struct pt_regs *regs); asmlinkage long sparc_pipe(struct pt_regs *regs);
extern asmlinkage long sys_sparc_ipc(unsigned int call, int first, asmlinkage unsigned long c_sys_nis_syscall(struct pt_regs *regs);
asmlinkage long sys_getdomainname(char __user *name, int len);
void do_rt_sigreturn(struct pt_regs *regs);
asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long off);
asmlinkage void sparc_breakpoint(struct pt_regs *regs);
#ifdef CONFIG_SPARC32
asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long pgoff);
long sparc_remap_file_pages(unsigned long start, unsigned long size,
unsigned long prot, unsigned long pgoff,
unsigned long flags);
#endif /* CONFIG_SPARC32 */
#ifdef CONFIG_SPARC64
asmlinkage long sys_sparc_ipc(unsigned int call, int first,
unsigned long second, unsigned long second,
unsigned long third, unsigned long third,
void __user *ptr, long fifth); void __user *ptr, long fifth);
extern asmlinkage long sparc64_personality(unsigned long personality); asmlinkage long sparc64_personality(unsigned long personality);
extern asmlinkage long sys64_munmap(unsigned long addr, size_t len); asmlinkage long sys64_munmap(unsigned long addr, size_t len);
extern asmlinkage unsigned long sys64_mremap(unsigned long addr, asmlinkage unsigned long sys64_mremap(unsigned long addr,
unsigned long old_len, unsigned long old_len,
unsigned long new_len, unsigned long new_len,
unsigned long flags, unsigned long flags,
unsigned long new_addr); unsigned long new_addr);
extern asmlinkage unsigned long c_sys_nis_syscall(struct pt_regs *regs); asmlinkage long sys_utrap_install(utrap_entry_t type,
extern asmlinkage long sys_getdomainname(char __user *name, int len);
extern asmlinkage long sys_utrap_install(utrap_entry_t type,
utrap_handler_t new_p, utrap_handler_t new_p,
utrap_handler_t new_d, utrap_handler_t new_d,
utrap_handler_t __user *old_p, utrap_handler_t __user *old_p,
utrap_handler_t __user *old_d); utrap_handler_t __user *old_d);
extern asmlinkage long sparc_memory_ordering(unsigned long model, asmlinkage long sparc_memory_ordering(unsigned long model,
struct pt_regs *regs); struct pt_regs *regs);
extern asmlinkage long sys_rt_sigaction(int sig, asmlinkage void sparc64_set_context(struct pt_regs *regs);
const struct sigaction __user *act, asmlinkage void sparc64_get_context(struct pt_regs *regs);
struct sigaction __user *oact,
void __user *restorer,
size_t sigsetsize);
extern asmlinkage void sparc64_set_context(struct pt_regs *regs);
extern asmlinkage void sparc64_get_context(struct pt_regs *regs);
extern void do_rt_sigreturn(struct pt_regs *regs);
#endif /* CONFIG_SPARC64 */
#endif /* _SYSTBLS_H */ #endif /* _SYSTBLS_H */
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