From cf59843bed891f87726abac576adcf2775b235af Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sat, 22 Mar 2003 07:35:35 -0800 Subject: [PATCH] [PATCH] Make arch-independent syscalls return long From: "Randy.Dunlap" Fix up various syscalls to return longs, as x86_64 and ia64 (at least) require. --- arch/x86_64/ia32/sys_ia32.c | 4 ++-- fs/dcookies.c | 2 +- fs/readdir.c | 2 +- include/linux/mm.h | 2 +- kernel/fork.c | 2 +- kernel/sched.c | 4 ++-- kernel/signal.c | 2 +- mm/fremap.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c index ad99f443c35bd..ad6cfdcf6afd5 100644 --- a/arch/x86_64/ia32/sys_ia32.c +++ b/arch/x86_64/ia32/sys_ia32.c @@ -2071,8 +2071,8 @@ long sys32_module_warning(void) return -ENOSYS ; } -int sys_sched_getaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr); -int sys_sched_setaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr); +long sys_sched_getaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr); +long sys_sched_setaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr); /* only works on LE */ long sys32_sched_setaffinity(pid_t pid, unsigned int len, diff --git a/fs/dcookies.c b/fs/dcookies.c index 51547b4944e4d..7365acccf3911 100644 --- a/fs/dcookies.c +++ b/fs/dcookies.c @@ -142,7 +142,7 @@ out: /* And here is where the userspace process can look up the cookie value * to retrieve the path. */ -asmlinkage int sys_lookup_dcookie(u64 cookie64, char * buf, size_t len) +asmlinkage long sys_lookup_dcookie(u64 cookie64, char * buf, size_t len) { unsigned long cookie = (unsigned long)cookie64; int err = -EINVAL; diff --git a/fs/readdir.c b/fs/readdir.c index 2ee6de9550f73..539e9900df405 100644 --- a/fs/readdir.c +++ b/fs/readdir.c @@ -85,7 +85,7 @@ static int fillonedir(void * __buf, const char * name, int namlen, loff_t offset return 0; } -asmlinkage int old_readdir(unsigned int fd, void * dirent, unsigned int count) +asmlinkage long old_readdir(unsigned int fd, void * dirent, unsigned int count) { int error; struct file * file; diff --git a/include/linux/mm.h b/include/linux/mm.h index 637c7569c68ed..f6482a63c2508 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -421,7 +421,7 @@ extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsign extern int handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, unsigned long address, int write_access); extern int make_pages_present(unsigned long addr, unsigned long end); extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); -extern int sys_remap_file_pages(unsigned long start, unsigned long size, unsigned long prot, unsigned long pgoff, unsigned long nonblock); +extern long sys_remap_file_pages(unsigned long start, unsigned long size, unsigned long prot, unsigned long pgoff, unsigned long nonblock); int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, diff --git a/kernel/fork.c b/kernel/fork.c index 420d4ff55234f..fececf441ae55 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -736,7 +736,7 @@ static inline void copy_flags(unsigned long clone_flags, struct task_struct *p) p->flags = new_flags; } -asmlinkage int sys_set_tid_address(int *tidptr) +asmlinkage long sys_set_tid_address(int *tidptr) { current->clear_child_tid = tidptr; diff --git a/kernel/sched.c b/kernel/sched.c index caeca9ec9c218..b9f25278340f6 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1902,7 +1902,7 @@ out_unlock: * @len: length in bytes of the bitmask pointed to by user_mask_ptr * @user_mask_ptr: user-space pointer to the new cpu mask */ -asmlinkage int sys_sched_setaffinity(pid_t pid, unsigned int len, +asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len, unsigned long *user_mask_ptr) { unsigned long new_mask; @@ -1954,7 +1954,7 @@ out_unlock: * @len: length in bytes of the bitmask pointed to by user_mask_ptr * @user_mask_ptr: user-space pointer to hold the current cpu mask */ -asmlinkage int sys_sched_getaffinity(pid_t pid, unsigned int len, +asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len, unsigned long *user_mask_ptr) { unsigned int real_len; diff --git a/kernel/signal.c b/kernel/signal.c index 7f630c0261e09..488134eec0e2a 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -2254,7 +2254,7 @@ sys_signal(int sig, __sighandler_t handler) #ifndef HAVE_ARCH_SYS_PAUSE -asmlinkage int +asmlinkage long sys_pause(void) { current->state = TASK_INTERRUPTIBLE; diff --git a/mm/fremap.c b/mm/fremap.c index 0ad1355383199..489ae9eab0bc1 100644 --- a/mm/fremap.c +++ b/mm/fremap.c @@ -113,7 +113,7 @@ err: * protection is used. Arbitrary protections might be implemented in the * future. */ -int sys_remap_file_pages(unsigned long start, unsigned long size, +long sys_remap_file_pages(unsigned long start, unsigned long size, unsigned long __prot, unsigned long pgoff, unsigned long flags) { struct mm_struct *mm = current->mm; -- 2.53.0