Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Drop unused retval pointer from do_sys_mknod{,at}()



details:   https://anonhg.NetBSD.org/src/rev/11423df9bfd6
branches:  trunk
changeset: 999787:11423df9bfd6
user:      kamil <kamil%NetBSD.org@localhost>
date:      Tue Jun 18 22:34:25 2019 +0000

description:
Drop unused retval pointer from do_sys_mknod{,at}()

No functional change intended.

diffstat:

 external/cddl/osnet/sys/kern/ddi.c       |   3 +--
 sys/compat/common/vfs_syscalls_50.c      |   6 +++---
 sys/compat/linux/common/linux_file.c     |   7 +++----
 sys/compat/netbsd32/netbsd32_compat_50.c |   6 +++---
 sys/compat/netbsd32/netbsd32_netbsd.c    |   6 +++---
 sys/kern/vfs_syscalls.c                  |  18 +++++++++---------
 sys/rump/librump/rumpvfs/devnodes.c      |  15 ++++++---------
 sys/sys/vfs_syscalls.h                   |   6 +++---
 8 files changed, 31 insertions(+), 36 deletions(-)

diffs (278 lines):

diff -r 7881a367dbed -r 11423df9bfd6 external/cddl/osnet/sys/kern/ddi.c
--- a/external/cddl/osnet/sys/kern/ddi.c        Tue Jun 18 21:18:11 2019 +0000
+++ b/external/cddl/osnet/sys/kern/ddi.c        Tue Jun 18 22:34:25 2019 +0000
@@ -613,7 +613,6 @@
        char *pn;
        dev_t dev;
        int error;
-       register_t ret;
 
        pn = PNBUF_GET();
        if (spec_type == S_IFCHR) {
@@ -649,7 +648,7 @@
                (void)do_sys_unlink(pn, UIO_SYSSPACE);
        }
 
-       error = do_sys_mknod(l, pn, spec_type, dev, &ret, UIO_SYSSPACE);
+       error = do_sys_mknod(l, pn, spec_type, dev, UIO_SYSSPACE);
 
 exit:
        PNBUF_PUT(pn);
diff -r 7881a367dbed -r 11423df9bfd6 sys/compat/common/vfs_syscalls_50.c
--- a/sys/compat/common/vfs_syscalls_50.c       Tue Jun 18 21:18:11 2019 +0000
+++ b/sys/compat/common/vfs_syscalls_50.c       Tue Jun 18 22:34:25 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_syscalls_50.c,v 1.22 2019/06/17 14:59:15 christos Exp $    */
+/*     $NetBSD: vfs_syscalls_50.c,v 1.23 2019/06/18 22:34:25 kamil Exp $       */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_50.c,v 1.22 2019/06/17 14:59:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_50.c,v 1.23 2019/06/18 22:34:25 kamil Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -343,7 +343,7 @@
                syscallarg(uint32_t) dev;
        } */
        return do_sys_mknod(l, SCARG(uap, path), SCARG(uap, mode),
-           SCARG(uap, dev), retval, UIO_USERSPACE);
+           SCARG(uap, dev), UIO_USERSPACE);
 }
 
 #ifdef QUOTA
diff -r 7881a367dbed -r 11423df9bfd6 sys/compat/linux/common/linux_file.c
--- a/sys/compat/linux/common/linux_file.c      Tue Jun 18 21:18:11 2019 +0000
+++ b/sys/compat/linux/common/linux_file.c      Tue Jun 18 22:34:25 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_file.c,v 1.115 2015/03/01 13:19:39 njoly Exp $   */
+/*     $NetBSD: linux_file.c,v 1.116 2019/06/18 22:34:25 kamil Exp $   */
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.115 2015/03/01 13:19:39 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.116 2019/06/18 22:34:25 kamil Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -675,8 +675,7 @@
                 */
 
                return do_sys_mknodat(l, SCARG(uap, fd), SCARG(uap, path),
-                   SCARG(uap, mode), SCARG(uap, dev) & 0xffff, retval,
-                   UIO_USERSPACE);
+                   SCARG(uap, mode), SCARG(uap, dev) & 0xffff, UIO_USERSPACE);
        }
 }
 
