Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Remove some set but unused variables
details: https://anonhg.NetBSD.org/src/rev/06cd760451b7
branches: trunk
changeset: 785982:06cd760451b7
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Apr 08 21:12:33 2013 +0000
description:
Remove some set but unused variables
diffstat:
sys/dev/usb/dwc_otg.c | 11 ++---------
sys/kern/exec_elf.c | 6 ++----
sys/kern/sys_descrip.c | 6 ++----
sys/kern/uipc_socket.c | 6 ++----
sys/miscfs/fifofs/fifo_vnops.c | 6 ++----
sys/ufs/ext2fs/ext2fs_vfsops.c | 6 ++----
6 files changed, 12 insertions(+), 29 deletions(-)
diffs (212 lines):
diff -r 6d29d9716dbb -r 06cd760451b7 sys/dev/usb/dwc_otg.c
--- a/sys/dev/usb/dwc_otg.c Mon Apr 08 21:06:39 2013 +0000
+++ b/sys/dev/usb/dwc_otg.c Mon Apr 08 21:12:33 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_otg.c,v 1.48 2013/03/16 12:05:02 skrll Exp $ */
+/* $NetBSD: dwc_otg.c,v 1.49 2013/04/08 21:12:33 skrll Exp $ */
/*-
* Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc_otg.c,v 1.48 2013/03/16 12:05:02 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_otg.c,v 1.49 2013/04/08 21:12:33 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2917,7 +2917,6 @@
uint32_t count;
uint32_t hcint;
uint32_t hcchar;
- uint8_t ep_type;
if (dwc_otg_host_channel_alloc(td))
return 1; /* busy */
@@ -2925,9 +2924,6 @@
/* get pointer to softc */
sc = DWC_OTG_TD2SC(td);
- ep_type = ((td->hcchar &
- HCCHAR_EPTYPE_MASK) >> HCCHAR_EPTYPE_SHIFT);
-
hcint = sc->sc_chan_state[td->channel].hcint;
DPRINTF("CH=%d ST=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n",
@@ -3991,7 +3987,6 @@
{
struct dwc_otg_softc *sc = addr;
usbd_xfer_handle xfer;
- usbd_pipe_handle pipe;
u_char *p;
DPRINTF("\n");
@@ -4005,8 +4000,6 @@
}
/* set port bit */
- pipe = xfer->pipe;
-
p = KERNADDR(&xfer->dmabuf, 0);
p[0] = 0x02; /* we only have one port (1 << 1) */
diff -r 6d29d9716dbb -r 06cd760451b7 sys/kern/exec_elf.c
--- a/sys/kern/exec_elf.c Mon Apr 08 21:06:39 2013 +0000
+++ b/sys/kern/exec_elf.c Mon Apr 08 21:12:33 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf.c,v 1.43 2012/08/05 01:43:58 matt Exp $ */
+/* $NetBSD: exec_elf.c,v 1.44 2013/04/08 21:12:33 skrll Exp $ */
/*-
* Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.43 2012/08/05 01:43:58 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.44 2013/04/08 21:12:33 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_pax.h"
@@ -665,7 +665,6 @@
int error, i, nload;
char *interp = NULL;
u_long phsize;
- struct proc *p;
struct elf_args *ap = NULL;
bool is_dyn;
@@ -691,7 +690,6 @@
* Allocate space to hold all the program headers, and read them
* from the file
*/
- p = l->l_proc;
phsize = eh->e_phnum * sizeof(Elf_Phdr);
ph = kmem_alloc(phsize, KM_SLEEP);
diff -r 6d29d9716dbb -r 06cd760451b7 sys/kern/sys_descrip.c
--- a/sys/kern/sys_descrip.c Mon Apr 08 21:06:39 2013 +0000
+++ b/sys/kern/sys_descrip.c Mon Apr 08 21:12:33 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_descrip.c,v 1.27 2012/08/05 04:26:10 riastradh Exp $ */
+/* $NetBSD: sys_descrip.c,v 1.28 2013/04/08 21:12:33 skrll Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_descrip.c,v 1.27 2012/08/05 04:26:10 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_descrip.c,v 1.28 2013/04/08 21:12:33 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -601,7 +601,6 @@
file_t *fp;
vnode_t *vp;
struct flock lf;
- proc_t *p;
fd = SCARG(uap, fd);
how = SCARG(uap, how);
@@ -639,7 +638,6 @@
}
atomic_or_uint(&fp->f_flag, FHASLOCK);
- p = curproc;
if (how & LOCK_NB) {
error = VOP_ADVLOCK(vp, fp, F_SETLK, &lf, F_FLOCK);
} else {
diff -r 6d29d9716dbb -r 06cd760451b7 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c Mon Apr 08 21:06:39 2013 +0000
+++ b/sys/kern/uipc_socket.c Mon Apr 08 21:12:33 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket.c,v 1.214 2013/03/14 19:13:17 gdt Exp $ */
+/* $NetBSD: uipc_socket.c,v 1.215 2013/04/08 21:12:33 skrll Exp $ */
/*-
* Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.214 2013/03/14 19:13:17 gdt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.215 2013/04/08 21:12:33 skrll Exp $");
#include "opt_compat_netbsd.h"
#include "opt_sock_counters.h"
@@ -877,12 +877,10 @@
struct mbuf *control, int flags, struct lwp *l)
{
struct mbuf **mp, *m;
- struct proc *p;
long space, len, resid, clen, mlen;
int error, s, dontroute, atomic;
short wakeup_state = 0;
- p = l->l_proc;
clen = 0;
/*
diff -r 6d29d9716dbb -r 06cd760451b7 sys/miscfs/fifofs/fifo_vnops.c
--- a/sys/miscfs/fifofs/fifo_vnops.c Mon Apr 08 21:06:39 2013 +0000
+++ b/sys/miscfs/fifofs/fifo_vnops.c Mon Apr 08 21:12:33 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fifo_vnops.c,v 1.72 2011/12/21 15:27:50 christos Exp $ */
+/* $NetBSD: fifo_vnops.c,v 1.73 2013/04/08 21:12:33 skrll Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fifo_vnops.c,v 1.72 2011/12/21 15:27:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fifo_vnops.c,v 1.73 2013/04/08 21:12:33 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -128,12 +128,10 @@
struct lwp *l = curlwp;
struct vnode *vp;
struct fifoinfo *fip;
- struct proc *p;
struct socket *rso, *wso;
int error;
vp = ap->a_vp;
- p = l->l_proc;
if ((fip = vp->v_fifoinfo) == NULL) {
fip = kmem_alloc(sizeof(*fip), KM_SLEEP);
diff -r 6d29d9716dbb -r 06cd760451b7 sys/ufs/ext2fs/ext2fs_vfsops.c
--- a/sys/ufs/ext2fs/ext2fs_vfsops.c Mon Apr 08 21:06:39 2013 +0000
+++ b/sys/ufs/ext2fs/ext2fs_vfsops.c Mon Apr 08 21:12:33 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_vfsops.c,v 1.168 2012/12/20 08:03:44 hannken Exp $ */
+/* $NetBSD: ext2fs_vfsops.c,v 1.169 2013/04/08 21:12:33 skrll Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1994
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.168 2012/12/20 08:03:44 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.169 2013/04/08 21:12:33 skrll Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -664,10 +664,8 @@
dev_t dev;
int error, i, ronly;
kauth_cred_t cred;
- struct proc *p;
dev = devvp->v_rdev;
- p = l ? l->l_proc : NULL;
cred = l ? l->l_cred : NOCRED;
/* Flush out any old buffers remaining from a previous use. */
Home |
Main Index |
Thread Index |
Old Index