Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+41 -33
+41 -33
include/linux/compat.h
··· 27 27 struct compat_sel_arg_struct; 28 28 struct rusage; 29 29 30 - struct compat_itimerspec { 30 + struct compat_itimerspec { 31 31 struct compat_timespec it_interval; 32 32 struct compat_timespec it_value; 33 33 }; ··· 71 71 compat_long_t stbcnt; 72 72 compat_int_t tai; 73 73 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; 76 - 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; 76 + compat_int_t:32; compat_int_t:32; compat_int_t:32; 77 77 }; 78 78 79 79 #define _COMPAT_NSIG_WORDS (_COMPAT_NSIG / _COMPAT_NSIG_BPW) ··· 82 82 compat_sigset_word sig[_COMPAT_NSIG_WORDS]; 83 83 } compat_sigset_t; 84 84 85 - extern int get_compat_timespec(struct timespec *, const struct compat_timespec __user *); 86 - extern int put_compat_timespec(const struct timespec *, struct compat_timespec __user *); 85 + extern int get_compat_timespec(struct timespec *, 86 + const struct compat_timespec __user *); 87 + extern int put_compat_timespec(const struct timespec *, 88 + struct compat_timespec __user *); 87 89 88 90 struct compat_iovec { 89 91 compat_uptr_t iov_base; ··· 116 114 compat_long_t ru_nivcsw; 117 115 }; 118 116 119 - extern int put_compat_rusage(const struct rusage *, struct compat_rusage __user *); 117 + extern int put_compat_rusage(const struct rusage *, 118 + struct compat_rusage __user *); 120 119 121 120 struct compat_siginfo; 122 121 ··· 170 167 unsigned char port; 171 168 }; 172 169 173 - struct compat_if_settings 174 - { 170 + struct compat_if_settings { 175 171 unsigned int type; /* Type of physical device or protocol */ 176 172 unsigned int size; /* Size of the data allocated by the caller */ 177 173 compat_uptr_t ifs_ifsu; /* union of pointers */ ··· 198 196 }; 199 197 200 198 struct compat_ifconf { 201 - compat_int_t ifc_len; /* size of buffer */ 202 - compat_caddr_t ifcbuf; 199 + compat_int_t ifc_len; /* size of buffer */ 200 + compat_caddr_t ifcbuf; 203 201 }; 204 202 205 203 struct compat_robust_list { ··· 258 256 const struct compat_iovec __user *vec, 259 257 unsigned long vlen, u32 pos_low, u32 pos_high); 260 258 261 - int compat_do_execve(char * filename, compat_uptr_t __user *argv, 262 - compat_uptr_t __user *envp, struct pt_regs * regs); 259 + int compat_do_execve(char *filename, compat_uptr_t __user *argv, 260 + compat_uptr_t __user *envp, struct pt_regs *regs); 263 261 264 262 asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, 265 263 compat_ulong_t __user *outp, compat_ulong_t __user *exp, ··· 348 346 349 347 asmlinkage long compat_sys_utime(const char __user *filename, 350 348 struct compat_utimbuf __user *t); 351 - asmlinkage long compat_sys_utimensat(unsigned int dfd, const char __user *filename, 352 - struct compat_timespec __user *t, int flags); 349 + asmlinkage long compat_sys_utimensat(unsigned int dfd, 350 + const char __user *filename, 351 + struct compat_timespec __user *t, 352 + int flags); 353 353 354 354 asmlinkage long compat_sys_time(compat_time_t __user *tloc); 355 355 asmlinkage long compat_sys_stime(compat_time_t __user *tptr); 356 356 asmlinkage long compat_sys_signalfd(int ufd, 357 - const compat_sigset_t __user *sigmask, 358 - compat_size_t sigsetsize); 357 + const compat_sigset_t __user *sigmask, 358 + compat_size_t sigsetsize); 359 359 asmlinkage long compat_sys_timerfd_settime(int ufd, int flags, 360 360 const struct compat_itimerspec __user *utmr, 361 361 struct compat_itimerspec __user *otmr); ··· 369 365 const int __user *nodes, 370 366 int __user *status, 371 367 int flags); 372 - asmlinkage long compat_sys_futimesat(unsigned int dfd, const char __user *filename, 368 + asmlinkage long compat_sys_futimesat(unsigned int dfd, 369 + const char __user *filename, 373 370 struct compat_timeval __user *t); 374 371 asmlinkage long compat_sys_utimes(const char __user *filename, 375 372 struct compat_timeval __user *t); 376 - asmlinkage long compat_sys_newstat(const char __user * filename, 373 + asmlinkage long compat_sys_newstat(const char __user *filename, 377 374 struct compat_stat __user *statbuf); 378 - asmlinkage long compat_sys_newlstat(const char __user * filename, 375 + asmlinkage long compat_sys_newlstat(const char __user *filename, 379 376 struct compat_stat __user *statbuf); 380 - asmlinkage long compat_sys_newfstatat(unsigned int dfd, const char __user * filename, 377 + asmlinkage long compat_sys_newfstatat(unsigned int dfd, 378 + const char __user *filename, 381 379 struct compat_stat __user *statbuf, 382 380 int flag); 383 381 asmlinkage long compat_sys_newfstat(unsigned int fd, 384 - struct compat_stat __user * statbuf); 382 + struct compat_stat __user *statbuf); 385 383 asmlinkage long compat_sys_statfs(const char __user *pathname, 386 384 struct compat_statfs __user *buf); 387 385 asmlinkage long compat_sys_fstatfs(unsigned int fd, ··· 405 399 struct compat_timespec __user *timeout); 406 400 asmlinkage long compat_sys_io_submit(aio_context_t ctx_id, int nr, 407 401 u32 __user *iocb); 408 - asmlinkage long compat_sys_mount(const char __user * dev_name, 409 - const char __user * dir_name, 410 - const char __user * type, unsigned long flags, 411 - const void __user * data); 402 + asmlinkage long compat_sys_mount(const char __user *dev_name, 403 + const char __user *dir_name, 404 + const char __user *type, unsigned long flags, 405 + const void __user *data); 412 406 asmlinkage long compat_sys_old_readdir(unsigned int fd, 413 407 struct compat_old_linux_dirent __user *, 414 408 unsigned int count); ··· 416 410 struct compat_linux_dirent __user *dirent, 417 411 unsigned int count); 418 412 asmlinkage long compat_sys_getdents64(unsigned int fd, 419 - struct linux_dirent64 __user * dirent, 413 + struct linux_dirent64 __user *dirent, 420 414 unsigned int count); 421 415 asmlinkage long compat_sys_vmsplice(int fd, const struct compat_iovec __user *, 422 416 unsigned int nr_segs, unsigned int flags); ··· 437 431 struct compat_timespec __user *tsp, 438 432 const compat_sigset_t __user *sigmask, 439 433 compat_size_t sigsetsize); 440 - #if (defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE)) && !defined(CONFIG_NFSD_DEPRECATED) 434 + #if (defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE)) && \ 435 + !defined(CONFIG_NFSD_DEPRECATED) 441 436 union compat_nfsctl_res; 442 437 struct compat_nfsctl_arg; 443 438 asmlinkage long compat_sys_nfsservctl(int cmd, 444 439 struct compat_nfsctl_arg __user *arg, 445 440 union compat_nfsctl_res __user *res); 446 441 #else 447 - long asmlinkage compat_sys_nfsservctl(int cmd, void *notused, void *notused2); 442 + asmlinkage long compat_sys_nfsservctl(int cmd, void *notused, void *notused2); 448 443 #endif 449 444 asmlinkage long compat_sys_signalfd4(int ufd, 450 445 const compat_sigset_t __user *sigmask, ··· 486 479 asmlinkage long compat_sys_times(struct compat_tms __user *tbuf); 487 480 asmlinkage long compat_sys_setrlimit(unsigned int resource, 488 481 struct compat_rlimit __user *rlim); 489 - asmlinkage long compat_sys_getrlimit (unsigned int resource, 490 - struct compat_rlimit __user *rlim); 482 + asmlinkage long compat_sys_getrlimit(unsigned int resource, 483 + struct compat_rlimit __user *rlim); 491 484 asmlinkage long compat_sys_getrusage(int who, struct compat_rusage __user *ru); 492 485 asmlinkage long compat_sys_sched_setaffinity(compat_pid_t pid, 493 486 unsigned int len, ··· 514 507 asmlinkage long compat_sys_clock_nanosleep(clockid_t which_clock, int flags, 515 508 struct compat_timespec __user *rqtp, 516 509 struct compat_timespec __user *rmtp); 517 - asmlinkage long compat_sys_rt_sigtimedwait (compat_sigset_t __user *uthese, 510 + asmlinkage long compat_sys_rt_sigtimedwait(compat_sigset_t __user *uthese, 518 511 struct compat_siginfo __user *uinfo, 519 512 struct compat_timespec __user *uts, compat_size_t sigsetsize); 520 513 asmlinkage long compat_sys_rt_sigsuspend(compat_sigset_t __user *unewset, ··· 551 544 asmlinkage long compat_sys_sysctl(struct compat_sysctl_args __user *args); 552 545 553 546 extern ssize_t compat_rw_copy_check_uvector(int type, 554 - const struct compat_iovec __user *uvector, unsigned long nr_segs, 547 + const struct compat_iovec __user *uvector, 548 + unsigned long nr_segs, 555 549 unsigned long fast_segs, struct iovec *fast_pointer, 556 550 struct iovec **ret_pointer); 557 551