From 35ca6c8b5ba6bc67275c6c979024156c105f5f22 Mon Sep 17 00:00:00 2001 From: christos Date: Thu, 17 Aug 2006 17:11:27 +0000 Subject: [PATCH] Fix all the -D*DEBUG* code that it was rotting away and did not even compile. Mostly from Arnaud Lacombe, many thanks! --- sys/arch/i386/i386/svr4_machdep.c | 6 ++--- sys/arch/mips/include/svr4_machdep.h | 8 +----- sys/compat/darwin/files.darwin | 3 ++- sys/compat/mach/mach_message.c | 5 ++-- sys/compat/svr4/svr4_socket.c | 12 ++++----- sys/compat/svr4/svr4_sockio.c | 8 +++--- sys/contrib/dev/ath/netbsd/ah_osdep.c | 6 ++--- sys/dev/ic/adv.c | 6 ++--- sys/dev/ic/aha.c | 10 ++++---- sys/dev/ic/atw.c | 6 +++-- sys/dev/ic/bha.c | 6 ++--- sys/dev/ic/ncr5380sbc.c | 8 +++--- sys/dev/ic/ncr5380var.h | 4 +-- sys/dev/ic/opl.c | 9 +++---- sys/dev/ic/sl811hs.c | 8 +++--- sys/dev/ic/wdc.c | 6 ++--- sys/dev/isa/aic_isa.c | 6 ++--- sys/dev/isa/if_eg.c | 5 ++-- sys/dev/isa/if_we_isa.c | 6 ++--- sys/dev/isa/wds.c | 14 +++++++---- sys/dev/pci/agp.c | 12 ++++----- sys/dev/pci/agpvar.h | 12 ++++----- sys/dev/pci/auixp.c | 6 ++--- sys/dev/pci/cs4280.c | 8 +++--- sys/dev/pci/oboe.c | 13 +++++----- sys/dev/pci/piixpm.c | 8 +++--- sys/dev/pci/twa.c | 6 ++--- sys/dev/pci/twavar.h | 5 +--- sys/dev/pci/yds.c | 6 +++-- sys/dev/pcmcia/if_cnw.c | 8 +++--- sys/dev/raidframe/rf_parityloggingdags.c | 22 ++++++++-------- sys/dev/raidframe/rf_parityloggingdags.h | 31 ++++++++++++----------- sys/dev/sequencer.c | 8 +++--- sys/dev/usb/if_udav.c | 7 +++--- sys/dev/usb/ubsa.c | 11 ++++---- sys/dev/usb/uvscom.c | 6 ++--- sys/kern/kern_synch.c | 6 ++--- sys/kern/kern_sysctl.c | 20 +++++++-------- sys/kern/vfs_lockf.c | 8 +++--- sys/netatalk/at_extern.h | 4 ++- sys/netatalk/at_rmx.c | 32 ++++++++++++------------ sys/netbt/hci_socket.c | 5 ++-- sys/netccitt/hd_debug.c | 19 +++++++------- sys/netccitt/hd_var.h | 6 ++--- sys/netccitt/llc_subr.c | 6 ++--- sys/netinet6/ip6_mroute.c | 13 +++++----- sys/netns/spp_debug.c | 27 ++++++++++---------- sys/netsmb/smb_subr.h | 3 ++- sys/sys/sysctl.h | 5 +--- 49 files changed, 229 insertions(+), 236 deletions(-) diff --git a/sys/arch/i386/i386/svr4_machdep.c b/sys/arch/i386/i386/svr4_machdep.c index 93a0f91ee689..92d66196dc60 100644 --- a/sys/arch/i386/i386/svr4_machdep.c +++ b/sys/arch/i386/i386/svr4_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_machdep.c,v 1.78 2006/06/07 22:37:58 kardel Exp $ */ +/* $NetBSD: svr4_machdep.c,v 1.79 2006/08/17 17:11:27 christos Exp $ */ /*- * Copyright (c) 1994, 2000 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svr4_machdep.c,v 1.78 2006/06/07 22:37:58 kardel Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_machdep.c,v 1.79 2006/08/17 17:11:27 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_vm86.h" @@ -208,7 +208,7 @@ svr4_setmcontext(l, mc, flags) #endif #ifdef DEBUG_SVR4 - svr4_printcontext("setmcontext", mc); + svr4_printmcontext("setmcontext", mc); #endif /* * XXX: What to do with floating point stuff? diff --git a/sys/arch/mips/include/svr4_machdep.h b/sys/arch/mips/include/svr4_machdep.h index dbc5691c0915..542e459d34a9 100644 --- a/sys/arch/mips/include/svr4_machdep.h +++ b/sys/arch/mips/include/svr4_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_machdep.h,v 1.3 2003/01/22 04:32:17 rafal Exp $ */ +/* $NetBSD: svr4_machdep.h,v 1.4 2006/08/17 17:11:27 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -73,10 +73,4 @@ typedef struct svr4_mcontext { svr4_fpregset_t svr4___fpregs; } svr4_mcontext_t; -#ifdef _KERNEL -int svr4_setmcontext(struct lwp *, svr4_mcontext_t *, unsigned long); -void *svr4_getmcontext(struct lwp *, svr4_mcontext_t *, unsigned long *); -#endif - - #endif /* _MIPS_SVR4_MACHDEP_H_ */ diff --git a/sys/compat/darwin/files.darwin b/sys/compat/darwin/files.darwin index ff85adf923fe..115871b52c85 100644 --- a/sys/compat/darwin/files.darwin +++ b/sys/compat/darwin/files.darwin @@ -1,4 +1,4 @@ -# $NetBSD: files.darwin,v 1.21 2005/12/11 12:19:56 christos Exp $ +# $NetBSD: files.darwin,v 1.22 2006/08/17 17:11:27 christos Exp $ # # Config file description for machine-independent Darwin compat code. # Included by ports that need it. @@ -22,6 +22,7 @@ file compat/darwin/darwin_route.c compat_darwin file compat/darwin/darwin_signal.c compat_darwin file compat/darwin/darwin_socket.c compat_darwin file compat/darwin/darwin_stat.c compat_darwin +file compat/darwin/darwin_syscalls.c compat_darwin file compat/darwin/darwin_sysent.c compat_darwin file compat/darwin/darwin_sysctl.c compat_darwin file compat/darwin/darwin_thread.c compat_darwin diff --git a/sys/compat/mach/mach_message.c b/sys/compat/mach/mach_message.c index 0fce01bed1d7..a5e7348181b6 100644 --- a/sys/compat/mach/mach_message.c +++ b/sys/compat/mach/mach_message.c @@ -1,4 +1,4 @@ -/* $NetBSD: mach_message.c,v 1.47 2005/12/11 12:20:20 christos Exp $ */ +/* $NetBSD: mach_message.c,v 1.48 2006/08/17 17:11:27 christos Exp $ */ /*- * Copyright (c) 2002-2003 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mach_message.c,v 1.47 2005/12/11 12:20:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mach_message.c,v 1.48 2006/08/17 17:11:27 christos Exp $"); #include "opt_ktrace.h" #include "opt_compat_mach.h" /* For COMPAT_MACH in */ @@ -435,6 +435,7 @@ mach_msg_recv(l, urm, option, recv_size, timeout, mn) int ret; int error = 0; + mp = NULL; if (option & MACH_RCV_TIMEOUT) timeout = timeout * hz / 1000; diff --git a/sys/compat/svr4/svr4_socket.c b/sys/compat/svr4/svr4_socket.c index f50641a24de9..0ef82e96bf27 100644 --- a/sys/compat/svr4/svr4_socket.c +++ b/sys/compat/svr4/svr4_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_socket.c,v 1.14 2006/06/27 09:09:40 pavel Exp $ */ +/* $NetBSD: svr4_socket.c,v 1.15 2006/08/17 17:11:27 christos Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svr4_socket.c,v 1.14 2006/06/27 09:09:40 pavel Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_socket.c,v 1.15 2006/08/17 17:11:27 christos Exp $"); #include #include @@ -96,7 +96,7 @@ svr4_find_socket(p, fp, dev, ino) void *cookie = ((struct socket *) fp->f_data)->so_internal; if (!initialized) { - DPRINTF(("svr4_find_socket: uninitialized [%p,%d,%d]\n", + DPRINTF(("svr4_find_socket: uninitialized [%p,%d,%lu]\n", p, dev, ino)); TAILQ_INIT(&svr4_head); initialized = 1; @@ -104,7 +104,7 @@ svr4_find_socket(p, fp, dev, ino) } - DPRINTF(("svr4_find_socket: [%p,%d,%d]: ", p, dev, ino)); + DPRINTF(("svr4_find_socket: [%p,%d,%lu]: ", p, dev, ino)); for (e = svr4_head.tqh_first; e != NULL; e = e->entries.tqe_next) if (e->p == p && e->dev == dev && e->ino == ino) { #ifdef DIAGNOSTIC @@ -138,7 +138,7 @@ svr4_delete_socket(p, fp) for (e = svr4_head.tqh_first; e != NULL; e = e->entries.tqe_next) if (e->p == p && e->cookie == cookie) { TAILQ_REMOVE(&svr4_head, e, entries); - DPRINTF(("svr4_delete_socket: %s [%p,%d,%d]\n", + DPRINTF(("svr4_delete_socket: %s [%p,%d,%lu]\n", e->sock.sun_path, p, e->dev, e->ino)); free(e, M_TEMP); return; @@ -178,7 +178,7 @@ svr4_add_socket(p, path, st) e->sock.sun_len = len; TAILQ_INSERT_HEAD(&svr4_head, e, entries); - DPRINTF(("svr4_add_socket: %s [%p,%d,%d]\n", e->sock.sun_path, + DPRINTF(("svr4_add_socket: %s [%p,%d,%lu]\n", e->sock.sun_path, p, e->dev, e->ino)); return 0; } diff --git a/sys/compat/svr4/svr4_sockio.c b/sys/compat/svr4/svr4_sockio.c index 963225232657..0a392eb66a1d 100644 --- a/sys/compat/svr4/svr4_sockio.c +++ b/sys/compat/svr4/svr4_sockio.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_sockio.c,v 1.23 2006/04/02 17:09:01 macallan Exp $ */ +/* $NetBSD: svr4_sockio.c,v 1.24 2006/08/17 17:11:27 christos Exp $ */ /*- * Copyright (c) 1995 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svr4_sockio.c,v 1.23 2006/04/02 17:09:01 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_sockio.c,v 1.24 2006/08/17 17:11:27 christos Exp $"); #include #include @@ -129,7 +129,9 @@ svr4_sock_ioctl(fp, l, retval, fd, cmd, data) ifa = ifa->ifa_list.tqe_next) lifnum.lifn_count++; - DPRINTF(("SIOCGLIFNUM %d\n", lifnum)); + DPRINTF(("SIOCGLIFNUM [family=%d,flags=%d,count=%d]\n", + lifnum.lifn_family, lifnum.lifn_flags, + lifnum.lifn_count)); return copyout(&lifnum, data, sizeof(lifnum)); } diff --git a/sys/contrib/dev/ath/netbsd/ah_osdep.c b/sys/contrib/dev/ath/netbsd/ah_osdep.c index 95cbf2b852d8..01cf4d373ad9 100644 --- a/sys/contrib/dev/ath/netbsd/ah_osdep.c +++ b/sys/contrib/dev/ath/netbsd/ah_osdep.c @@ -33,7 +33,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGES. * - * $Id: ah_osdep.c,v 1.6 2006/07/21 16:48:47 ad Exp $ + * $Id: ah_osdep.c,v 1.7 2006/08/17 17:11:27 christos Exp $ */ #include "opt_athhal.h" #include "athhal_options.h" @@ -178,7 +178,7 @@ void HALDEBUG(struct ath_hal *ah, const char* fmt, ...) { if (ath_hal_debug) { - __va_list ap; + va_list ap; va_start(ap, fmt); ath_hal_vprintf(ah, fmt, ap); va_end(ap); @@ -189,7 +189,7 @@ void HALDEBUGn(struct ath_hal *ah, u_int level, const char* fmt, ...) { if (ath_hal_debug >= level) { - __va_list ap; + va_list ap; va_start(ap, fmt); ath_hal_vprintf(ah, fmt, ap); va_end(ap); diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c index 6338908a45ad..987617e5bfff 100644 --- a/sys/dev/ic/adv.c +++ b/sys/dev/ic/adv.c @@ -1,4 +1,4 @@ -/* $NetBSD: adv.c,v 1.37 2005/12/11 12:21:25 christos Exp $ */ +/* $NetBSD: adv.c,v 1.38 2006/08/17 17:11:27 christos Exp $ */ /* * Generic driver for the Advanced Systems Inc. Narrow SCSI controllers @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: adv.c,v 1.37 2005/12/11 12:21:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adv.c,v 1.38 2006/08/17 17:11:27 christos Exp $"); #include #include @@ -708,7 +708,7 @@ out_bad: } #ifdef ASC_DEBUG - printf("id = 0, lun = 0, cmd = 0, ccb = 0x0 \n", + printf("id = %d, lun = %d, cmd = %d, ccb = 0x%lX\n", periph->periph_target, periph->periph_lun, xs->cmd->opcode, (unsigned long)ccb); diff --git a/sys/dev/ic/aha.c b/sys/dev/ic/aha.c index 559d6f302a00..d98e098bd071 100644 --- a/sys/dev/ic/aha.c +++ b/sys/dev/ic/aha.c @@ -1,4 +1,4 @@ -/* $NetBSD: aha.c,v 1.49 2005/12/24 20:27:29 perry Exp $ */ +/* $NetBSD: aha.c,v 1.50 2006/08/17 17:11:27 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aha.c,v 1.49 2005/12/24 20:27:29 perry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aha.c,v 1.50 2006/08/17 17:11:27 christos Exp $"); #include "opt_ddb.h" @@ -336,12 +336,12 @@ AGAIN: #ifdef AHADEBUG if (aha_debug) { - u_char *cp = &ccb->scsi_cmd; + u_char *cp = ccb->scsi_cmd; printf("op=%x %x %x %x %x %x\n", cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]); - printf("stat %x for mbi addr = 0x%08x, ", + printf("stat %x for mbi addr = %p, ", wmbi->stat, wmbi); - printf("ccb addr = 0x%x\n", ccb); + printf("ccb addr = %p\n", ccb); } #endif /* AHADEBUG */ diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c index 651e4a92fd6a..a4012ebec7b5 100644 --- a/sys/dev/ic/atw.c +++ b/sys/dev/ic/atw.c @@ -1,4 +1,4 @@ -/* $NetBSD: atw.c,v 1.117 2006/04/06 06:08:26 dyoung Exp $ */ +/* $NetBSD: atw.c,v 1.118 2006/08/17 17:11:27 christos Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.117 2006/04/06 06:08:26 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.118 2006/08/17 17:11:27 christos Exp $"); #include "bpfilter.h" @@ -1532,6 +1532,8 @@ atw_si4126_print(struct atw_softc *sc) struct ifnet *ifp = &sc->sc_if; u_int addr, val; + val = 0; + if (atw_debug < 3 || (ifp->if_flags & IFF_DEBUG) == 0) return; diff --git a/sys/dev/ic/bha.c b/sys/dev/ic/bha.c index 60c3fd581b92..846cee886475 100644 --- a/sys/dev/ic/bha.c +++ b/sys/dev/ic/bha.c @@ -1,4 +1,4 @@ -/* $NetBSD: bha.c,v 1.66 2006/05/21 23:56:09 christos Exp $ */ +/* $NetBSD: bha.c,v 1.67 2006/08/17 17:11:28 christos Exp $ */ /*- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bha.c,v 1.66 2006/05/21 23:56:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bha.c,v 1.67 2006/08/17 17:11:28 christos Exp $"); #include "opt_ddb.h" @@ -1559,7 +1559,7 @@ bha_finish_ccbs(struct bha_softc *sc) #ifdef BHADEBUG if (bha_debug) { - u_char *cp = &ccb->scsi_cmd; + u_char *cp = ccb->scsi_cmd; printf("op=%x %x %x %x %x %x\n", cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]); printf("comp_stat %x for mbi addr = %p, ", diff --git a/sys/dev/ic/ncr5380sbc.c b/sys/dev/ic/ncr5380sbc.c index a2344b795553..cb14e475ddf4 100644 --- a/sys/dev/ic/ncr5380sbc.c +++ b/sys/dev/ic/ncr5380sbc.c @@ -1,4 +1,4 @@ -/* $NetBSD: ncr5380sbc.c,v 1.58 2005/12/24 20:27:30 perry Exp $ */ +/* $NetBSD: ncr5380sbc.c,v 1.59 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1995 David Jones, Gordon W. Ross @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ncr5380sbc.c,v 1.58 2005/12/24 20:27:30 perry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ncr5380sbc.c,v 1.59 2006/08/17 17:11:28 christos Exp $"); #include "opt_ddb.h" @@ -2440,13 +2440,13 @@ int ncr5380_traceidx = 0; #define TRACE_MAX 1024 struct trace_ent { - char *msg; + const char *msg; long val; } ncr5380_tracebuf[TRACE_MAX]; void ncr5380_trace(msg, val) - char *msg; + const char *msg; long val; { struct trace_ent *tr; diff --git a/sys/dev/ic/ncr5380var.h b/sys/dev/ic/ncr5380var.h index b5c51200a266..c3a75f5e11ad 100644 --- a/sys/dev/ic/ncr5380var.h +++ b/sys/dev/ic/ncr5380var.h @@ -1,4 +1,4 @@ -/* $NetBSD: ncr5380var.h,v 1.29 2005/12/11 12:21:28 christos Exp $ */ +/* $NetBSD: ncr5380var.h,v 1.30 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1995 David Jones, Gordon W. Ross @@ -237,7 +237,7 @@ void ncr5380_init(struct ncr5380_softc *); #ifdef NCR5380_DEBUG struct ncr5380_softc *ncr5380_debug_sc; -void ncr5380_trace(char *msg, long val); +void ncr5380_trace(const char *msg, long val); #define NCR_TRACE(msg, val) ncr5380_trace(msg, val) #else /* NCR5380_DEBUG */ #define NCR_TRACE(msg, val) /* nada */ diff --git a/sys/dev/ic/opl.c b/sys/dev/ic/opl.c index ba711c61a8ca..528aa8304f7a 100644 --- a/sys/dev/ic/opl.c +++ b/sys/dev/ic/opl.c @@ -1,4 +1,4 @@ -/* $NetBSD: opl.c,v 1.27 2006/08/12 00:34:39 nakayama Exp $ */ +/* $NetBSD: opl.c,v 1.28 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: opl.c,v 1.27 2006/08/12 00:34:39 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opl.c,v 1.28 2006/08/17 17:11:28 christos Exp $"); #include #include @@ -617,8 +617,7 @@ oplsyn_releasev(midisyn *ms, uint_fast16_t voice, uint_fast8_t vel) struct opl_softc *sc = ms->data; struct opl_voice *v; - DPRINTFN(3, ("%s: %p %d %d\n", __func__, sc, voice, - MIDISYN_FREQ_TO_HZ(note))); + DPRINTFN(1, ("%s: %p %d\n", __func__, sc, voice)); #ifdef DIAGNOSTIC if (voice >= sc->syn.nvoice) { @@ -635,7 +634,7 @@ oplsyn_ctlnotice(midisyn *ms, midictl_evt evt, uint_fast8_t chan, uint_fast16_t key) { - DPRINTFN(1, ("%s: %p %d\n", __func__, sc, chan)); + DPRINTFN(1, ("%s: %p %d\n", __func__, ms->data, chan)); switch (evt) { case MIDICTL_RESET: diff --git a/sys/dev/ic/sl811hs.c b/sys/dev/ic/sl811hs.c index b2ebdaf6f608..d6ce5ee5c1ad 100644 --- a/sys/dev/ic/sl811hs.c +++ b/sys/dev/ic/sl811hs.c @@ -1,4 +1,4 @@ -/* $NetBSD: sl811hs.c,v 1.8 2006/07/17 19:29:31 christos Exp $ */ +/* $NetBSD: sl811hs.c,v 1.9 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.8 2006/07/17 19:29:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.9 2006/08/17 17:11:28 christos Exp $"); #include "opt_slhci.h" @@ -1535,7 +1535,7 @@ slhci_device_clear_toggle(usbd_pipe_handle pipe) void print_req(usb_device_request_t *r) { - char *xmes[]={ + const char *xmes[]={ "GETSTAT", "CLRFEAT", "res", @@ -1568,7 +1568,7 @@ print_req_hub(usb_device_request_t *r) struct { int req; int type; - char *str; + const char *str; } conf[] = { { 1, 0x20, "ClrHubFeat" }, { 1, 0x23, "ClrPortFeat" }, diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c index bb745d6c8daa..98f795c284f1 100644 --- a/sys/dev/ic/wdc.c +++ b/sys/dev/ic/wdc.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc.c,v 1.236 2006/03/18 10:59:58 bouyer Exp $ */ +/* $NetBSD: wdc.c,v 1.237 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1998, 2001, 2003 Manuel Bouyer. All rights reserved. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.236 2006/03/18 10:59:58 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.237 2006/08/17 17:11:28 christos Exp $"); #ifndef ATADEBUG #define ATADEBUG @@ -1151,7 +1151,7 @@ __wdcwait(struct ata_channel *chp, int mask, int bits, int timeout) else printf("%s:%d:%d: warning: busy-wait took %dus\n", atac->atac_dev.dv_xname, chp->ch_channel, - xfer->drive, + xfer->c_drive, WDCDELAY * xtime); } #endif diff --git a/sys/dev/isa/aic_isa.c b/sys/dev/isa/aic_isa.c index 0a8d18075010..bc6e529f79b3 100644 --- a/sys/dev/isa/aic_isa.c +++ b/sys/dev/isa/aic_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: aic_isa.c,v 1.16 2005/12/11 12:22:02 christos Exp $ */ +/* $NetBSD: aic_isa.c,v 1.17 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Charles M. Hannum. All rights reserved. @@ -51,7 +51,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aic_isa.c,v 1.16 2005/12/11 12:22:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic_isa.c,v 1.17 2006/08/17 17:11:28 christos Exp $"); #include #include @@ -127,7 +127,6 @@ aic_isa_probe(parent, match, aux) if (bus_space_map(iot, ia->ia_io[0].ir_addr, AIC_ISA_IOSIZE, 0, &ioh)) return (0); - AIC_TRACE(("aic_isa_probe: port 0x%x\n", ia->ia_iobase)); rv = aic_find(iot, ioh); bus_space_unmap(iot, ioh, AIC_ISA_IOSIZE); @@ -165,7 +164,6 @@ aic_isa_attach(parent, self, aux) sc->sc_iot = iot; sc->sc_ioh = ioh; - AIC_TRACE(("aic_isa_attach: port 0x%x\n", ia->ia_iobase)); if (!aic_find(iot, ioh)) { printf("%s: aic_find failed", sc->sc_dev.dv_xname); return; diff --git a/sys/dev/isa/if_eg.c b/sys/dev/isa/if_eg.c index c52329440f76..cee620ce228f 100644 --- a/sys/dev/isa/if_eg.c +++ b/sys/dev/isa/if_eg.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_eg.c,v 1.66 2005/12/11 12:22:02 christos Exp $ */ +/* $NetBSD: if_eg.c,v 1.67 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1993 Dean Huxley @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_eg.c,v 1.66 2005/12/11 12:22:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_eg.c,v 1.67 2006/08/17 17:11:28 christos Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -304,7 +304,6 @@ egreadPCB(iot, ioh, pcb) if (egreadPCBstat(iot, ioh, EG_PCB_DONE)) return 1; if (bus_space_read_1(iot, ioh, EG_COMMAND) != pcb[1] + 2) { - DPRINTF(("%d != %d\n", b, pcb[1] + 2)); return 1; } diff --git a/sys/dev/isa/if_we_isa.c b/sys/dev/isa/if_we_isa.c index 9ae3fccbbc33..d19f8ee627ce 100644 --- a/sys/dev/isa/if_we_isa.c +++ b/sys/dev/isa/if_we_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_we_isa.c,v 1.14 2006/01/29 21:42:41 dsl Exp $ */ +/* $NetBSD: if_we_isa.c,v 1.15 2006/08/17 17:11:28 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_we_isa.c,v 1.14 2006/01/29 21:42:41 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_we_isa.c,v 1.15 2006/08/17 17:11:28 christos Exp $"); #include #include @@ -522,7 +522,7 @@ we_params(asict, asich, typep, memsizep, flagp, is790p) int i; printf("we_params: type = 0x%x, typestr = %s, is16bit = %d, " - "memsize = %d\n", type, typestr, is16bit, memsize); + "memsize = %ld\n", type, typestr, is16bit, (u_long)memsize); for (i = 0; i < 8; i++) printf(" %d -> 0x%x\n", i, bus_space_read_1(asict, asich, i)); diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c index 1c91ca36d67d..3cf038183872 100644 --- a/sys/dev/isa/wds.c +++ b/sys/dev/isa/wds.c @@ -1,4 +1,4 @@ -/* $NetBSD: wds.c,v 1.62 2005/12/11 12:22:03 christos Exp $ */ +/* $NetBSD: wds.c,v 1.63 2006/08/17 17:11:28 christos Exp $ */ /* * XXX @@ -86,7 +86,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wds.c,v 1.62 2005/12/11 12:22:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wds.c,v 1.63 2006/08/17 17:11:28 christos Exp $"); #include "opt_ddb.h" @@ -212,6 +212,10 @@ void wdsattach(struct device *, struct device *, void *); CFATTACH_DECL(wds, sizeof(struct wds_softc), wdsprobe, wdsattach, NULL, NULL); +#ifdef WDSDEBUG +int wds_debug = 0; +#endif + #define WDS_ABORT_TIMEOUT 2000 /* time to wait for abort (mSec) */ integrate void @@ -462,12 +466,12 @@ AGAIN: #ifdef WDSDEBUG if (wds_debug) { - u_char *cp = &scb->scsipi_cmd; + u_char *cp = scb->cmd.xx; printf("op=%x %x %x %x %x %x\n", cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]); - printf("stat %x for mbi addr = 0x%08x, ", + printf("stat %x for mbi addr = %p, ", wmbi->stat, wmbi); - printf("scb addr = 0x%x\n", scb); + printf("scb addr = %p\n", scb); } #endif /* WDSDEBUG */ diff --git a/sys/dev/pci/agp.c b/sys/dev/pci/agp.c index 06e9293950ee..4f63ac50c8b4 100644 --- a/sys/dev/pci/agp.c +++ b/sys/dev/pci/agp.c @@ -1,4 +1,4 @@ -/* $NetBSD: agp.c,v 1.39 2006/07/30 04:23:44 simonb Exp $ */ +/* $NetBSD: agp.c,v 1.40 2006/08/17 17:11:28 christos Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -65,7 +65,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.39 2006/07/30 04:23:44 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.40 2006/08/17 17:11:28 christos Exp $"); #include #include @@ -577,9 +577,9 @@ agp_generic_bind_memory(struct agp_softc *sc, struct agp_memory *mem, for (j = 0; j < seg->ds_len && (done + j) < mem->am_size; j += AGP_PAGE_SIZE) { pa = seg->ds_addr + j; - AGP_DPF("binding offset %#lx to pa %#lx\n", + AGP_DPF(("binding offset %#lx to pa %#lx\n", (unsigned long)(offset + done + j), - (unsigned long)pa); + (unsigned long)pa)); error = AGP_BIND_PAGE(sc, offset + done + j, pa); if (error) { /* @@ -703,9 +703,9 @@ agp_find_memory(struct agp_softc *sc, int id) { struct agp_memory *mem; - AGP_DPF("searching for memory block %d\n", id); + AGP_DPF(("searching for memory block %d\n", id)); TAILQ_FOREACH(mem, &sc->as_memory, am_link) { - AGP_DPF("considering memory block %d\n", mem->am_id); + AGP_DPF(("considering memory block %d\n", mem->am_id)); if (mem->am_id == id) return mem; } diff --git a/sys/dev/pci/agpvar.h b/sys/dev/pci/agpvar.h index e518a9c735ad..a6f66887ecc5 100644 --- a/sys/dev/pci/agpvar.h +++ b/sys/dev/pci/agpvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: agpvar.h,v 1.11 2006/01/16 22:59:36 christos Exp $ */ +/* $NetBSD: agpvar.h,v 1.12 2006/08/17 17:11:28 christos Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -69,15 +69,13 @@ struct agp_memory_info { int ami_is_bound; /* non-zero if bound */ }; -#define AGP_DEBUGxx - #ifdef AGP_DEBUG -#define AGP_DPF(x...) do { \ +#define AGP_DPF(x) do { \ printf("agp: "); \ - printf(##x); \ -} while (0) + printf x; \ +} while (0) #else -#define AGP_DPF(x...) do {} while (0) +#define AGP_DPF(x) #endif #define AGPUNIT(x) minor(x) diff --git a/sys/dev/pci/auixp.c b/sys/dev/pci/auixp.c index e2847912960c..eaf95a5cca84 100644 --- a/sys/dev/pci/auixp.c +++ b/sys/dev/pci/auixp.c @@ -1,4 +1,4 @@ -/* $NetBSD: auixp.c,v 1.14 2006/06/17 23:34:26 christos Exp $ */ +/* $NetBSD: auixp.c,v 1.15 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 2004, 2005 Reinoud Zandijk @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: auixp.c,v 1.14 2006/06/17 23:34:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: auixp.c,v 1.15 2006/08/17 17:11:28 christos Exp $"); #include #include @@ -206,7 +206,7 @@ static void auixp_update_busbusy(struct auixp_softc *); #ifdef DEBUG_AUIXP static struct auixp_softc *static_sc; -sdtatic void auixp_dumpreg(void); +static void auixp_dumpreg(void); # define DPRINTF(x) printf x; #else # define DPRINTF(x) diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c index b5e6557c6b8c..6a596f1efaa0 100644 --- a/sys/dev/pci/cs4280.c +++ b/sys/dev/pci/cs4280.c @@ -1,4 +1,4 @@ -/* $NetBSD: cs4280.c,v 1.40 2006/08/06 16:21:11 jmcneill Exp $ */ +/* $NetBSD: cs4280.c,v 1.41 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1999, 2000 Tatoku Ogaito. All rights reserved. @@ -52,7 +52,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cs4280.c,v 1.40 2006/08/06 16:21:11 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cs4280.c,v 1.41 2006/08/17 17:11:28 christos Exp $"); #include "midi.h" @@ -622,7 +622,7 @@ cs4280_set_params(void *addr, int setmode, int usemode, p = mode == AUMODE_PLAY ? play : rec; if (p == play) { - DPRINTFN(5,("play: sample=%ld precision=%d channels=%d\n", + DPRINTFN(5,("play: sample=%d precision=%d channels=%d\n", p->sample_rate, p->precision, p->channels)); /* play back data format may be 8- or 16-bit and * either stereo or mono. @@ -634,7 +634,7 @@ cs4280_set_params(void *addr, int setmode, int usemode, return EINVAL; } } else { - DPRINTFN(5,("rec: sample=%ld precision=%d channels=%d\n", + DPRINTFN(5,("rec: sample=%d precision=%d channels=%d\n", p->sample_rate, p->precision, p->channels)); /* capture data format must be 16bit stereo * and sample rate range from 11025Hz to 48000Hz. diff --git a/sys/dev/pci/oboe.c b/sys/dev/pci/oboe.c index 787ff70bb3b7..5a992a18de2f 100644 --- a/sys/dev/pci/oboe.c +++ b/sys/dev/pci/oboe.c @@ -1,4 +1,4 @@ -/* $NetBSD: oboe.c,v 1.20 2005/12/11 12:22:50 christos Exp $ */ +/* $NetBSD: oboe.c,v 1.21 2006/08/17 17:11:28 christos Exp $ */ /* XXXXFVDL THIS DRIVER IS BROKEN FOR NON-i386 -- vtophys() usage */ @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: oboe.c,v 1.20 2005/12/11 12:22:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: oboe.c,v 1.21 2006/08/17 17:11:28 christos Exp $"); #include #include @@ -271,9 +271,8 @@ oboe_activate(struct device *self, enum devact act) static int oboe_detach(struct device *self, int flags) { -#if 0 struct oboe_softc *sc = (struct oboe_softc *)self; -#endif + /* XXX needs reference counting for proper detach. */ DPRINTF(("%s: sc=%p\n", __FUNCTION__, sc)); return (0); @@ -446,14 +445,14 @@ oboe_get_speeds(void *h, int *speeds) } static int -oboe_get_turnarounds(void *h, int *turnarounds) +oboe_get_turnarounds(void * h, int *turnarounds) { -#if 0 struct oboe_softc *sc = h; -#endif DPRINTF(("%s: sc=%p\n", __FUNCTION__, sc)); + /* XXX Linux driver sets all bits */ *turnarounds = IRDA_TURNT_10000; /* 10ms */ + return (0); } diff --git a/sys/dev/pci/piixpm.c b/sys/dev/pci/piixpm.c index 2b83b5a863b4..c0902c768f1d 100644 --- a/sys/dev/pci/piixpm.c +++ b/sys/dev/pci/piixpm.c @@ -1,4 +1,4 @@ -/* $NetBSD: piixpm.c,v 1.6 2006/06/26 18:21:39 drochner Exp $ */ +/* $NetBSD: piixpm.c,v 1.7 2006/08/17 17:11:28 christos Exp $ */ /* $OpenBSD: piixpm.c,v 1.20 2006/02/27 08:25:02 grange Exp $ */ /* @@ -296,8 +296,7 @@ piixpm_i2c_exec(void *cookie, i2c_op_t op, i2c_addr_t addr, break; DELAY(PIIXPM_DELAY); } - DPRINTF(("%s: exec: st 0x%b\n", sc->sc_dev.dv_xname, st, - PIIX_SMB_HS_BITS)); + DPRINTF(("%s: exec: st 0x%d\n", sc->sc_dev.dv_xname, st & 0xff)); if (st & PIIX_SMB_HS_BUSY) return (1); @@ -407,8 +406,7 @@ piixpm_intr(void *arg) /* Interrupt was not for us */ return (0); - DPRINTF(("%s: intr st 0x%b\n", sc->sc_dev.dv_xname, st, - PIIX_SMB_HS_BITS)); + DPRINTF(("%s: intr st 0x%d\n", sc->sc_dev.dv_xname, st & 0xff)); /* Clear status bits */ bus_space_write_1(sc->sc_smb_iot, sc->sc_smb_ioh, PIIX_SMB_HS, st); diff --git a/sys/dev/pci/twa.c b/sys/dev/pci/twa.c index 0ed3c631d00e..feb8324d3c6e 100644 --- a/sys/dev/pci/twa.c +++ b/sys/dev/pci/twa.c @@ -1,4 +1,4 @@ -/* $NetBSD: twa.c,v 1.9 2006/07/30 10:49:48 bouyer Exp $ */ +/* $NetBSD: twa.c,v 1.10 2006/08/17 17:11:28 christos Exp $ */ /* $wasabi: twa.c,v 1.27 2006/07/28 18:17:21 wrstuden Exp $ */ /*- @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.9 2006/07/30 10:49:48 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.10 2006/08/17 17:11:28 christos Exp $"); #include #include @@ -928,7 +928,7 @@ twa_recompute_openings(struct twa_softc *sc) #ifdef TWA_DEBUG printf("%s: %d array%s, %d openings per array\n", - sc->sc_twa.dv_xname, sc->sc_nunits, + sc->twa_dv.dv_xname, sc->sc_nunits, sc->sc_nunits == 1 ? "" : "s", sc->sc_openings); #endif for (unit = 0; unit < TWA_MAX_UNITS; unit++) { diff --git a/sys/dev/pci/twavar.h b/sys/dev/pci/twavar.h index 30eef95c2b02..9fbe8ce789ad 100644 --- a/sys/dev/pci/twavar.h +++ b/sys/dev/pci/twavar.h @@ -1,4 +1,4 @@ -/* $NetBSD: twavar.h,v 1.5 2006/07/11 00:25:42 simonb Exp $ */ +/* $NetBSD: twavar.h,v 1.6 2006/08/17 17:11:28 christos Exp $ */ /* $wasabi: twavar.h,v 1.12 2006/05/01 15:16:59 simonb Exp $ */ /*- @@ -90,9 +90,6 @@ struct twa_softc { /* Controller state. */ uint32_t twa_state; uint32_t twa_sc_flags; -#ifdef TWA_DEBUG - struct twa_q_statistics twa_qstats[TWAQ_COUNT]; /* queue statistics */ -#endif /* TWA_DEBUG */ struct _twa_ioctl_lock{ uint32_t lock; /* lock state */ diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c index 495153636a34..8d324d8bfe70 100644 --- a/sys/dev/pci/yds.c +++ b/sys/dev/pci/yds.c @@ -1,4 +1,4 @@ -/* $NetBSD: yds.c,v 1.32 2006/06/19 13:55:40 jmcneill Exp $ */ +/* $NetBSD: yds.c,v 1.33 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 2000, 2001 Kazuki Sakamoto and Minoura Makoto. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: yds.c,v 1.32 2006/06/19 13:55:40 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: yds.c,v 1.33 2006/08/17 17:11:28 christos Exp $"); #include "mpu.h" @@ -119,12 +119,14 @@ static uint32_t YREAD4(struct yds_softc *sc, bus_size_t r) return bus_space_read_4(sc->memt, sc->memh, r); } +#ifdef notdef static void YWRITE1(struct yds_softc *sc, bus_size_t r, uint8_t x) { DPRINTFN(5, (" YWRITE1(0x%lX,0x%lX)\n", (unsigned long)r, (unsigned long)x)); bus_space_write_1(sc->memt, sc->memh, r, x); } +#endif static void YWRITE2(struct yds_softc *sc, bus_size_t r, uint16_t x) { diff --git a/sys/dev/pcmcia/if_cnw.c b/sys/dev/pcmcia/if_cnw.c index f8be4bdefcb9..f2070250b686 100644 --- a/sys/dev/pcmcia/if_cnw.c +++ b/sys/dev/pcmcia/if_cnw.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_cnw.c,v 1.35 2006/07/21 16:48:52 ad Exp $ */ +/* $NetBSD: if_cnw.c,v 1.36 2006/08/17 17:11:28 christos Exp $ */ /*- * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -112,7 +112,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_cnw.c,v 1.35 2006/07/21 16:48:52 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_cnw.c,v 1.36 2006/08/17 17:11:28 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -667,7 +667,7 @@ cnw_start(ifp) if (lif == 0) { #ifdef CNW_DEBUG if (sc->sc_ethercom.ec_if.if_flags & IFF_DEBUG) - printf("%s: link integrity %d\n", lif); + printf("%s: link integrity %d\n", ifp->if_xname, lif); #endif break; } @@ -833,7 +833,7 @@ cnw_read(sc) read16(sc, buffer + 4); #ifdef CNW_DEBUG if (sc->sc_ethercom.ec_if.if_flags & IFF_DEBUG) - printf("%s: %d bytes @0x%x+0x%x\n", + printf("%s: %d bytes @0x%x+0x%lx\n", sc->sc_dev.dv_xname, bufbytes, buffer, bufptr - buffer - sc->sc_memoff); diff --git a/sys/dev/raidframe/rf_parityloggingdags.c b/sys/dev/raidframe/rf_parityloggingdags.c index 8e917bbaa7e1..b90a0db748c5 100644 --- a/sys/dev/raidframe/rf_parityloggingdags.c +++ b/sys/dev/raidframe/rf_parityloggingdags.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_parityloggingdags.c,v 1.15 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_parityloggingdags.c,v 1.16 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rf_parityloggingdags.c,v 1.15 2005/12/11 12:23:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_parityloggingdags.c,v 1.16 2006/08/17 17:11:28 christos Exp $"); #include "rf_archs.h" #include "opt_raid_diagnostic.h" @@ -323,13 +323,13 @@ rf_CommonCreateParityLoggingSmallWriteDAG( void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, - RF_RedFuncs_t * pfuncs, - RF_RedFuncs_t * qfuncs) + const RF_RedFuncs_t * pfuncs, + const RF_RedFuncs_t * qfuncs) { RF_DagNode_t *xorNodes, *blockNode, *unblockNode, *nodes; RF_DagNode_t *readDataNodes, *readParityNodes; RF_DagNode_t *writeDataNodes, *lpuNodes; - RF_DagNode_t *unlockDataNodes = NULL, *termNode; + RF_DagNode_t *termNode; RF_PhysDiskAddr_t *pda = asmap->physInfo; int numDataNodes = asmap->numStripeUnitsAccessed; int numParityNodes = (asmap->parityInfo->next) ? 2 : 1; @@ -337,7 +337,7 @@ rf_CommonCreateParityLoggingSmallWriteDAG( RF_ReconUnitNum_t which_ru; int (*func) (RF_DagNode_t * node), (*undoFunc) (RF_DagNode_t * node); int (*qfunc) (RF_DagNode_t * node); - char *name, *qname; + const char *name, *qname; RF_StripeNum_t parityStripeID = rf_RaidAddressToParityStripeID(&(raidPtr->Layout), asmap->raidAddress, &which_ru); #ifdef RAID_DIAGNOSTIC long nfaults = qfuncs ? 2 : 1; @@ -406,8 +406,7 @@ rf_CommonCreateParityLoggingSmallWriteDAG( RF_ASSERT(pda != NULL); readDataNodes[i].params[0].p = pda; /* physical disk addr * desc */ - readDataNodes[i].params[1].p = rf_AllocBuffer(raidPtr, dag_h, pda, allocList); /* buffer to hold old - * data */ + readDataNodes[i].params[1].p = rf_AllocBuffer(raidPtr, dag_h, pda->numSector << raidPtr->logBytesPerSector); /* buffer to hold old data */ readDataNodes[i].params[2].v = parityStripeID; readDataNodes[i].params[3].v = RF_CREATE_PARAM3(RF_IO_NORMAL_PRIORITY, which_ru); pda = pda->next; @@ -422,8 +421,7 @@ rf_CommonCreateParityLoggingSmallWriteDAG( RF_ASSERT(pda != NULL); rf_InitNode(&readParityNodes[i], rf_wait, RF_FALSE, rf_DiskReadFunc, rf_DiskReadUndoFunc, rf_GenericWakeupFunc, nNodes, 1, 4, 0, dag_h, "Rop", allocList); readParityNodes[i].params[0].p = pda; - readParityNodes[i].params[1].p = rf_AllocBuffer(raidPtr, dag_h, pda, allocList); /* buffer to hold old - * parity */ + readParityNodes[i].params[1].p = rf_AllocBuffer(raidPtr, dag_h, pda->numSector << raidPtr->logBytesPerSector); /* buffer to hold old parity */ readParityNodes[i].params[2].v = parityStripeID; readParityNodes[i].params[3].v = RF_CREATE_PARAM3(RF_IO_NORMAL_PRIORITY, which_ru); readParityNodes[i].propList[0] = NULL; @@ -628,8 +626,8 @@ rf_CreateParityLoggingSmallWriteDAG( void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, - RF_RedFuncs_t * pfuncs, - RF_RedFuncs_t * qfuncs) + const RF_RedFuncs_t * pfuncs, + const RF_RedFuncs_t * qfuncs) { dag_h->creator = "ParityLoggingSmallWriteDAG"; rf_CommonCreateParityLoggingSmallWriteDAG(raidPtr, asmap, dag_h, bp, flags, allocList, &rf_xorFuncs, NULL); diff --git a/sys/dev/raidframe/rf_parityloggingdags.h b/sys/dev/raidframe/rf_parityloggingdags.h index 412465acb17a..7e8bc4855654 100644 --- a/sys/dev/raidframe/rf_parityloggingdags.h +++ b/sys/dev/raidframe/rf_parityloggingdags.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_parityloggingdags.h,v 1.5 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_parityloggingdags.h,v 1.6 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -36,23 +36,24 @@ #define _RF__RF_PARITYLOGGINGDAGS_H_ /* routines that create DAGs */ -void -rf_CommonCreateParityLoggingLargeWriteDAG(RF_Raid_t * raidPtr, +void rf_CommonCreateParityLoggingLargeWriteDAG(RF_Raid_t * raidPtr, RF_AccessStripeMap_t * asmap, RF_DagHeader_t * dag_h, void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, int nfaults, int (*redFunc) (RF_DagNode_t *)); - void rf_CommonCreateParityLoggingSmallWriteDAG(RF_Raid_t * raidPtr, - RF_AccessStripeMap_t * asmap, RF_DagHeader_t * dag_h, - void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, - RF_RedFuncs_t * pfuncs, RF_RedFuncs_t * qfuncs); - void rf_CreateParityLoggingLargeWriteDAG(RF_Raid_t * raidPtr, - RF_AccessStripeMap_t * asmap, RF_DagHeader_t * dag_h, - void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, - int nfaults, int (*redFunc) (RF_DagNode_t *)); - void rf_CreateParityLoggingSmallWriteDAG(RF_Raid_t * raidPtr, - RF_AccessStripeMap_t * asmap, RF_DagHeader_t * dag_h, - void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, - RF_RedFuncs_t * pfuncs, RF_RedFuncs_t * qfuncs); +void rf_CommonCreateParityLoggingSmallWriteDAG(RF_Raid_t * raidPtr, + RF_AccessStripeMap_t * asmap, RF_DagHeader_t * dag_h, + void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, + const RF_RedFuncs_t * pfuncs, const RF_RedFuncs_t * qfuncs); + +void rf_CreateParityLoggingLargeWriteDAG(RF_Raid_t * raidPtr, + RF_AccessStripeMap_t * asmap, RF_DagHeader_t * dag_h, + void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, + int nfaults, int (*redFunc) (RF_DagNode_t *)); + +void rf_CreateParityLoggingSmallWriteDAG(RF_Raid_t * raidPtr, + RF_AccessStripeMap_t * asmap, RF_DagHeader_t * dag_h, + void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, + const RF_RedFuncs_t * pfuncs, const RF_RedFuncs_t * qfuncs); #endif /* !_RF__RF_PARITYLOGGINGDAGS_H_ */ diff --git a/sys/dev/sequencer.c b/sys/dev/sequencer.c index a9dad493288d..c5141b0c50cf 100644 --- a/sys/dev/sequencer.c +++ b/sys/dev/sequencer.c @@ -1,4 +1,4 @@ -/* $NetBSD: sequencer.c,v 1.32 2006/06/30 13:56:25 chap Exp $ */ +/* $NetBSD: sequencer.c,v 1.33 2006/08/17 17:11:27 christos Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.32 2006/06/30 13:56:25 chap Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.33 2006/08/17 17:11:27 christos Exp $"); #include "sequencer.h" @@ -740,7 +740,7 @@ seq_do_command(struct sequencer_softc *sc, seq_event_t *b) { int dev; - DPRINTFN(4, ("seq_do_command: %p cmd=0x%02x\n", sc, SEQ_CMD(b))); + DPRINTFN(4, ("seq_do_command: %p cmd=0x%02x\n", sc, b->timing.op)); switch(b->tag) { case SEQ_LOCAL: @@ -964,7 +964,7 @@ seq_do_timing(struct sequencer_softc *sc, seq_event_t *b) error = EINVAL; /* not quite accurate... */ break; default: - DPRINTF(("seq_timer: unknown %02x\n", cmd)); + DPRINTF(("seq_timer: unknown %02x\n", b->timing.op)); error = EINVAL; break; } diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c index ba41395b7d87..3ed8b03eb592 100644 --- a/sys/dev/usb/if_udav.c +++ b/sys/dev/usb/if_udav.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_udav.c,v 1.9 2006/02/25 00:58:35 wiz Exp $ */ +/* $NetBSD: if_udav.c,v 1.10 2006/08/17 17:11:28 christos Exp $ */ /* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */ /* * Copyright (c) 2003 @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.9 2006/02/25 00:58:35 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.10 2006/08/17 17:11:28 christos Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -1150,7 +1150,8 @@ udav_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) /* first byte in received data */ pktstat = mtod(m, u_int8_t *); m_adj(m, sizeof(u_int8_t)); - DPRINTF(("%s: RX Status: 0x%02x\n", *pktstat)); + DPRINTF(("%s: RX Status: 0x%02x\n", USBDEVNAME(sc->sc_dev), + *pktstat)); total_len = UGETW(mtod(m, u_int8_t *)); m_adj(m, sizeof(u_int16_t)); diff --git a/sys/dev/usb/ubsa.c b/sys/dev/usb/ubsa.c index 60d07d987308..fd7e6babd6ac 100644 --- a/sys/dev/usb/ubsa.c +++ b/sys/dev/usb/ubsa.c @@ -1,4 +1,4 @@ -/* $NetBSD: ubsa.c,v 1.13 2005/12/11 12:24:01 christos Exp $ */ +/* $NetBSD: ubsa.c,v 1.14 2006/08/17 17:11:28 christos Exp $ */ /*- * Copyright (c) 2002, Alexander Kabaev . * All rights reserved. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ubsa.c,v 1.13 2005/12/11 12:24:01 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ubsa.c,v 1.14 2006/08/17 17:11:28 christos Exp $"); #include #include @@ -372,7 +372,7 @@ USB_ATTACH(ubsa) USBDEV(sc->sc_dev)); DPRINTF(("ubsa: in = 0x%x, out = 0x%x, intr = 0x%x\n", - uca.bulkin_no, uca.bulkout_no, sc->sc_intr_number)); + uca.bulkin, uca.bulkout, sc->sc_intr_number)); sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &uca, ucomprint, ucomsubmatch); @@ -699,8 +699,7 @@ ubsa_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) return; DPRINTF(("%s: ubsa_intr: abnormal status: %s\n", - USBDEVNAME(sc->sc_ucom.sc_dev), - usbd_errstr(status))); + USBDEVNAME(sc->sc_dev), usbd_errstr(status))); usbd_clear_endpoint_stall_async(sc->sc_intr_pipe); return; } @@ -710,7 +709,7 @@ ubsa_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) sc->sc_msr = buf[3]; DPRINTF(("%s: ubsa lsr = 0x%02x, msr = 0x%02x\n", - USBDEVNAME(sc->sc_ucom.sc_dev), sc->sc_lsr, sc->sc_msr)); + USBDEVNAME(sc->sc_dev), sc->sc_lsr, sc->sc_msr)); ucom_status_change((struct ucom_softc *)sc->sc_subdev); } diff --git a/sys/dev/usb/uvscom.c b/sys/dev/usb/uvscom.c index a9674ff009df..35b03c3deed9 100644 --- a/sys/dev/usb/uvscom.c +++ b/sys/dev/usb/uvscom.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvscom.c,v 1.16 2005/12/11 12:24:01 christos Exp $ */ +/* $NetBSD: uvscom.c,v 1.17 2006/08/17 17:11:28 christos Exp $ */ /*- * Copyright (c) 2001-2002, Shunsuke Akiyama . * All rights reserved. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvscom.c,v 1.16 2005/12/11 12:24:01 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvscom.c,v 1.17 2006/08/17 17:11:28 christos Exp $"); #include #include @@ -395,7 +395,7 @@ USB_ATTACH(uvscom) } DPRINTF(("uvscom: in = 0x%x out = 0x%x intr = 0x%x\n", - ucom->sc_bulkin_no, ucom->sc_bulkout_no, sc->sc_intr_number)); + uca.bulkin, uca.bulkout, sc->sc_intr_number)); usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, USBDEV(sc->sc_dev)); diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index eb3496f6b04c..751b9a5c4bbd 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_synch.c,v 1.163 2006/07/08 00:23:29 matt Exp $ */ +/* $NetBSD: kern_synch.c,v 1.164 2006/08/17 17:11:28 christos Exp $ */ /*- * Copyright (c) 1999, 2000, 2004 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.163 2006/07/08 00:23:29 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.164 2006/08/17 17:11:28 christos Exp $"); #include "opt_ddb.h" #include "opt_ktrace.h" @@ -1313,7 +1313,7 @@ checkrunqueue(int whichq, struct lwp *l) int found = 0; int die = 0; int empty = 1; - for (l2 = rq->ph_link; l2 != (void*) rq; l2 = l2->l_forw) { + for (l2 = rq->ph_link; l2 != (const void*) rq; l2 = l2->l_forw) { if (l2->l_stat != LSRUN) { printf("checkrunqueue[%d]: lwp %p state (%d) " " != LSRUN\n", whichq, l2, l2->l_stat); diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index a0c4d546ec2d..6d02d06a0c2a 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sysctl.c,v 1.199 2006/07/30 17:38:19 elad Exp $ */ +/* $NetBSD: kern_sysctl.c,v 1.200 2006/08/17 17:11:28 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.199 2006/07/30 17:38:19 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.200 2006/08/17 17:11:28 christos Exp $"); #include "opt_defcorename.h" #include "ksyms.h" @@ -672,10 +672,6 @@ sysctl_query(SYSCTLFN_ARGS) return (error); } -#ifdef SYSCTL_DEBUG_CREATE -#undef sysctl_create -#endif /* SYSCTL_DEBUG_CREATE */ - /* * sysctl_create -- Adds a node (the description of which is taken * from newp) to the tree, returning a copy of it in the space pointed @@ -684,8 +680,14 @@ sysctl_query(SYSCTLFN_ARGS) * instead. Yes, this is complex, but we want to make sure everything * is proper. */ +#ifdef SYSCTL_DEBUG_CREATE +int _sysctl_create(SYSCTLFN_ARGS); +int +_sysctl_create(SYSCTLFN_ARGS) +#else int sysctl_create(SYSCTLFN_ARGS) +#endif { struct sysctlnode nnode, *node, *pnode; int error, ni, at, nm, type, sz, flags, anum, v; @@ -1189,9 +1191,8 @@ sysctl_create(SYSCTLFN_ARGS) * ******************************************************************** */ #ifdef SYSCTL_DEBUG_CREATE -int _sysctl_create(SYSCTLFN_PROTO); int -_sysctl_create(SYSCTLFN_ARGS) +sysctl_create(SYSCTLFN_ARGS) { const struct sysctlnode *node; int k, rc, ni, nl = namelen + (name - oname); @@ -1210,7 +1211,7 @@ _sysctl_create(SYSCTLFN_ARGS) node->sysctl_size); node = rnode; - rc = sysctl_create(SYSCTLFN_CALL(rnode)); + rc = _sysctl_create(SYSCTLFN_CALL(rnode)); printf("sysctl_create("); for (ni = 0; ni < nl - 1; ni++) @@ -1219,7 +1220,6 @@ _sysctl_create(SYSCTLFN_ARGS) return (rc); } -#define sysctl_create _sysctl_create #endif /* SYSCTL_DEBUG_CREATE */ /* diff --git a/sys/kern/vfs_lockf.c b/sys/kern/vfs_lockf.c index f52b9c55ef19..4e4b3b2e28fd 100644 --- a/sys/kern/vfs_lockf.c +++ b/sys/kern/vfs_lockf.c @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_lockf.c,v 1.55 2006/07/23 22:06:12 ad Exp $ */ +/* $NetBSD: vfs_lockf.c,v 1.56 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_lockf.c,v 1.55 2006/07/23 22:06:12 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_lockf.c,v 1.56 2006/08/17 17:11:28 christos Exp $"); #include #include @@ -126,7 +126,7 @@ int maxlocksperuid = 1024; * Print out a lock. */ static void -lf_print(char *tag, struct lockf *lock) +lf_print(const char *tag, struct lockf *lock) { printf("%s: lock %p for ", tag, lock); @@ -146,7 +146,7 @@ lf_print(char *tag, struct lockf *lock) } static void -lf_printlist(char *tag, struct lockf *lock) +lf_printlist(const char *tag, struct lockf *lock) { struct lockf *lf, *blk; diff --git a/sys/netatalk/at_extern.h b/sys/netatalk/at_extern.h index 9c97a088390b..9aa5471ae38d 100644 --- a/sys/netatalk/at_extern.h +++ b/sys/netatalk/at_extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: at_extern.h,v 1.12 2006/07/23 22:06:13 ad Exp $ */ +/* $NetBSD: at_extern.h,v 1.13 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1990,1994 Regents of The University of Michigan. @@ -49,6 +49,7 @@ void aarpinput __P((struct ifnet *, struct mbuf *)); int at_broadcast __P((struct sockaddr_at *)); void aarp_clean __P((void)); int at_control __P((u_long, caddr_t, struct ifnet *, struct lwp *)); +int at_inithead __P((void **, int)); void at_purgeaddr __P((struct ifaddr *, struct ifnet *)); void at_purgeif __P((struct ifnet *)); u_int16_t @@ -63,6 +64,7 @@ struct ddpcb * ddp_search __P((struct sockaddr_at *, struct sockaddr_at *, struct at_ifaddr *)); int ddp_route __P((struct mbuf *, struct route *)); +char * prsockaddr __P((const void *)); #endif /* !_NETATALK_AT_EXTERN_H_ */ diff --git a/sys/netatalk/at_rmx.c b/sys/netatalk/at_rmx.c index 149c0628952c..da2c8c266ad0 100644 --- a/sys/netatalk/at_rmx.c +++ b/sys/netatalk/at_rmx.c @@ -1,4 +1,4 @@ -/* $NetBSD: at_rmx.c,v 1.5 2005/12/11 12:24:54 christos Exp $ */ +/* $NetBSD: at_rmx.c,v 1.6 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright 1994, 1995 Massachusetts Institute of Technology @@ -34,7 +34,7 @@ /* This code generates debugging traces to the radix code */ #include -__KERNEL_RCSID(0, "$NetBSD: at_rmx.c,v 1.5 2005/12/11 12:24:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: at_rmx.c,v 1.6 2006/08/17 17:11:28 christos Exp $"); #include #include @@ -54,10 +54,10 @@ __KERNEL_RCSID(0, "$NetBSD: at_rmx.c,v 1.5 2005/12/11 12:24:54 christos Exp $"); static char hexbuf[256]; char * -prsockaddr(void *v) +prsockaddr(const void *v) { char *bp = &hexbuf[0]; - u_char *cp = v; + u_char *cp = __UNCONST(v); if (v) { int len = *cp; @@ -79,65 +79,65 @@ prsockaddr(void *v) } static struct radix_node * -at_addroute(void *v_arg, void *n_arg, struct radix_node_head * head, +at_addroute(const void *v_arg, const void *n_arg, struct radix_node_head * head, struct radix_node * treenodes) { struct radix_node *rn; printf("at_addroute: v=%s\n", prsockaddr(v_arg)); printf("at_addroute: n=%s\n", prsockaddr(n_arg)); - printf("at_addroute: head=%x treenodes=%x\n", head, treenodes); + printf("at_addroute: head=%p treenodes=%p\n", head, treenodes); rn = rn_addroute(v_arg, n_arg, head, treenodes); - printf("at_addroute: returns rn=%x\n", rn); + printf("at_addroute: returns rn=%p\n", rn); return rn; } static struct radix_node * -at_matroute(void *v_arg, struct radix_node_head * head) +at_matroute(const void *v_arg, struct radix_node_head * head) { struct radix_node *rn; printf("at_matroute: v=%s\n", prsockaddr(v_arg)); - printf("at_matroute: head=%x\n", head); + printf("at_matroute: head=%p\n", head); rn = rn_match(v_arg, head); - printf("at_matroute: returns rn=%x\n", rn); + printf("at_matroute: returns rn=%p\n", rn); return rn; } static struct radix_node * -at_lookup(void *v_arg, void *m_arg, struct radix_node_head * head) +at_lookup(const void *v_arg, const void *m_arg, struct radix_node_head * head) { struct radix_node *rn; printf("at_lookup: v=%s\n", prsockaddr(v_arg)); printf("at_lookup: n=%s\n", prsockaddr(m_arg)); - printf("at_lookup: head=%x\n", head); + printf("at_lookup: head=%p\n", head); rn = rn_lookup(v_arg, m_arg, head); - printf("at_lookup: returns rn=%x\n", rn); + printf("at_lookup: returns rn=%p\n", rn); return rn; } static struct radix_node * -at_delroute(void *v_arg, void *netmask_arg, struct radix_node_head * head) +at_delroute(const void *v_arg, const void *netmask_arg, struct radix_node_head * head) { struct radix_node *rn; printf("at_delroute: v=%s\n", prsockaddr(v_arg)); printf("at_delroute: n=%s\n", prsockaddr(netmask_arg)); - printf("at_delroute: head=%x\n", head); + printf("at_delroute: head=%p\n", head); rn = rn_delete(v_arg, netmask_arg, head); - printf("at_delroute: returns rn=%x\n", rn); + printf("at_delroute: returns rn=%p\n", rn); return rn; } diff --git a/sys/netbt/hci_socket.c b/sys/netbt/hci_socket.c index 5c30aa3cf718..96fe5be6aed1 100644 --- a/sys/netbt/hci_socket.c +++ b/sys/netbt/hci_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: hci_socket.c,v 1.2 2006/07/23 22:06:13 ad Exp $ */ +/* $NetBSD: hci_socket.c,v 1.3 2006/08/17 17:11:28 christos Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,11 +31,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.2 2006/07/23 22:06:13 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.3 2006/08/17 17:11:28 christos Exp $"); #include "opt_bluetooth.h" #ifdef BLUETOOTH_DEBUG -#define PRUREQUESTS #define PRCOREQUESTS #endif diff --git a/sys/netccitt/hd_debug.c b/sys/netccitt/hd_debug.c index 312153dc15a1..e49c92e9cf02 100644 --- a/sys/netccitt/hd_debug.c +++ b/sys/netccitt/hd_debug.c @@ -1,4 +1,4 @@ -/* $NetBSD: hd_debug.c,v 1.14 2005/12/11 12:24:54 christos Exp $ */ +/* $NetBSD: hd_debug.c,v 1.15 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1990, 1993 @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hd_debug.c,v 1.14 2005/12/11 12:24:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hd_debug.c,v 1.15 2006/08/17 17:11:28 christos Exp $"); #include #include @@ -100,9 +100,11 @@ struct hdlctrace { short ht_dir; struct mbuf *ht_frame; struct timeval ht_time; -} hdtrace[NTRACE]; +} hdtrace[NTRACE]; -int lasttracelogged, freezetrace; +static void hd_savetrace(struct hdcb*, int, struct mbuf*); + +int lasttracelogged, freezetrace; #endif void @@ -207,18 +209,17 @@ hd_savetrace(hdp, dir, m) struct mbuf *m; { struct hdlctrace *htp; - struct Hdlc_frame *frame = mtod(m, struct Hdlc_frame *); if (freezetrace) return; htp = &hdtrace[lasttracelogged]; lasttracelogged = (lasttracelogged + 1) % NTRACE; - if (m = htp->ht_frame) + if (m == htp->ht_frame) /* XXX not sure about it */ m_freem(m); htp->ht_frame = m_copy(m, 0, m->m_len); htp->ht_hdp = hdp; htp->ht_dir = dir; - htp->ht_time = time; + getmicrotime(&(htp->ht_time)); } void @@ -232,7 +233,7 @@ hd_dumptrace(hdp) hd_status(hdp); printf("retransmit queue:"); for (i = 0; i < 8; i++) - printf(" %x", hdp->hd_retxq[i]); + printf(" %p", hdp->hd_retxq[i]); printf("\n"); ltrace = hdp->hd_xcp->xc_ltrace; hdp->hd_xcp->xc_ltrace = 1; @@ -240,7 +241,7 @@ hd_dumptrace(hdp) htp = &hdtrace[(lasttracelogged + i) % NTRACE]; if (htp->ht_hdp != hdp || htp->ht_frame == 0) continue; - printf("%d/%d ", htp->ht_time.tv_sec & 0xff, + printf("%ld/%ld ", htp->ht_time.tv_sec & 0xff, htp->ht_time.tv_usec / 10000); hd_trace(htp->ht_hdp, htp->ht_dir, htp->ht_frame); m_freem(htp->ht_frame); diff --git a/sys/netccitt/hd_var.h b/sys/netccitt/hd_var.h index f0b8597efd62..62cf7f343add 100644 --- a/sys/netccitt/hd_var.h +++ b/sys/netccitt/hd_var.h @@ -1,4 +1,4 @@ -/* $NetBSD: hd_var.h,v 1.13 2005/12/10 23:31:41 elad Exp $ */ +/* $NetBSD: hd_var.h,v 1.14 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1990, 1993 @@ -150,7 +150,7 @@ extern int hd_n2; /* frame retransmission limit */ /* hd_debug.c */ void hd_trace __P((struct hdcb *, int , struct mbuf *)); -int hd_dumptrace __P((struct hdcb *)); +void hd_dumptrace __P((struct hdcb *)); /* hd_input.c */ void hdintr __P((void)); @@ -176,7 +176,7 @@ void hd_writeinternal __P((struct hdcb *, int, int )); void hd_append __P((struct hdtxq *, struct mbuf *)); void hd_flush __P((struct ifnet *)); void hd_message __P((struct hdcb *, const char *)); -int hd_status __P((struct hdcb *)); +void hd_status __P((struct hdcb *)); struct mbuf *hd_remove __P((struct hdtxq *)); /* hd_timer.c */ diff --git a/sys/netccitt/llc_subr.c b/sys/netccitt/llc_subr.c index 862ca35d2e6b..9e74314d8101 100644 --- a/sys/netccitt/llc_subr.c +++ b/sys/netccitt/llc_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: llc_subr.c,v 1.24 2006/05/14 21:19:34 elad Exp $ */ +/* $NetBSD: llc_subr.c,v 1.25 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: llc_subr.c,v 1.24 2006/05/14 21:19:34 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: llc_subr.c,v 1.25 2006/08/17 17:11:28 christos Exp $"); #include #include @@ -2181,7 +2181,7 @@ once_more_and_again: LLC_TRACE(linkp, LLCTR_URGENT, "FRMR SENT"); break; case LLC_FRMR_RECEIVED: - LLC_TRACE(linkp, LLCTR_URGEN, "FRMR RECEIVED"); + LLC_TRACE(linkp, LLCTR_URGENT, "FRMR RECEIVED"); action = (*linkp->llcl_statehandler) (linkp, frame, NL_RESET_REQUEST, 0, 0); diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 2d277953d721..6a58344791d4 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_mroute.c,v 1.72 2006/06/07 22:34:03 kardel Exp $ */ +/* $NetBSD: ip6_mroute.c,v 1.73 2006/08/17 17:11:28 christos Exp $ */ /* $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $ */ /* @@ -117,7 +117,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.72 2006/06/07 22:34:03 kardel Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.73 2006/08/17 17:11:28 christos Exp $"); #include "opt_inet.h" #include "opt_mrouting.h" @@ -717,9 +717,8 @@ add_m6if(mifcp) #ifdef MRT6DEBUG if (mrt6debug) log(LOG_DEBUG, - "add_mif #%d, phyint %s%d\n", - mifcp->mif6c_mifi, - ifp->if_name, ifp->if_unit); + "add_mif #%d, phyint %s\n", + mifcp->mif6c_mifi, ifp->if_xname); #endif return 0; @@ -841,7 +840,7 @@ add_m6fc(mfccp) #ifdef MRT6DEBUG if (mrt6debug & DEBUG_MFC) log(LOG_DEBUG, - "add_m6fc o %s g %s p %x dbg %x\n", + "add_m6fc o %s g %s p %x dbg %p\n", ip6_sprintf(&mfccp->mf6cc_origin.sin6_addr), ip6_sprintf(&mfccp->mf6cc_mcastgrp.sin6_addr), mfccp->mf6cc_parent, rt->mf6c_stall); @@ -883,7 +882,7 @@ add_m6fc(mfccp) #ifdef MRT6DEBUG if (mrt6debug & DEBUG_MFC) log(LOG_DEBUG, - "add_mfc no upcall h %d o %s g %s p %x\n", + "add_mfc no upcall h %ld o %s g %s p %x\n", hash, ip6_sprintf(&mfccp->mf6cc_origin.sin6_addr), ip6_sprintf(&mfccp->mf6cc_mcastgrp.sin6_addr), diff --git a/sys/netns/spp_debug.c b/sys/netns/spp_debug.c index 20f12f5e20c6..618dc164ee04 100644 --- a/sys/netns/spp_debug.c +++ b/sys/netns/spp_debug.c @@ -1,4 +1,4 @@ -/* $NetBSD: spp_debug.c,v 1.16 2005/12/11 12:25:16 christos Exp $ */ +/* $NetBSD: spp_debug.c,v 1.17 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1984, 1985, 1986, 1987, 1993 @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: spp_debug.c,v 1.16 2005/12/11 12:25:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spp_debug.c,v 1.17 2006/08/17 17:11:28 christos Exp $"); #include "opt_inet.h" @@ -50,6 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: spp_debug.c,v 1.16 2005/12/11 12:25:16 christos Exp #include #include +#include #include #include #include @@ -77,13 +78,15 @@ spp_trace(int act, u_int ostate, struct sppcb *sp, struct spidp *si, int req) #ifdef INET #ifdef SPPDEBUG u_short seq, ack, len, alo; - unsigned long iptime(); + u_long iptime; int flags; struct spp_debug *sd = &spp_debug[spp_debx++]; + iptime = 0; + if (spp_debx == SPP_NDEBUG) spp_debx = 0; - sd->sd_time = iptime(); + sd->sd_time = iptime; sd->sd_act = (short) act; sd->sd_ostate = ostate; sd->sd_cb = (caddr_t)sp; @@ -101,7 +104,7 @@ spp_trace(int act, u_int ostate, struct sppcb *sp, struct spidp *si, int req) if (ostate >= TCP_NSTATES) ostate = 0; if (act >= SA_DROP) act = SA_DROP; if (sp) - printf("%x %s:", sp, tcpstates[ostate]); + printf("%p %s:", sp, tcpstates[ostate]); else printf("???????? "); printf("%s ", sanames[act]); @@ -124,22 +127,20 @@ spp_trace(int act, u_int ostate, struct sppcb *sp, struct spidp *si, int req) len = ntohs(len); } #ifndef lint -#define p1(f) { printf("%s = %x, ", "f", f); } +#define p1(f) { printf("%s = %x, ", __STRING(f), f); } p1(seq); p1(ack); p1(alo); p1(len); #endif flags = si->si_cc; if (flags) { - char *cp = "<"; + printf("<"); #ifndef lint -#define pf(f) { if (flags&SP_/**/f) { printf("%s%s", cp, "f"); cp = ","; } } +#define pf(f) { if (flags & __CONCAT(SP_,f)) { printf(" %s",__STRING(f)); } } pf(SP); pf(SA); pf(OB); pf(EM); -#else - cp = cp; #endif - printf(">"); + printf(" >"); } #ifndef lint -#define p2(f) { printf("%s = %x, ", "f", si->si_/**/f); } +#define p2(f) { printf("%s = %x, ", __STRING(f), __CONCAT(si->si_,f)); } p2(sid);p2(did);p2(dt);p2(pt); #endif ns_printhost(&si->si_sna); @@ -164,7 +165,7 @@ spp_trace(int act, u_int ostate, struct sppcb *sp, struct spidp *si, int req) if (sp == 0) return; #ifndef lint -#define p3(f) { printf("%s = %x, ", "f", sp->s_/**/f); } +#define p3(f) { printf("%s = %x, ", __STRING(f), __CONCAT(sp->s_, f)); } printf("\t"); p3(rack);p3(ralo);p3(smax);p3(flags); printf("\n"); #endif #endif diff --git a/sys/netsmb/smb_subr.h b/sys/netsmb/smb_subr.h index a4e641880868..591b808c7208 100644 --- a/sys/netsmb/smb_subr.h +++ b/sys/netsmb/smb_subr.h @@ -1,4 +1,4 @@ -/* $NetBSD: smb_subr.h,v 1.15 2006/05/14 21:20:13 elad Exp $ */ +/* $NetBSD: smb_subr.h,v 1.16 2006/08/17 17:11:29 christos Exp $ */ /* * Copyright (c) 2000-2001, Boris Popov @@ -58,6 +58,7 @@ MALLOC_DECLARE(M_SMBTEMP); #endif #ifdef SMB_SOCKETDATA_DEBUG +struct mbuf; void m_dumpm(struct mbuf *m); #else #define m_dumpm(m) diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 6f8824e2e3ae..288510f8c31b 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: sysctl.h,v 1.155 2006/07/30 17:38:19 elad Exp $ */ +/* $NetBSD: sysctl.h,v 1.156 2006/08/17 17:11:29 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -1045,9 +1045,6 @@ void sysctl_unlock(struct lwp *); int sysctl_locate(struct lwp *, const int *, u_int, const struct sysctlnode **, int *); int sysctl_query(SYSCTLFN_PROTO); -#ifdef SYSCTL_DEBUG_CREATE -#define sysctl_create _sysctl_create -#endif /* SYSCTL_DEBUG_CREATE */ int sysctl_create(SYSCTLFN_PROTO); int sysctl_destroy(SYSCTLFN_PROTO); int sysctl_lookup(SYSCTLFN_PROTO);