From nobody Wed May 22 22:13:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl5DR4fG0z5L7Ts; Wed, 22 May 2024 22:13:43 +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 4Vl5DR467fz4Ql3; Wed, 22 May 2024 22:13:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKdALu2qbWuQsfc2cBrwYot3kb/QA+kkhBsIyOKRBxc=; b=thlFpjy80gQlES7LWpKC5I2ep9P5t/8xLcSiU9Y4cv9qv8GOjqSgcxKrDOAIb4+j02rbbp r4+NUXeAPFcNSF2qQ8x1awCX89XBChA/nfRrT4p70LXbvKFPfp6yfAYfbJMcstUVmTNsFu FpwJp/QhTP4zIWs4t2BHJ3Alm6ct1X4iaBM9FTOA9MAhFzg/O1xXfu0cIQkXxNUVT4fGNG Ujp7GK/BVtssX82WiMrSbDVVQEcEppy3d6Q7YDtg9Ppnl31Urb4Za2IaY5U3oYFSb3kHPC eC4JJr/FjaozPAmaqEIzeOz/LgRml5W1KnfN+x0CEyZChHRq8pzIJ6nxhfNPaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716416023; a=rsa-sha256; cv=none; b=qZzXuzw2ucAkVJ95trkBHcDVnFmahlqmNFnzVN9zKccBmX06Aqe99hlQNrPkY44ZzHjcc6 ujGHapIxg+P1y1lTO3Y+ar0scvtGwjv0swSx5aOw0o2NiPh0a1AyClWOxpQVwEWRXxi+1e 9cYxc1TrK4CYMMn9pD3jmxho4msqSsUJMywTR4jrKfFUzxXBiiK5sxpKgIEAgoRf/hX86A yeSSwEOe2S7bHq68C/ekJoFgBk4ND51dBqXXsaH4bGul+pmMuzGREDgfXRoyehebIwgGo8 1HCP4wWcue6GMOv6WOKwGD1UdUwi7qHeGrKXFxhsu30PsL+1fniQGNDjtIxqYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKdALu2qbWuQsfc2cBrwYot3kb/QA+kkhBsIyOKRBxc=; b=B7/+RZSh3+G0Hd+vBZuBrhi7AQmb59ri9fHHt/Ths3KwyGwYjgXGQBZ/8oZO7kB+0QPr/E 7fKZf2K0En6fuhFm3dJmlXbXqGFbfHRYcOLM2MysW1PZVgRcF2bMSBz2IfhpHP/TcRL22u lip5MP2Z8EEs1Z2r/DjSOx1I8SnvN5jjkQBIKdxkxxW71NA5jOrXoPJsUn/hNdttK9FVIn LGUh2159cCHS1S6h8prqmqIBemFlHumtrI3S5XQFIgHpzLUBIyjyMJt59SkQ21LxO6Dw41 LPI/7TqTirOVfx0Nh8rWlYsZdjYwrO/pGqlhIqn64z9Hf2qeevG2cHFWkJUkyw== 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 4Vl5DR3jk1zNVB; Wed, 22 May 2024 22:13:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MMDh9a000737; Wed, 22 May 2024 22:13:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MMDhpM000734; Wed, 22 May 2024 22:13:43 GMT (envelope-from git) Date: Wed, 22 May 2024 22:13:43 GMT Message-Id: <202405222213.44MMDhpM000734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 63f18b37e01e - main - mqueuefs: minor style pass List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 63f18b37e01ef214de762a091d3c98ae5028c8f4 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=63f18b37e01ef214de762a091d3c98ae5028c8f4 commit 63f18b37e01ef214de762a091d3c98ae5028c8f4 Author: Konstantin Belousov AuthorDate: 2024-05-22 02:52:47 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-22 22:13:29 +0000 mqueuefs: minor style pass Also remove not needed inclusion of sys/cdefs.h. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/uipc_mqueue.c | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 6400f0bce9f9..d842aff8fdc9 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -50,7 +50,6 @@ * use the IPC facility without having to mount mqueue file system. */ -#include #include "opt_capsicum.h" #include @@ -379,7 +378,7 @@ mqfs_fileno_free(struct mqfs_info *mi, struct mqfs_node *mn) static __inline struct mqfs_node * mqnode_alloc(void) { - return uma_zalloc(mqnode_zone, M_WAITOK | M_ZERO); + return (uma_zalloc(mqnode_zone, M_WAITOK | M_ZERO)); } static __inline void @@ -451,8 +450,8 @@ mqfs_create_node(const char *name, int namelen, struct ucred *cred, int mode, node->mn_type = nodetype; node->mn_refcount = 1; vfs_timestamp(&node->mn_birth); - node->mn_ctime = node->mn_atime = node->mn_mtime - = node->mn_birth; + node->mn_ctime = node->mn_atime = node->mn_mtime = + node->mn_birth; node->mn_uid = cred->cr_uid; node->mn_gid = cred->cr_gid; node->mn_mode = mode; @@ -1017,8 +1016,8 @@ mqfs_create(struct vop_create_args *ap) /* * Remove an entry */ -static -int do_unlink(struct mqfs_node *pn, struct ucred *ucred) +static int +do_unlink(struct mqfs_node *pn, struct ucred *ucred) { struct mqfs_node *parent; struct mqfs_vdata *vd; @@ -1244,15 +1243,15 @@ mqfs_setattr(struct vop_setattr_args *ap) td = curthread; vap = ap->a_vap; vp = ap->a_vp; - if ((vap->va_type != VNON) || - (vap->va_nlink != VNOVAL) || - (vap->va_fsid != VNOVAL) || - (vap->va_fileid != VNOVAL) || - (vap->va_blocksize != VNOVAL) || + if (vap->va_type != VNON || + vap->va_nlink != VNOVAL || + vap->va_fsid != VNOVAL || + vap->va_fileid != VNOVAL || + vap->va_blocksize != VNOVAL || (vap->va_flags != VNOVAL && vap->va_flags != 0) || - (vap->va_rdev != VNOVAL) || - ((int)vap->va_bytes != VNOVAL) || - (vap->va_gen != VNOVAL)) { + vap->va_rdev != VNOVAL || + (int)vap->va_bytes != VNOVAL || + vap->va_gen != VNOVAL) { return (EINVAL); } @@ -1281,7 +1280,7 @@ mqfs_setattr(struct vop_setattr_args *ap) * check in VOP_ACCESS() be enough? Also, are the group bits * below definitely right? */ - if (((ap->a_cred->cr_uid != pn->mn_uid) || uid != pn->mn_uid || + if ((ap->a_cred->cr_uid != pn->mn_uid || uid != pn->mn_uid || (gid != pn->mn_gid && !groupmember(gid, ap->a_cred))) && (error = priv_check(td, PRIV_MQ_ADMIN)) != 0) return (error); @@ -1291,7 +1290,7 @@ mqfs_setattr(struct vop_setattr_args *ap) } if (vap->va_mode != (mode_t)VNOVAL) { - if ((ap->a_cred->cr_uid != pn->mn_uid) && + if (ap->a_cred->cr_uid != pn->mn_uid && (error = priv_check(td, PRIV_MQ_ADMIN))) return (error); pn->mn_mode = vap->va_mode; @@ -1345,11 +1344,11 @@ mqfs_read(struct vop_read_args *ap) mq = VTOMQ(vp); snprintf(buf, sizeof(buf), - "QSIZE:%-10ld MAXMSG:%-10ld CURMSG:%-10ld MSGSIZE:%-10ld\n", - mq->mq_totalbytes, - mq->mq_maxmsg, - mq->mq_curmsgs, - mq->mq_msgsize); + "QSIZE:%-10ld MAXMSG:%-10ld CURMSG:%-10ld MSGSIZE:%-10ld\n", + mq->mq_totalbytes, + mq->mq_maxmsg, + mq->mq_curmsgs, + mq->mq_msgsize); buf[sizeof(buf)-1] = '\0'; len = strlen(buf); error = uiomove_frombuf(buf, len, uio); @@ -2014,7 +2013,7 @@ kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode, AUDIT_ARG_MODE(mode); pdp = td->td_proc->p_pd; - cmode = (((mode & ~pdp->pd_cmask) & ALLPERMS) & ~S_ISTXT); + cmode = ((mode & ~pdp->pd_cmask) & ALLPERMS) & ~S_ISTXT; mq = NULL; if ((flags & O_CREAT) != 0 && attr != NULL) { if (attr->mq_maxmsg <= 0 || attr->mq_maxmsg > maxmsg) @@ -2809,7 +2808,7 @@ freebsd32_kmq_timedsend(struct thread *td, abs_timeout = NULL; waitok = !(fp->f_flag & O_NONBLOCK); error = mqueue_send(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); + uap->msg_prio, waitok, abs_timeout); out: fdrop(fp, td); return (error); @@ -2840,7 +2839,7 @@ freebsd32_kmq_timedreceive(struct thread *td, abs_timeout = NULL; waitok = !(fp->f_flag & O_NONBLOCK); error = mqueue_receive(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); + uap->msg_prio, waitok, abs_timeout); out: fdrop(fp, td); return (error);