diff -r 7881a367dbed -r 11423df9bfd6 sys/compat/netbsd32/netbsd32_compat_50.c
--- a/sys/compat/netbsd32/netbsd32_compat_50.c  Tue Jun 18 21:18:11 2019 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_50.c  Tue Jun 18 22:34:25 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_compat_50.c,v 1.37 2019/06/18 01:37:03 christos Exp $ */
+/*     $NetBSD: netbsd32_compat_50.c,v 1.38 2019/06/18 22:34:25 kamil Exp $    */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.37 2019/06/18 01:37:03 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.38 2019/06/18 22:34:25 kamil Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -117,7 +117,7 @@
                syscallarg(uint32_t) dev;
        } */
        return do_sys_mknod(l, SCARG_P32(uap, path), SCARG(uap, mode),
-           SCARG(uap, dev), retval, UIO_USERSPACE);
+           SCARG(uap, dev), UIO_USERSPACE);
 }
 
 int
diff -r 7881a367dbed -r 11423df9bfd6 sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c     Tue Jun 18 21:18:11 2019 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c     Tue Jun 18 22:34:25 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_netbsd.c,v 1.226 2019/06/18 16:46:03 christos Exp $   */
+/*     $NetBSD: netbsd32_netbsd.c,v 1.227 2019/06/18 22:34:25 kamil Exp $      */
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2018 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.226 2019/06/18 16:46:03 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.227 2019/06/18 22:34:25 kamil Exp $");
 
 /*
  * below are all the standard NetBSD system calls, in the 32bit
@@ -298,7 +298,7 @@
        } */
 
        return do_sys_mknod(l, SCARG_P32(uap, path), SCARG(uap, mode),
-           SCARG(uap, dev), retval, UIO_USERSPACE);
+           SCARG(uap, dev), UIO_USERSPACE);
 }
 
 int
diff -r 7881a367dbed -r 11423df9bfd6 sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c   Tue Jun 18 21:18:11 2019 +0000
+++ b/sys/kern/vfs_syscalls.c   Tue Jun 18 22:34:25 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_syscalls.c,v 1.528 2019/05/13 08:17:30 hannken Exp $       */
+/*     $NetBSD: vfs_syscalls.c,v 1.529 2019/06/18 22:34:25 kamil Exp $ */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.528 2019/05/13 08:17:30 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.529 2019/06/18 22:34:25 kamil Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -2164,8 +2164,8 @@
                syscallarg(mode_t) mode;
                syscallarg(dev_t) dev;
        } */
-       return do_sys_mknodat(l, AT_FDCWD, SCARG(uap, path), SCARG(uap, mode),
-           SCARG(uap, dev), retval, UIO_USERSPACE);
+       return do_sys_mknodat(l, AT_FDCWD, SCARG(uap, path),
+           SCARG(uap, mode), SCARG(uap, dev), UIO_SYSSPACE);
 }
 
 int
@@ -2180,20 +2180,20 @@
                syscallarg(dev_t) dev;
        } */
 
