All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Alan Horstmann <gineera@aspect135.co.uk>
Cc: Jon Masters <jonathan@jonmasters.org>, alsa-devel@lists.sourceforge.net
Subject: Re: re.Fix hang in mpu401_uart.c patch
Date: Thu, 18 May 2006 14:46:02 +0200	[thread overview]
Message-ID: <s5hmzdffqlx.wl%tiwai@suse.de> (raw)
In-Reply-To: <200605172200.02739.gineera@aspect135.co.uk>

At Wed, 17 May 2006 22:45:21 +0100,
Alan Horstmann wrote:
> 
> On Tuesday 16 May 2006 18:50, you wrote:
> > Ok. I signed up to alsa-devel and read the thread...
> >
> > On 5/15/06, Alan Horstmann <gineera@aspect135.co.uk> wrote:
> > > > > > However, as the 3rd augument is '0' ie don't check ACK, OK is
> > > > > > always true in snd_mpu401_uart_cmd and there is surely no point to
> > > > > > the extra check lines?
> >
> > IIRC I added the extra checks you refer to for completeness (it's bad
> > form not to check return), but the error path in snd_mpu401_uart_cmd
> > is getting called on my system when it's called during init -
> > printk()ing a warning is useless, the function should return an error.
> >
> > What's the problem anyway that you're experiencing?
> 
> It's no big deal -it's not causing any problems, and I understand entirely why 
> the function should be able to return error, and that the return should be 
> checked.  However I just noticed that in the case of the 2 'close' functions, 
> calling snd_mpu401_uart_cmd with 3rd arg '0', an error could never be 
> returned (ok always=1), and so there is no point in checking for it.  As 
> Takashi is normally keen to omit any unnecessary lines, I thought I would 
> mention it.

Yeah it's a small dead code right now.

But in this case it's better to keep the error check for possible
future changes (for example, snd_mpu401_uart_cmd() returns an error
when tx timeout occurs).  If we remove the error check there, this
change would have no effect, too.


Takashi


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

      reply	other threads:[~2006-05-18 12:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10 15:10 re.Fix hang in mpu401_uart.c patch Alan Horstmann
2006-05-11 14:07 ` Takashi Iwai
2006-05-13 12:04   ` Alan Horstmann
2006-05-15 21:45     ` Alan Horstmann
2006-05-15 23:45       ` Jon Masters
2006-05-16 17:50       ` Jon Masters
2006-05-17 21:45         ` Alan Horstmann
2006-05-18 12:46           ` Takashi Iwai [this message]

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=s5hmzdffqlx.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=gineera@aspect135.co.uk \
    --cc=jonathan@jonmasters.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.