From owner-svn-src-head@freebsd.org Fri Jun 1 13:26:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DA51FD294D; Fri, 1 Jun 2018 13:26:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B9437B6E5; Fri, 1 Jun 2018 13:26:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 089452958D; Fri, 1 Jun 2018 13:26:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w51DQkrQ017911; Fri, 1 Jun 2018 13:26:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w51DQjfh017904; Fri, 1 Jun 2018 13:26:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806011326.w51DQjfh017904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 1 Jun 2018 13:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334486 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 334486 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2018 13:26:47 -0000 Author: emaste Date: Fri Jun 1 13:26:45 2018 New Revision: 334486 URL: https://svnweb.freebsd.org/changeset/base/334486 Log: ANSIfy sys/kern Modified: head/sys/kern/kern_descrip.c head/sys/kern/kern_exec.c head/sys/kern/subr_prof.c head/sys/kern/sys_pipe.c head/sys/kern/sysv_msg.c head/sys/kern/vfs_cluster.c head/sys/kern/vfs_vnops.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Fri Jun 1 12:43:13 2018 (r334485) +++ head/sys/kern/kern_descrip.c Fri Jun 1 13:26:45 2018 (r334486) @@ -1148,8 +1148,7 @@ fail: * This is common code for FIOGETOWN ioctl called by fcntl(fd, F_GETOWN, arg). */ pid_t -fgetown(sigiop) - struct sigio **sigiop; +fgetown(struct sigio **sigiop) { pid_t pgid; Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Fri Jun 1 12:43:13 2018 (r334485) +++ head/sys/kern/kern_exec.c Fri Jun 1 13:26:45 2018 (r334486) @@ -978,8 +978,7 @@ exec_fail: } int -exec_map_first_page(imgp) - struct image_params *imgp; +exec_map_first_page(struct image_params *imgp) { int rv, i, after, initial_pagein; vm_page_t ma[VM_INITIAL_PAGEIN]; Modified: head/sys/kern/subr_prof.c ============================================================================== --- head/sys/kern/subr_prof.c Fri Jun 1 12:43:13 2018 (r334485) +++ head/sys/kern/subr_prof.c Fri Jun 1 13:26:45 2018 (r334486) @@ -139,8 +139,7 @@ kmupetext(uintfptr_t nhighpc) } static void -kmstartup(dummy) - void *dummy; +kmstartup(void *dummy) { char *cp; struct gmonparam *p = &_gmonparam; Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Fri Jun 1 12:43:13 2018 (r334485) +++ head/sys/kern/sys_pipe.c Fri Jun 1 13:26:45 2018 (r334486) @@ -491,9 +491,7 @@ sys_pipe2(struct thread *td, struct pipe2_args *uap) * If it fails it will return ENOMEM. */ static int -pipespace_new(cpipe, size) - struct pipe *cpipe; - int size; +pipespace_new(struct pipe *cpipe, int size) { caddr_t buffer; int error, cnt, firstseg; @@ -559,9 +557,7 @@ retry: * Wrapper for pipespace_new() that performs locking assertions. */ static int -pipespace(cpipe, size) - struct pipe *cpipe; - int size; +pipespace(struct pipe *cpipe, int size) { KASSERT(cpipe->pipe_state & PIPE_LOCKFL, @@ -573,9 +569,7 @@ pipespace(cpipe, size) * lock a pipe for I/O, blocking other access */ static __inline int -pipelock(cpipe, catch) - struct pipe *cpipe; - int catch; +pipelock(struct pipe *cpipe, int catch) { int error; @@ -596,8 +590,7 @@ pipelock(cpipe, catch) * unlock a pipe I/O lock */ static __inline void -pipeunlock(cpipe) - struct pipe *cpipe; +pipeunlock(struct pipe *cpipe) { PIPE_LOCK_ASSERT(cpipe, MA_OWNED); @@ -611,8 +604,7 @@ pipeunlock(cpipe) } void -pipeselwakeup(cpipe) - struct pipe *cpipe; +pipeselwakeup(struct pipe *cpipe) { PIPE_LOCK_ASSERT(cpipe, MA_OWNED); @@ -631,9 +623,7 @@ pipeselwakeup(cpipe) * will start out zero'd from the ctor, so we just manage the kmem. */ static void -pipe_create(pipe, backing) - struct pipe *pipe; - int backing; +pipe_create(struct pipe *pipe, int backing) { if (backing) { @@ -655,12 +645,8 @@ pipe_create(pipe, backing) /* ARGSUSED */ static int -pipe_read(fp, uio, active_cred, flags, td) - struct file *fp; - struct uio *uio; - struct ucred *active_cred; - struct thread *td; - int flags; +pipe_read(struct file *fp, struct uio *uio, struct ucred *active_cred, + int flags, struct thread *td) { struct pipe *rpipe; int error; @@ -834,9 +820,7 @@ unlocked_error: * This is similar to a physical write operation. */ static int -pipe_build_write_buffer(wpipe, uio) - struct pipe *wpipe; - struct uio *uio; +pipe_build_write_buffer(struct pipe *wpipe, struct uio *uio) { u_int size; int i; @@ -880,8 +864,7 @@ pipe_build_write_buffer(wpipe, uio) * unmap and unwire the process buffer */ static void -pipe_destroy_write_buffer(wpipe) - struct pipe *wpipe; +pipe_destroy_write_buffer(struct pipe *wpipe) { PIPE_LOCK_ASSERT(wpipe, MA_OWNED); @@ -895,8 +878,7 @@ pipe_destroy_write_buffer(wpipe) * pages can be freed without loss of data. */ static void -pipe_clone_write_buffer(wpipe) - struct pipe *wpipe; +pipe_clone_write_buffer(struct pipe *wpipe) { struct uio uio; struct iovec iov; @@ -935,9 +917,7 @@ pipe_clone_write_buffer(wpipe) * the pipe buffer. Then the direct mapping write is set-up. */ static int -pipe_direct_write(wpipe, uio) - struct pipe *wpipe; - struct uio *uio; +pipe_direct_write(struct pipe *wpipe, struct uio *uio) { int error; @@ -1036,12 +1016,8 @@ error1: #endif static int -pipe_write(fp, uio, active_cred, flags, td) - struct file *fp; - struct uio *uio; - struct ucred *active_cred; - struct thread *td; - int flags; +pipe_write(struct file *fp, struct uio *uio, struct ucred *active_cred, + int flags, struct thread *td) { int error = 0; int desiredsize; @@ -1319,11 +1295,8 @@ pipe_write(fp, uio, active_cred, flags, td) /* ARGSUSED */ static int -pipe_truncate(fp, length, active_cred, td) - struct file *fp; - off_t length; - struct ucred *active_cred; - struct thread *td; +pipe_truncate(struct file *fp, off_t length, struct ucred *active_cred, + struct thread *td) { struct pipe *cpipe; int error; @@ -1340,12 +1313,8 @@ pipe_truncate(fp, length, active_cred, td) * we implement a very minimal set of ioctls for compatibility with sockets. */ static int -pipe_ioctl(fp, cmd, data, active_cred, td) - struct file *fp; - u_long cmd; - void *data; - struct ucred *active_cred; - struct thread *td; +pipe_ioctl(struct file *fp, u_long cmd, void *data, struct ucred *active_cred, + struct thread *td) { struct pipe *mpipe = fp->f_data; int error; @@ -1416,11 +1385,8 @@ out_unlocked: } static int -pipe_poll(fp, events, active_cred, td) - struct file *fp; - int events; - struct ucred *active_cred; - struct thread *td; +pipe_poll(struct file *fp, int events, struct ucred *active_cred, + struct thread *td) { struct pipe *rpipe; struct pipe *wpipe; @@ -1492,11 +1458,8 @@ locked_error: * be a natural race. */ static int -pipe_stat(fp, ub, active_cred, td) - struct file *fp; - struct stat *ub; - struct ucred *active_cred; - struct thread *td; +pipe_stat(struct file *fp, struct stat *ub, struct ucred *active_cred, + struct thread *td) { struct pipe *pipe; int new_unr; @@ -1562,9 +1525,7 @@ pipe_stat(fp, ub, active_cred, td) /* ARGSUSED */ static int -pipe_close(fp, td) - struct file *fp; - struct thread *td; +pipe_close(struct file *fp, struct thread *td) { if (fp->f_vnode != NULL) @@ -1590,12 +1551,8 @@ pipe_chmod(struct file *fp, mode_t mode, struct ucred } static int -pipe_chown(fp, uid, gid, active_cred, td) - struct file *fp; - uid_t uid; - gid_t gid; - struct ucred *active_cred; - struct thread *td; +pipe_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, + struct thread *td) { struct pipe *cpipe; int error; @@ -1624,8 +1581,7 @@ pipe_fill_kinfo(struct file *fp, struct kinfo_file *ki } static void -pipe_free_kmem(cpipe) - struct pipe *cpipe; +pipe_free_kmem(struct pipe *cpipe) { KASSERT(!mtx_owned(PIPE_MTX(cpipe)), @@ -1651,8 +1607,7 @@ pipe_free_kmem(cpipe) * shutdown the pipe */ static void -pipeclose(cpipe) - struct pipe *cpipe; +pipeclose(struct pipe *cpipe) { struct pipepair *pp; struct pipe *ppipe; Modified: head/sys/kern/sysv_msg.c ============================================================================== --- head/sys/kern/sysv_msg.c Fri Jun 1 12:43:13 2018 (r334485) +++ head/sys/kern/sysv_msg.c Fri Jun 1 13:26:45 2018 (r334486) @@ -386,8 +386,7 @@ DECLARE_MODULE(sysvmsg, sysvmsg_mod, SI_SUB_SYSV_MSG, MODULE_VERSION(sysvmsg, 1); static void -msg_freehdr(msghdr) - struct msg *msghdr; +msg_freehdr(struct msg *msghdr) { while (msghdr->msg_ts > 0) { short next; @@ -499,11 +498,7 @@ sys_msgctl(struct thread *td, struct msgctl_args *uap) } int -kern_msgctl(td, msqid, cmd, msqbuf) - struct thread *td; - int msqid; - int cmd; - struct msqid_ds *msqbuf; +kern_msgctl(struct thread *td, int msqid, int cmd, struct msqid_ds *msqbuf) { int rval, error, msqix; struct msqid_kernel *msqkptr; Modified: head/sys/kern/vfs_cluster.c ============================================================================== --- head/sys/kern/vfs_cluster.c Fri Jun 1 12:43:13 2018 (r334485) +++ head/sys/kern/vfs_cluster.c Fri Jun 1 13:26:45 2018 (r334486) @@ -561,8 +561,7 @@ clean_sbusy: * that we will need to shift around. */ static void -cluster_callback(bp) - struct buf *bp; +cluster_callback(struct buf *bp) { struct buf *nbp, *tbp; int error = 0; Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Fri Jun 1 12:43:13 2018 (r334485) +++ head/sys/kern/vfs_vnops.c Fri Jun 1 13:26:45 2018 (r334486) @@ -172,10 +172,7 @@ static int vn_io_fault1(struct vnode *vp, struct uio * struct vn_io_fault_args *args, struct thread *td); int -vn_open(ndp, flagp, cmode, fp) - struct nameidata *ndp; - int *flagp, cmode; - struct file *fp; +vn_open(struct nameidata *ndp, int *flagp, int cmode, struct file *fp) { struct thread *td = ndp->ni_cnd.cn_thread; @@ -622,19 +619,9 @@ vn_rdwr(enum uio_rw rw, struct vnode *vp, void *base, * core'ing the same binary, or unrelated processes scanning the directory). */ int -vn_rdwr_inchunks(rw, vp, base, len, offset, segflg, ioflg, active_cred, - file_cred, aresid, td) - enum uio_rw rw; - struct vnode *vp; - void *base; - size_t len; - off_t offset; - enum uio_seg segflg; - int ioflg; - struct ucred *active_cred; - struct ucred *file_cred; - size_t *aresid; - struct thread *td; +vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, void *base, size_t len, + off_t offset, enum uio_seg segflg, int ioflg, struct ucred *active_cred, + struct ucred *file_cred, size_t *aresid, struct thread *td) { int error = 0; ssize_t iaresid; @@ -778,12 +765,8 @@ get_advice(struct file *fp, struct uio *uio) * File table vnode read routine. */ static int -vn_read(fp, uio, active_cred, flags, td) - struct file *fp; - struct uio *uio; - struct ucred *active_cred; - int flags; - struct thread *td; +vn_read(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, + struct thread *td) { struct vnode *vp; off_t orig_offset; @@ -837,12 +820,8 @@ vn_read(fp, uio, active_cred, flags, td) * File table vnode write routine. */ static int -vn_write(fp, uio, active_cred, flags, td) - struct file *fp; - struct uio *uio; - struct ucred *active_cred; - int flags; - struct thread *td; +vn_write(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, + struct thread *td) { struct vnode *vp; struct mount *mp; @@ -1354,11 +1333,8 @@ out1: * File table vnode stat routine. */ static int -vn_statfile(fp, sb, active_cred, td) - struct file *fp; - struct stat *sb; - struct ucred *active_cred; - struct thread *td; +vn_statfile(struct file *fp, struct stat *sb, struct ucred *active_cred, + struct thread *td) { struct vnode *vp = fp->f_vnode; int error;