-       return do_sys_mknodat(l, SCARG(uap, fd), SCARG(uap, path), 
-           SCARG(uap, mode), SCARG(uap, dev), retval, UIO_USERSPACE);
+       return do_sys_mknodat(l, SCARG(uap, fd), SCARG(uap, path),
+           SCARG(uap, mode), SCARG(uap, dev), UIO_SYSSPACE);
 }
 
 int
 do_sys_mknod(struct lwp *l, const char *pathname, mode_t mode, dev_t dev,
-    register_t *retval, enum uio_seg seg)
+    enum uio_seg seg)
 {
-       return do_sys_mknodat(l, AT_FDCWD, pathname, mode, dev, retval, seg);
+       return do_sys_mknodat(l, AT_FDCWD, pathname, mode, dev, seg);
 }
 
 int
 do_sys_mknodat(struct lwp *l, int fdat, const char *pathname, mode_t mode,
-    dev_t dev, register_t *retval, enum uio_seg seg)
+    dev_t dev, enum uio_seg seg)
 {
        struct proc *p = l->l_proc;
        struct vnode *vp;
diff -r 7881a367dbed -r 11423df9bfd6 sys/rump/librump/rumpvfs/devnodes.c
--- a/sys/rump/librump/rumpvfs/devnodes.c       Tue Jun 18 21:18:11 2019 +0000
+++ b/sys/rump/librump/rumpvfs/devnodes.c       Tue Jun 18 22:34:25 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: devnodes.c,v 1.12 2016/01/26 23:12:18 pooka Exp $      */
+/*     $NetBSD: devnodes.c,v 1.13 2019/06/18 22:34:26 kamil Exp $      */
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: devnodes.c,v 1.12 2016/01/26 23:12:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: devnodes.c,v 1.13 2019/06/18 22:34:26 kamil Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -44,11 +44,10 @@
 makeonedevnode(dev_t devtype, const char *devname,
        devmajor_t majnum, devminor_t minnum)
 {
-       register_t retval;
        int error;
 
        error = do_sys_mknod(curlwp, devname, 0666 | devtype,
-           makedev(majnum, minnum), &retval, UIO_SYSSPACE);
+           makedev(majnum, minnum), UIO_SYSSPACE);
        if (error == EEXIST) /* XXX: should check it's actually the same */
                error = 0;
 
@@ -62,7 +61,6 @@
        int error = 0;
        char *devname, *p;
        size_t devlen;
-       register_t retval;
 
        devlen = strlen(basename) + 1 + 1; /* +letter +0 */
        devname = kmem_zalloc(devlen, KM_SLEEP);
@@ -74,7 +72,7 @@
                *p = minchar;
 
                if ((error = do_sys_mknod(curlwp, devname, 0666 | devtype,
-                   makedev(maj, minnum), &retval, UIO_SYSSPACE))) {
+                   makedev(maj, minnum), UIO_SYSSPACE))) {
                        if (error == EEXIST)
                                error = 0;
                        else
@@ -121,7 +119,6 @@
     devminor_t dmin, const char *base, int c1, int c2)
 {
        char cstr1[2] = {0,0}, cstr2[2] = {0,0};
-       register_t rv;
        int error;
 
        if (c1 != -1) {
@@ -145,7 +142,7 @@
                        break;
                case NOTEXIST:
                        if ((error = do_sys_mknod(curlwp, buf, 0600 | S_IFBLK,
-                           makedev(blk, dmin), &rv, UIO_SYSSPACE)) != 0)
+                           makedev(blk, dmin), UIO_SYSSPACE)) != 0)
                                aprint_verbose("mkdevnodes: failed to "
                                    "create %s: %d\n", buf, error);
                        break;
@@ -163,7 +160,7 @@
                break;
        case NOTEXIST:
                if ((error = do_sys_mknod(curlwp, buf, 0600 | S_IFCHR,
-                   makedev(chr, dmin), &rv, UIO_SYSSPACE)) != 0)
+                   makedev(chr, dmin), UIO_SYSSPACE)) != 0)
                        aprint_verbose("mkdevnodes: failed to "
                            "create %s: %d\n", buf, error);
                break;
diff -r 7881a367dbed -r 11423df9bfd6 sys/sys/vfs_syscalls.h
--- a/sys/sys/vfs_syscalls.h    Tue Jun 18 21:18:11 2019 +0000
+++ b/sys/sys/vfs_syscalls.h    Tue Jun 18 22:34:25 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_syscalls.h,v 1.23 2017/07/29 04:02:49 riastradh Exp $        */
+/*     $NetBSD: vfs_syscalls.h,v 1.24 2019/06/18 22:34:26 kamil Exp $        */
 
 /*
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,8 +70,8 @@
 int    do_sys_linkat(struct lwp *, int, const char *, int, const char *, int, register_t *);
 int    do_sys_unlink(const char *, enum uio_seg);
 int    do_sys_rename(const char *, const char *, enum uio_seg, int);
-int    do_sys_mknod(struct lwp *, const char *, mode_t, dev_t, register_t *, enum uio_seg);
-int    do_sys_mknodat(struct lwp *, int, const char *, mode_t, dev_t, register_t *, enum uio_seg);
+int    do_sys_mknod(struct lwp *, const char *, mode_t, dev_t, enum uio_seg);
+int    do_sys_mknodat(struct lwp *, int, const char *, mode_t, dev_t, enum uio_seg);
 int    do_sys_chmodat(struct lwp *, int, const char *, int, int);
 int    do_sys_chownat(struct lwp *, int, const char *, uid_t, gid_t, int);
 int    do_sys_accessat(struct lwp *, int, const char *, int ,int);



Home | Main Index | Thread Index | Old Index