Source-Changes-HG archive

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

[src/jmcneill-audiomp3]: src/sys/dev adjust some DPRINTF*() calls so that the...



details:   https://anonhg.NetBSD.org/src/rev/845e46db1b86
branches:  jmcneill-audiomp3
changeset: 771394:845e46db1b86
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Nov 22 07:54:45 2011 +0000

description:
adjust some DPRINTF*() calls so that they compile now.

diffstat:

 sys/dev/midi.c |  27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diffs (102 lines):

diff -r 9e6ace08557b -r 845e46db1b86 sys/dev/midi.c
--- a/sys/dev/midi.c    Tue Nov 22 06:11:12 2011 +0000
+++ b/sys/dev/midi.c    Tue Nov 22 07:54:45 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: midi.c,v 1.72.10.1 2011/11/19 21:49:35 jmcneill Exp $  */
+/*     $NetBSD: midi.c,v 1.72.10.2 2011/11/22 07:54:45 mrg Exp $       */
 
 /*
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.72.10.1 2011/11/19 21:49:35 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.72.10.2 2011/11/22 07:54:45 mrg Exp $");
 
 #include "midi.h"
 #include "sequencer.h"
@@ -838,11 +838,11 @@
        struct midi_softc *sc;
        const struct midi_hw_if *hw;
 
-       DPRINTFN(3,("midiclose %p\n", sc));
-
        sc = device_lookup_private(&midi_cd, MIDIUNIT(dev));
        hw = sc->hw_if;
 
+       DPRINTFN(3,("midiclose %p\n", sc));
+
        mutex_enter(sc->lock);
        /* midi_start_output(sc); anything buffered => pbus already set! */
        while (sc->pbus) {
@@ -869,13 +869,13 @@
        MIDI_BUF_DECLARE(idx);
        MIDI_BUF_DECLARE(buf);
 
-       DPRINTFN(6,("midiread: %p, count=%lu\n", sc,
-           (unsigned long)uio->uio_resid));
-
        sc = device_lookup_private(&midi_cd, MIDIUNIT(dev));
        mb = &sc->inbuf;
        first = 1;
 
+       DPRINTFN(6,("midiread: %p, count=%lu\n", sc,
+           (unsigned long)uio->uio_resid));
+
        mutex_enter(sc->lock);
        if (sc->dying) {
                mutex_exit(sc->lock);
@@ -1261,7 +1261,7 @@
                softint_schedule(sc->sih);
        }
        if (error) {
-               DPRINTF(("midi_intr_output error %d\n", error))
+               DPRINTF(("midi_intr_output error %d\n", error));
        }
        return error;
 }
@@ -1393,10 +1393,11 @@
        size_t xfrcount;
        int pollout = 0;
 
+       sc = device_lookup_private(&midi_cd, MIDIUNIT(dev));
+
        DPRINTFN(6,("midiwrite: %p, unit=%d, count=%lu\n", sc, (int)minor(dev),
            (unsigned long)uio->uio_resid));
 
-       sc = device_lookup_private(&midi_cd, MIDIUNIT(dev));
        mutex_enter(sc->lock);
        if (sc->dying) {
                mutex_exit(sc->lock);
@@ -1527,14 +1528,14 @@
        int error;
        MIDI_BUF_DECLARE(buf);
 
-       DPRINTFN(5,("midiioctl: %p cmd=0x%08lx\n", sc, cmd));
-
        sc = device_lookup_private(&midi_cd, MIDIUNIT(dev));;
        if (sc->dying)
                return EIO;
        hw = sc->hw_if;
        error = 0;
 
+       DPRINTFN(5,("midiioctl: %p cmd=0x%08lx\n", sc, cmd));
+
        switch (cmd) {
        case FIONBIO:
                /* All handled in the upper layer. */
@@ -1611,11 +1612,11 @@
        MIDI_BUF_DECLARE(idx);
        MIDI_BUF_DECLARE(buf);
 
-       DPRINTFN(6,("midipoll: %p events=0x%x\n", sc, events));
-
        sc = device_lookup_private(&midi_cd, MIDIUNIT(dev));
        revents = 0;
 
+       DPRINTFN(6,("midipoll: %p events=0x%x\n", sc, events));
+
        mutex_enter(sc->lock);
        if (sc->dying) {
                mutex_exit(sc->lock);



Home | Main Index | Thread Index | Old Index