From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: re.Fix hang in mpu401_uart.c patch Date: Thu, 18 May 2006 14:46:02 +0200 Message-ID: References: <200605101556.50928.gineera@aspect135.co.uk> <200605152245.45507.gineera@aspect135.co.uk> <35fb2e590605161050r63959b08h4f85e1d6cff54f6d@mail.gmail.com> <200605172200.02739.gineera@aspect135.co.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <200605172200.02739.gineera@aspect135.co.uk> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Alan Horstmann Cc: Jon Masters , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org 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 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