aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-03-19 23:23:53 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2018-03-20 12:03:46 -0400
commitee076e81fc14ca79334d02970cea66604f183a14 (patch)
tree42b3f69470e4828c35a425ead634d661e49d606f
parentb925c46c81104d170719b58e10f4375299109b8a (diff)
sparc: trivial conversions to {COMPAT_,}SYSCALL_DEFINE()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--arch/sparc/kernel/sys_sparc32.c22
-rw-r--r--arch/sparc/kernel/sys_sparc_32.c16
-rw-r--r--arch/sparc/kernel/sys_sparc_64.c4
-rw-r--r--arch/sparc/kernel/systbls.h2
4 files changed, 22 insertions, 22 deletions
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c
index 9b0c569267bf..d01b99258de2 100644
--- a/arch/sparc/kernel/sys_sparc32.c
+++ b/arch/sparc/kernel/sys_sparc32.c
@@ -98,8 +98,8 @@ static int cp_compat_stat64(struct kstat *stat,
98 return err; 98 return err;
99} 99}
100 100
101asmlinkage long compat_sys_stat64(const char __user * filename, 101COMPAT_SYSCALL_DEFINE2(stat64, const char __user *, filename,
102 struct compat_stat64 __user *statbuf) 102 struct compat_stat64 __user *, statbuf)
103{ 103{
104 struct kstat stat; 104 struct kstat stat;
105 int error = vfs_stat(filename, &stat); 105 int error = vfs_stat(filename, &stat);
@@ -109,8 +109,8 @@ asmlinkage long compat_sys_stat64(const char __user * filename,
109 return error; 109 return error;
110} 110}
111 111
112asmlinkage long compat_sys_lstat64(const char __user * filename, 112COMPAT_SYSCALL_DEFINE2(lstat64, const char __user *, filename,
113 struct compat_stat64 __user *statbuf) 113 struct compat_stat64 __user *, statbuf)
114{ 114{
115 struct kstat stat; 115 struct kstat stat;
116 int error = vfs_lstat(filename, &stat); 116 int error = vfs_lstat(filename, &stat);
@@ -120,8 +120,8 @@ asmlinkage long compat_sys_lstat64(const char __user * filename,
120 return error; 120 return error;
121} 121}
122 122
123asmlinkage long compat_sys_fstat64(unsigned int fd, 123COMPAT_SYSCALL_DEFINE2(fstat64, unsigned int, fd,
124 struct compat_stat64 __user * statbuf) 124 struct compat_stat64 __user *, statbuf)
125{ 125{
126 struct kstat stat; 126 struct kstat stat;
127 int error = vfs_fstat(fd, &stat); 127 int error = vfs_fstat(fd, &stat);
@@ -131,9 +131,9 @@ asmlinkage long compat_sys_fstat64(unsigned int fd,
131 return error; 131 return error;
132} 132}
133 133
134asmlinkage long compat_sys_fstatat64(unsigned int dfd, 134COMPAT_SYSCALL_DEFINE4(fstatat64, unsigned int, dfd,
135 const char __user *filename, 135 const char __user *, filename,
136 struct compat_stat64 __user * statbuf, int flag) 136 struct compat_stat64 __user *, statbuf, int, flag)
137{ 137{
138 struct kstat stat; 138 struct kstat stat;
139 int error; 139 int error;
@@ -241,8 +241,8 @@ long sys32_sync_file_range(unsigned int fd, unsigned long off_high, unsigned lon
241 flags); 241 flags);
242} 242}
243 243
244asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offhi, u32 offlo, 244COMPAT_SYSCALL_DEFINE6(fallocate, int, fd, int, mode, u32, offhi, u32, offlo,
245 u32 lenhi, u32 lenlo) 245 u32, lenhi, u32, lenlo)
246{ 246{
247 return sys_fallocate(fd, mode, ((loff_t)offhi << 32) | offlo, 247 return sys_fallocate(fd, mode, ((loff_t)offhi << 32) | offlo,
248 ((loff_t)lenhi << 32) | lenlo); 248 ((loff_t)lenhi << 32) | lenlo);
diff --git a/arch/sparc/kernel/sys_sparc_32.c b/arch/sparc/kernel/sys_sparc_32.c
index c47e9423a25c..e7d326af76d6 100644
--- a/arch/sparc/kernel/sys_sparc_32.c
+++ b/arch/sparc/kernel/sys_sparc_32.c
@@ -34,7 +34,7 @@
34/* XXX Make this per-binary type, this way we can detect the type of 34/* XXX Make this per-binary type, this way we can detect the type of
35 * XXX a binary. Every Sparc executable calls this very early on. 35 * XXX a binary. Every Sparc executable calls this very early on.
36 */ 36 */
37asmlinkage unsigned long sys_getpagesize(void) 37SYSCALL_DEFINE0(getpagesize)
38{ 38{
39 return PAGE_SIZE; /* Possibly older binaries want 8192 on sun4's? */ 39 return PAGE_SIZE; /* Possibly older binaries want 8192 on sun4's? */
40} 40}
@@ -98,9 +98,9 @@ int sparc_mmap_check(unsigned long addr, unsigned long len)
98 98
99/* Linux version of mmap */ 99/* Linux version of mmap */
100 100
101asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, 101SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len,
102 unsigned long prot, unsigned long flags, unsigned long fd, 102 unsigned long, prot, unsigned long, flags, unsigned long, fd,
103 unsigned long pgoff) 103 unsigned long, pgoff)
104{ 104{
105 /* Make sure the shift for mmap2 is constant (12), no matter what PAGE_SIZE 105 /* Make sure the shift for mmap2 is constant (12), no matter what PAGE_SIZE
106 we have. */ 106 we have. */
@@ -108,9 +108,9 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
108 pgoff >> (PAGE_SHIFT - 12)); 108 pgoff >> (PAGE_SHIFT - 12));
109} 109}
110 110
111asmlinkage long sys_mmap(unsigned long addr, unsigned long len, 111SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
112 unsigned long prot, unsigned long flags, unsigned long fd, 112 unsigned long, prot, unsigned long, flags, unsigned long, fd,
113 unsigned long off) 113 unsigned long, off)
114{ 114{
115 /* no alignment check? */ 115 /* no alignment check? */
116 return sys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT); 116 return sys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT);
@@ -202,7 +202,7 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig,
202 return ret; 202 return ret;
203} 203}
204 204
205asmlinkage long sys_getdomainname(char __user *name, int len) 205SYSCALL_DEFINE2(getdomainname, char __user *, name, int, len)
206{ 206{
207 int nlen, err; 207 int nlen, err;
208 208
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
index 180c536602bd..c15765539f65 100644
--- a/arch/sparc/kernel/sys_sparc_64.c
+++ b/arch/sparc/kernel/sys_sparc_64.c
@@ -39,7 +39,7 @@
39 39
40/* #define DEBUG_UNIMP_SYSCALL */ 40/* #define DEBUG_UNIMP_SYSCALL */
41 41
42asmlinkage unsigned long sys_getpagesize(void) 42SYSCALL_DEFINE0(getpagesize)
43{ 43{
44 return PAGE_SIZE; 44 return PAGE_SIZE;
45} 45}
@@ -642,7 +642,7 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act,
642 return ret; 642 return ret;
643} 643}
644 644
645asmlinkage long sys_kern_features(void) 645SYSCALL_DEFINE0(kern_features)
646{ 646{
647 return KERN_FEATURE_MIXED_MODE_STACK; 647 return KERN_FEATURE_MIXED_MODE_STACK;
648} 648}
diff --git a/arch/sparc/kernel/systbls.h b/arch/sparc/kernel/systbls.h
index 4aca08e3ddef..432aa84ad009 100644
--- a/arch/sparc/kernel/systbls.h
+++ b/arch/sparc/kernel/systbls.h
@@ -9,7 +9,7 @@
9 9
10#include <asm/utrap.h> 10#include <asm/utrap.h>
11 11
12asmlinkage unsigned long sys_getpagesize(void); 12asmlinkage long sys_getpagesize(void);
13asmlinkage long sys_sparc_pipe(void); 13asmlinkage long sys_sparc_pipe(void);
14asmlinkage unsigned long c_sys_nis_syscall(struct pt_regs *regs); 14asmlinkage unsigned long c_sys_nis_syscall(struct pt_regs *regs);
15asmlinkage long sys_getdomainname(char __user *name, int len); 15asmlinkage long sys_getdomainname(char __user *name, int len);