diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2011-05-17 14:41:06 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2011-05-19 22:54:55 -0400 |
commit | 4800a5bb13c09a572f7c74662a77c9eca229eba1 (patch) | |
tree | beb43b906dea7b22a959121f26d4e0bf39752627 /include | |
parent | dd196a2b3dbd192ff3ccf263d12b59bf22572958 (diff) |
include/linux/compat.h: coding-style fixes
I touched this file when adding support for the "tilegx" sub-architecture,
and Andrew Morton observed "The file's a mismash of old-style, wrong-style
and right-style. There's no point in doing mishmash preservation!
May as well fix things up when we touch them."
Accordingly, this change makes <linux/compat.h> as checkpatch-clean
as possible. It makes no semantic changes whatsoever.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/compat.h | 74 |
1 files changed, 41 insertions, 33 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index e94184834b71..644e1a4692b1 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -27,7 +27,7 @@ typedef __compat_gid32_t compat_gid_t; | |||
27 | struct compat_sel_arg_struct; | 27 | struct compat_sel_arg_struct; |
28 | struct rusage; | 28 | struct rusage; |
29 | 29 | ||
30 | struct compat_itimerspec { | 30 | struct compat_itimerspec { |
31 | struct compat_timespec it_interval; | 31 | struct compat_timespec it_interval; |
32 | struct compat_timespec it_value; | 32 | struct compat_timespec it_value; |
33 | }; | 33 | }; |
@@ -71,9 +71,9 @@ struct compat_timex { | |||
71 | compat_long_t stbcnt; | 71 | compat_long_t stbcnt; |
72 | compat_int_t tai; | 72 | compat_int_t tai; |
73 | 73 | ||
74 | compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32; | 74 | compat_int_t:32; compat_int_t:32; compat_int_t:32; compat_int_t:32; |
75 | compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32; | 75 | compat_int_t:32; compat_int_t:32; compat_int_t:32; compat_int_t:32; |
76 | compat_int_t :32; compat_int_t :32; compat_int_t :32; | 76 | compat_int_t:32; compat_int_t:32; compat_int_t:32; |
77 | }; | 77 | }; |
78 | 78 | ||
79 | #define _COMPAT_NSIG_WORDS (_COMPAT_NSIG / _COMPAT_NSIG_BPW) | 79 | #define _COMPAT_NSIG_WORDS (_COMPAT_NSIG / _COMPAT_NSIG_BPW) |
@@ -82,8 +82,10 @@ typedef struct { | |||
82 | compat_sigset_word sig[_COMPAT_NSIG_WORDS]; | 82 | compat_sigset_word sig[_COMPAT_NSIG_WORDS]; |
83 | } compat_sigset_t; | 83 | } compat_sigset_t; |
84 | 84 | ||
85 | extern int get_compat_timespec(struct timespec *, const struct compat_timespec __user *); | 85 | extern int get_compat_timespec(struct timespec *, |
86 | extern int put_compat_timespec(const struct timespec *, struct compat_timespec __user *); | 86 | const struct compat_timespec __user *); |
87 | extern int put_compat_timespec(const struct timespec *, | ||
88 | struct compat_timespec __user *); | ||
87 | 89 | ||
88 | struct compat_iovec { | 90 | struct compat_iovec { |
89 | compat_uptr_t iov_base; | 91 | compat_uptr_t iov_base; |
@@ -114,7 +116,8 @@ struct compat_rusage { | |||
114 | compat_long_t ru_nivcsw; | 116 | compat_long_t ru_nivcsw; |
115 | }; | 117 | }; |
116 | 118 | ||
117 | extern int put_compat_rusage(const struct rusage *, struct compat_rusage __user *); | 119 | extern int put_compat_rusage(const struct rusage *, |
120 | struct compat_rusage __user *); | ||
118 | 121 | ||
119 | struct compat_siginfo; | 122 | struct compat_siginfo; |
120 | 123 | ||
@@ -167,8 +170,7 @@ struct compat_ifmap { | |||
167 | unsigned char port; | 170 | unsigned char port; |
168 | }; | 171 | }; |
169 | 172 | ||
170 | struct compat_if_settings | 173 | struct compat_if_settings { |
171 | { | ||
172 | unsigned int type; /* Type of physical device or protocol */ | 174 | unsigned int type; /* Type of physical device or protocol */ |
173 | unsigned int size; /* Size of the data allocated by the caller */ | 175 | unsigned int size; /* Size of the data allocated by the caller */ |
174 | compat_uptr_t ifs_ifsu; /* union of pointers */ | 176 | compat_uptr_t ifs_ifsu; /* union of pointers */ |
@@ -196,8 +198,8 @@ struct compat_ifreq { | |||
196 | }; | 198 | }; |
197 | 199 | ||
198 | struct compat_ifconf { | 200 | struct compat_ifconf { |
199 | compat_int_t ifc_len; /* size of buffer */ | 201 | compat_int_t ifc_len; /* size of buffer */ |
200 | compat_caddr_t ifcbuf; | 202 | compat_caddr_t ifcbuf; |
201 | }; | 203 | }; |
202 | 204 | ||
203 | struct compat_robust_list { | 205 | struct compat_robust_list { |
@@ -256,8 +258,8 @@ asmlinkage ssize_t compat_sys_pwritev(unsigned long fd, | |||
256 | const struct compat_iovec __user *vec, | 258 | const struct compat_iovec __user *vec, |
257 | unsigned long vlen, u32 pos_low, u32 pos_high); | 259 | unsigned long vlen, u32 pos_low, u32 pos_high); |
258 | 260 | ||
259 | int compat_do_execve(char * filename, compat_uptr_t __user *argv, | 261 | int compat_do_execve(char *filename, compat_uptr_t __user *argv, |
260 | compat_uptr_t __user *envp, struct pt_regs * regs); | 262 | compat_uptr_t __user *envp, struct pt_regs *regs); |
261 | 263 | ||
262 | asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, | 264 | asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, |
263 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, | 265 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, |
@@ -346,14 +348,16 @@ asmlinkage long compat_sys_epoll_pwait(int epfd, | |||
346 | 348 | ||
347 | asmlinkage long compat_sys_utime(const char __user *filename, | 349 | asmlinkage long compat_sys_utime(const char __user *filename, |
348 | struct compat_utimbuf __user *t); | 350 | struct compat_utimbuf __user *t); |
349 | asmlinkage long compat_sys_utimensat(unsigned int dfd, const char __user *filename, | 351 | asmlinkage long compat_sys_utimensat(unsigned int dfd, |
350 | struct compat_timespec __user *t, int flags); | 352 | const char __user *filename, |
353 | struct compat_timespec __user *t, | ||
354 | int flags); | ||
351 | 355 | ||
352 | asmlinkage long compat_sys_time(compat_time_t __user *tloc); | 356 | asmlinkage long compat_sys_time(compat_time_t __user *tloc); |
353 | asmlinkage long compat_sys_stime(compat_time_t __user *tptr); | 357 | asmlinkage long compat_sys_stime(compat_time_t __user *tptr); |
354 | asmlinkage long compat_sys_signalfd(int ufd, | 358 | asmlinkage long compat_sys_signalfd(int ufd, |
355 | const compat_sigset_t __user *sigmask, | 359 | const compat_sigset_t __user *sigmask, |
356 | compat_size_t sigsetsize); | 360 | compat_size_t sigsetsize); |
357 | asmlinkage long compat_sys_timerfd_settime(int ufd, int flags, | 361 | asmlinkage long compat_sys_timerfd_settime(int ufd, int flags, |
358 | const struct compat_itimerspec __user *utmr, | 362 | const struct compat_itimerspec __user *utmr, |
359 | struct compat_itimerspec __user *otmr); | 363 | struct compat_itimerspec __user *otmr); |
@@ -365,19 +369,21 @@ asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_page, | |||
365 | const int __user *nodes, | 369 | const int __user *nodes, |
366 | int __user *status, | 370 | int __user *status, |
367 | int flags); | 371 | int flags); |
368 | asmlinkage long compat_sys_futimesat(unsigned int dfd, const char __user *filename, | 372 | asmlinkage long compat_sys_futimesat(unsigned int dfd, |
373 | const char __user *filename, | ||
369 | struct compat_timeval __user *t); | 374 | struct compat_timeval __user *t); |
370 | asmlinkage long compat_sys_utimes(const char __user *filename, | 375 | asmlinkage long compat_sys_utimes(const char __user *filename, |
371 | struct compat_timeval __user *t); | 376 | struct compat_timeval __user *t); |
372 | asmlinkage long compat_sys_newstat(const char __user * filename, | 377 | asmlinkage long compat_sys_newstat(const char __user *filename, |
373 | struct compat_stat __user *statbuf); | 378 | struct compat_stat __user *statbuf); |
374 | asmlinkage long compat_sys_newlstat(const char __user * filename, | 379 | asmlinkage long compat_sys_newlstat(const char __user *filename, |
375 | struct compat_stat __user *statbuf); | 380 | struct compat_stat __user *statbuf); |
376 | asmlinkage long compat_sys_newfstatat(unsigned int dfd, const char __user * filename, | 381 | asmlinkage long compat_sys_newfstatat(unsigned int dfd, |
382 | const char __user *filename, | ||
377 | struct compat_stat __user *statbuf, | 383 | struct compat_stat __user *statbuf, |
378 | int flag); | 384 | int flag); |
379 | asmlinkage long compat_sys_newfstat(unsigned int fd, | 385 | asmlinkage long compat_sys_newfstat(unsigned int fd, |
380 | struct compat_stat __user * statbuf); | 386 | struct compat_stat __user *statbuf); |
381 | asmlinkage long compat_sys_statfs(const char __user *pathname, | 387 | asmlinkage long compat_sys_statfs(const char __user *pathname, |
382 | struct compat_statfs __user *buf); | 388 | struct compat_statfs __user *buf); |
383 | asmlinkage long compat_sys_fstatfs(unsigned int fd, | 389 | asmlinkage long compat_sys_fstatfs(unsigned int fd, |
@@ -399,10 +405,10 @@ asmlinkage long compat_sys_io_getevents(aio_context_t ctx_id, | |||
399 | struct compat_timespec __user *timeout); | 405 | struct compat_timespec __user *timeout); |
400 | asmlinkage long compat_sys_io_submit(aio_context_t ctx_id, int nr, | 406 | asmlinkage long compat_sys_io_submit(aio_context_t ctx_id, int nr, |
401 | u32 __user *iocb); | 407 | u32 __user *iocb); |
402 | asmlinkage long compat_sys_mount(const char __user * dev_name, | 408 | asmlinkage long compat_sys_mount(const char __user *dev_name, |
403 | const char __user * dir_name, | 409 | const char __user *dir_name, |
404 | const char __user * type, unsigned long flags, | 410 | const char __user *type, unsigned long flags, |
405 | const void __user * data); | 411 | const void __user *data); |
406 | asmlinkage long compat_sys_old_readdir(unsigned int fd, | 412 | asmlinkage long compat_sys_old_readdir(unsigned int fd, |
407 | struct compat_old_linux_dirent __user *, | 413 | struct compat_old_linux_dirent __user *, |
408 | unsigned int count); | 414 | unsigned int count); |
@@ -410,7 +416,7 @@ asmlinkage long compat_sys_getdents(unsigned int fd, | |||
410 | struct compat_linux_dirent __user *dirent, | 416 | struct compat_linux_dirent __user *dirent, |
411 | unsigned int count); | 417 | unsigned int count); |
412 | asmlinkage long compat_sys_getdents64(unsigned int fd, | 418 | asmlinkage long compat_sys_getdents64(unsigned int fd, |
413 | struct linux_dirent64 __user * dirent, | 419 | struct linux_dirent64 __user *dirent, |
414 | unsigned int count); | 420 | unsigned int count); |
415 | asmlinkage long compat_sys_vmsplice(int fd, const struct compat_iovec __user *, | 421 | asmlinkage long compat_sys_vmsplice(int fd, const struct compat_iovec __user *, |
416 | unsigned int nr_segs, unsigned int flags); | 422 | unsigned int nr_segs, unsigned int flags); |
@@ -431,14 +437,15 @@ asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds, | |||
431 | struct compat_timespec __user *tsp, | 437 | struct compat_timespec __user *tsp, |
432 | const compat_sigset_t __user *sigmask, | 438 | const compat_sigset_t __user *sigmask, |
433 | compat_size_t sigsetsize); | 439 | compat_size_t sigsetsize); |
434 | #if (defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE)) && !defined(CONFIG_NFSD_DEPRECATED) | 440 | #if (defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE)) && \ |
441 | !defined(CONFIG_NFSD_DEPRECATED) | ||
435 | union compat_nfsctl_res; | 442 | union compat_nfsctl_res; |
436 | struct compat_nfsctl_arg; | 443 | struct compat_nfsctl_arg; |
437 | asmlinkage long compat_sys_nfsservctl(int cmd, | 444 | asmlinkage long compat_sys_nfsservctl(int cmd, |
438 | struct compat_nfsctl_arg __user *arg, | 445 | struct compat_nfsctl_arg __user *arg, |
439 | union compat_nfsctl_res __user *res); | 446 | union compat_nfsctl_res __user *res); |
440 | #else | 447 | #else |
441 | long asmlinkage compat_sys_nfsservctl(int cmd, void *notused, void *notused2); | 448 | asmlinkage long compat_sys_nfsservctl(int cmd, void *notused, void *notused2); |
442 | #endif | 449 | #endif |
443 | asmlinkage long compat_sys_signalfd4(int ufd, | 450 | asmlinkage long compat_sys_signalfd4(int ufd, |
444 | const compat_sigset_t __user *sigmask, | 451 | const compat_sigset_t __user *sigmask, |
@@ -479,8 +486,8 @@ asmlinkage long compat_sys_setitimer(int which, | |||
479 | asmlinkage long compat_sys_times(struct compat_tms __user *tbuf); | 486 | asmlinkage long compat_sys_times(struct compat_tms __user *tbuf); |
480 | asmlinkage long compat_sys_setrlimit(unsigned int resource, | 487 | asmlinkage long compat_sys_setrlimit(unsigned int resource, |
481 | struct compat_rlimit __user *rlim); | 488 | struct compat_rlimit __user *rlim); |
482 | asmlinkage long compat_sys_getrlimit (unsigned int resource, | 489 | asmlinkage long compat_sys_getrlimit(unsigned int resource, |
483 | struct compat_rlimit __user *rlim); | 490 | struct compat_rlimit __user *rlim); |
484 | asmlinkage long compat_sys_getrusage(int who, struct compat_rusage __user *ru); | 491 | asmlinkage long compat_sys_getrusage(int who, struct compat_rusage __user *ru); |
485 | asmlinkage long compat_sys_sched_setaffinity(compat_pid_t pid, | 492 | asmlinkage long compat_sys_sched_setaffinity(compat_pid_t pid, |
486 | unsigned int len, | 493 | unsigned int len, |
@@ -507,7 +514,7 @@ asmlinkage long compat_sys_clock_getres(clockid_t which_clock, | |||
507 | asmlinkage long compat_sys_clock_nanosleep(clockid_t which_clock, int flags, | 514 | asmlinkage long compat_sys_clock_nanosleep(clockid_t which_clock, int flags, |
508 | struct compat_timespec __user *rqtp, | 515 | struct compat_timespec __user *rqtp, |
509 | struct compat_timespec __user *rmtp); | 516 | struct compat_timespec __user *rmtp); |
510 | asmlinkage long compat_sys_rt_sigtimedwait (compat_sigset_t __user *uthese, | 517 | asmlinkage long compat_sys_rt_sigtimedwait(compat_sigset_t __user *uthese, |
511 | struct compat_siginfo __user *uinfo, | 518 | struct compat_siginfo __user *uinfo, |
512 | struct compat_timespec __user *uts, compat_size_t sigsetsize); | 519 | struct compat_timespec __user *uts, compat_size_t sigsetsize); |
513 | asmlinkage long compat_sys_rt_sigsuspend(compat_sigset_t __user *unewset, | 520 | asmlinkage long compat_sys_rt_sigsuspend(compat_sigset_t __user *unewset, |
@@ -544,7 +551,8 @@ asmlinkage long compat_sys_socketcall(int call, u32 __user *args); | |||
544 | asmlinkage long compat_sys_sysctl(struct compat_sysctl_args __user *args); | 551 | asmlinkage long compat_sys_sysctl(struct compat_sysctl_args __user *args); |
545 | 552 | ||
546 | extern ssize_t compat_rw_copy_check_uvector(int type, | 553 | extern ssize_t compat_rw_copy_check_uvector(int type, |
547 | const struct compat_iovec __user *uvector, unsigned long nr_segs, | 554 | const struct compat_iovec __user *uvector, |
555 | unsigned long nr_segs, | ||
548 | unsigned long fast_segs, struct iovec *fast_pointer, | 556 | unsigned long fast_segs, struct iovec *fast_pointer, |
549 | struct iovec **ret_pointer); | 557 | struct iovec **ret_pointer); |
550 | 558 | ||