Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/bluetooth add __USE for debugging variables



details:   https://anonhg.NetBSD.org/src/rev/ffc6e66e5b6e
branches:  trunk
changeset: 790588:ffc6e66e5b6e
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Oct 17 21:22:01 2013 +0000

description:
add __USE for debugging variables

diffstat:

 sys/dev/bluetooth/bcsp.c |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (53 lines):

diff -r 7e5999a066bf -r ffc6e66e5b6e sys/dev/bluetooth/bcsp.c
--- a/sys/dev/bluetooth/bcsp.c  Thu Oct 17 21:20:10 2013 +0000
+++ b/sys/dev/bluetooth/bcsp.c  Thu Oct 17 21:22:01 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcsp.c,v 1.21 2012/06/02 21:36:43 dsl Exp $    */
+/*     $NetBSD: bcsp.c,v 1.22 2013/10/17 21:22:01 christos Exp $       */
 /*
  * Copyright (c) 2007 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.21 2012/06/02 21:36:43 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.22 2013/10/17 21:22:01 christos Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -722,8 +722,12 @@
        }
        if (discard) {
 discarded:
+#ifdef BCSP_DEBUG
                DPRINTFN(4, ("%s: receives unexpected byte 0x%02x: %s\n",
                    device_xname(sc->sc_dev), c, errstr));
+#else
+               __USE(errstr);
+#endif
        }
        sc->sc_stats.byte_rx++;
 
@@ -782,7 +786,7 @@
        u_int pldlen;
        int discard = 0;
        uint16_t crc = 0xffff;
-       const char *errstr;
+       const char *errstr 
 
        DPRINTFN(3, ("%s: pi receive\n", device_xname(sc->sc_dev)));
 #ifdef BCSP_DEBUG
@@ -836,8 +840,12 @@
 
        if (discard) {
 discarded:
+#ifdef BCSP_DEBUG
                DPRINTFN(3, ("%s: receives unexpected packet: %s\n",
                    device_xname(sc->sc_dev), errstr));
+#else
+               __USE(errstr);
+#endif
                m_freem(m);
        } else
                bcsp_mux_receive(sc, m);



Home | Main Index | Thread Index | Old Index