Source-Changes-D archive

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

Re: CVS commit: src/sys/dev



    Date:        Tue, 21 Feb 2017 20:23:37 +0000
    From:        "Nathanial Sloss" <nat%netbsd.org@localhost>
    Message-ID:  <20170221202337.A4C46FBE4%cvs.NetBSD.org@localhost>

  | Modified Files:
  | 	src/sys/dev: audio.c

In addition to Christos' comments, I see this pattern (in the diff)
repeated a few times...

+                       error = audio_waitio(sc, &sc->sc_wchan, vc);
                        if (sc->sc_dying)
                                error = EIO;
                        if (error)

Note that I have no idea of the answer to this question, but which error
code is more important there?

Often the "if (sc->sc_dying)" test would be "if (error == 0 && sc->sc_dying)"
so the first error detected is the one returned, but perhaps the EIO for
the dying case is considered more important?   If so, at least a comment
would help.

kre



Home | Main Index | Thread Index | Old Index