From: Doug Ledford <dledford@redhat.com>
To: Andris Pavenis <pavenis@latnet.lv>
Cc: Nathan Bryant <nbryant@optonline.net>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i810_audio fix for version 0.11
Date: Mon, 10 Dec 2001 19:42:19 -0500 [thread overview]
Message-ID: <3C15566B.7010803@redhat.com> (raw)
In-Reply-To: <Pine.A41.4.05.10112081022560.23064-100000@ieva06> <200112080925.fB89PJ200926@hal.astr.lu.lv> <3C11DF15.1020107@redhat.com> <200112080945.fB89jAC00998@hal.astr.lu.lv>
Andris Pavenis wrote:
> Why returning non zero from __start_dac() and similar procedures when
> something real has been done there is so bad.
Personal preference.
> Using such return code would
> ensure we never try to wait for results of __start_dac() if nothing is done
> by this procedure.
That's part of the point. In this driver, I try to control when things are
done and keep track of them in a deterministic way. Using a return code to
tell us a function we called did nothing when we shouldn't have called it in
the first place if it wasn't going to do anything is backwards from the way
I prefer to handle things. Namely, find out why the function was called
when it shouldn't have been and solve the problem. Note: I don't follow
that philosophy on all functions, only on very simple ones like this, there
are a lot of complex functions where you want the function to make those
decisions. So, like I said, personal preference on how to handle these things.
> I think such way is also more safe against possible future
> modifications as real conditions are only in a single place. Keeping them in
> 2 places is possible source of bitrot if driver will be updated in future.
It's intended to do exactly that. A lot of what makes this driver work
properly right now is the LVI handling. That was severly busted when I
first got hold of the driver. I *want* things to break if the LVI handling
is changed by someone else because that will alert me to the fact that the
LVI handling is then busted (at least, if they change it incorrectly, if
they do things right then they will catch problems like this and fix them
properly and I won't have to do anything).
--
Doug Ledford <dledford@redhat.com> http://people.redhat.com/dledford
Please check my web site for aic7xxx updates/answers before
e-mailing me about problems
next prev parent reply other threads:[~2001-12-11 0:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-07 16:03 [PATCH] i810_audio fix for version 0.11 Andris Pavenis
2001-12-07 17:18 ` Nathan Bryant
2001-12-07 17:37 ` Andris Pavenis
2001-12-07 17:55 ` Doug Ledford
2001-12-07 18:36 ` Doug Ledford
2001-12-08 8:39 ` Andris Pavenis
2001-12-08 9:25 ` Andris Pavenis
2001-12-08 9:36 ` Doug Ledford
2001-12-08 9:45 ` Andris Pavenis
2001-12-11 0:42 ` Doug Ledford [this message]
2001-12-11 6:59 ` Andris Pavenis
2001-12-27 11:10 ` i810_audio driver version 0.13 still broken Andris Pavenis
2001-12-27 21:44 ` Nathan Bryant
2001-12-28 7:16 ` Andris Pavenis
2001-12-28 20:14 ` Nathan Bryant
2002-01-05 12:29 ` Andris Pavenis
2001-12-31 4:06 ` Nick Papadonis
-- strict thread matches above, loose matches on Subject: below --
2001-12-07 2:44 [PATCH] i810_audio fix for version 0.11 Nathan Bryant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C15566B.7010803@redhat.com \
--to=dledford@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nbryant@optonline.net \
--cc=pavenis@latnet.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox