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

No functional change intended.
This commit is contained in:
kamil 2019-06-18 22:34:25 +00:00
parent a8778fd7dc
commit 3c0a7f49e5
8 changed files with 31 additions and 36 deletions

View File

@ -613,7 +613,6 @@ ddi_create_minor_node(dev_info_t *dip, char *name, int spec_type,
char *pn;
dev_t dev;
int error;
register_t ret;
pn = PNBUF_GET();
if (spec_type == S_IFCHR) {
@ -649,7 +648,7 @@ ddi_create_minor_node(dev_info_t *dip, char *name, int spec_type,
(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);

View File

@ -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 @@ compat_50_sys_mknod(struct lwp *l,
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

View File

@ -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 @@ linux_sys_mknodat(struct lwp *l, const struct linux_sys_mknodat_args *uap, regis
*/
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);
}
}

View File

@ -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 @@ compat_50_netbsd32_mknod(struct lwp *l,
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

View File

@ -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 @@ netbsd32___mknod50(struct lwp *l, const struct netbsd32___mknod50_args *uap, reg
} */
return do_sys_mknod(l, SCARG_P32(uap, path), SCARG(uap, mode),
SCARG(uap, dev), retval, UIO_USERSPACE);
SCARG(uap, dev), UIO_USERSPACE);
}
int

View File

@ -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 @@ sys___mknod50(struct lwp *l, const struct sys___mknod50_args *uap,
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 @@ sys_mknodat(struct lwp *l, const struct sys_mknodat_args *uap,
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;

View File

@ -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 @@ static int
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 @@ makedevnodes(dev_t devtype, const char *basename, char minchar,
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 @@ makedevnodes(dev_t devtype, const char *basename, char minchar,
*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 @@ makeonenode(char *buf, size_t len, devmajor_t blk, devmajor_t chr,
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 @@ makeonenode(char *buf, size_t len, devmajor_t blk, devmajor_t chr,
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 @@ makeonenode(char *buf, size_t len, devmajor_t blk, devmajor_t chr,
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;

View File

@ -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 dofhopen(struct lwp *, const void *, size_t, int, register_t *);
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);