From owner-dev-commits-src-branches@freebsd.org Fri Aug 27 12:46:36 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E8BF865F779; Fri, 27 Aug 2021 12:46:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gwzx85PtDz3hR6; Fri, 27 Aug 2021 12:46:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BCA023A46; Fri, 27 Aug 2021 12:46:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17RCkaUX060021; Fri, 27 Aug 2021 12:46:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17RCkamW060020; Fri, 27 Aug 2021 12:46:36 GMT (envelope-from git) Date: Fri, 27 Aug 2021 12:46:36 GMT Message-Id: <202108271246.17RCkamW060020@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 2b567cd65f0d - stable/12 - tmpfs: Fix styles MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2b567cd65f0d8babef86f2cb89c81e3b1bc314aa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2021 12:46:37 -0000 The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=2b567cd65f0d8babef86f2cb89c81e3b1bc314aa commit 2b567cd65f0d8babef86f2cb89c81e3b1bc314aa Author: Ka Ho Ng AuthorDate: 2021-08-24 13:09:21 +0000 Commit: Ka Ho Ng CommitDate: 2021-08-27 12:05:30 +0000 tmpfs: Fix styles A lot of return statements were in the wrong style before this commit. Sponsored by: The FreeBSD Foundation (cherry picked from commit c12118f6cec0ca5f720be6c06d6c59d551461e5a) --- sys/fs/tmpfs/tmpfs_subr.c | 6 +++--- sys/fs/tmpfs/tmpfs_vfsops.c | 4 ++-- sys/fs/tmpfs/tmpfs_vnops.c | 26 +++++++++++++------------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index bea1189d2e82..ec9d7bc78a92 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -515,7 +515,7 @@ tmpfs_alloc_dirent(struct tmpfs_mount *tmp, struct tmpfs_node *node, *de = nde; - return 0; + return (0); } /* @@ -1648,11 +1648,11 @@ tmpfs_chmod(struct vnode *vp, mode_t mode, struct ucred *cred, struct thread *p) /* Disallow this operation if the file system is mounted read-only. */ if (vp->v_mount->mnt_flag & MNT_RDONLY) - return EROFS; + return (EROFS); /* Immutable or append-only files cannot be modified, either. */ if (node->tn_flags & (IMMUTABLE | APPEND)) - return EPERM; + return (EPERM); /* * To modify the permissions on a file, must possess VADMIN diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c index 219ec9ee69f2..6f7091d8b52f 100644 --- a/sys/fs/tmpfs/tmpfs_vfsops.c +++ b/sys/fs/tmpfs/tmpfs_vfsops.c @@ -463,7 +463,7 @@ tmpfs_mount(struct mount *mp) vfs_getnewfsid(mp); vfs_mountedfrom(mp, "tmpfs"); - return 0; + return (0); } /* ARGSUSED2 */ @@ -628,7 +628,7 @@ tmpfs_statfs(struct mount *mp, struct statfs *sbp) sbp->f_ffree = sbp->f_files - used; /* sbp->f_owner = tmp->tn_uid; */ - return 0; + return (0); } static int diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 7df835113397..8b9afd1f887a 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -272,9 +272,9 @@ tmpfs_mknod(struct vop_mknod_args *v) if (vap->va_type != VBLK && vap->va_type != VCHR && vap->va_type != VFIFO) - return EINVAL; + return (EINVAL); - return tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL); + return (tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL)); } static int @@ -412,7 +412,7 @@ tmpfs_getattr(struct vop_getattr_args *v) vap->va_bytes = node->tn_size; vap->va_filerev = 0; - return 0; + return (0); } int @@ -469,7 +469,7 @@ tmpfs_setattr(struct vop_setattr_args *v) MPASS(VOP_ISLOCKED(vp)); - return error; + return (error); } static int @@ -551,7 +551,7 @@ tmpfs_fsync(struct vop_fsync_args *v) tmpfs_check_mtime(vp); tmpfs_update(vp); - return 0; + return (0); } static int @@ -653,7 +653,7 @@ tmpfs_link(struct vop_link_args *v) error = 0; out: - return error; + return (0); } /* @@ -1094,7 +1094,7 @@ tmpfs_mkdir(struct vop_mkdir_args *v) MPASS(vap->va_type == VDIR); - return tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL); + return (tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL)); } static int @@ -1187,7 +1187,7 @@ tmpfs_rmdir(struct vop_rmdir_args *v) error = 0; out: - return error; + return (error); } static int @@ -1205,7 +1205,7 @@ tmpfs_symlink(struct vop_symlink_args *v) vap->va_type = VLNK; #endif - return tmpfs_alloc_file(dvp, vpp, vap, cnp, target); + return (tmpfs_alloc_file(dvp, vpp, vap, cnp, target)); } static int @@ -1228,7 +1228,7 @@ tmpfs_readdir(struct vop_readdir_args *va) /* This operation only makes sense on directory nodes. */ if (vp->v_type != VDIR) - return ENOTDIR; + return (ENOTDIR); maxcookies = 0; node = VP_TO_TMPFS_DIR(vp); @@ -1265,7 +1265,7 @@ tmpfs_readdir(struct vop_readdir_args *va) *eofflag = (error == 0 && uio->uio_offset == TMPFS_DIRCOOKIE_EOF); - return error; + return (error); } static int @@ -1380,7 +1380,7 @@ tmpfs_print(struct vop_print_args *v) printf("\n"); - return 0; + return (0); } int @@ -1430,7 +1430,7 @@ tmpfs_pathconf(struct vop_pathconf_args *v) error = vop_stdpathconf(v); } - return error; + return (error); } static int