From: Takashi Iwai Subject: Re: [PATCH] ASoC: Fix warning from strict_strtoul() Date: Sat, 05 Jul 2008 09:43:55 +0200 Message-ID: References: <1215183674-13038-1-git-send-email-broonie@opensource.wolfsonmicro.com> <20080704195753.GA20719@sirena.org.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (ns.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 820CA243DA for ; Sat, 5 Jul 2008 09:43:58 +0200 (CEST) In-Reply-To: <20080704195753.GA20719@sirena.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Fri, 4 Jul 2008 20:57:54 +0100, Mark Brown wrote: > > On Fri, Jul 04, 2008 at 05:09:36PM +0200, Takashi Iwai wrote: > > (BTW, at the next time, a bit more patch description would be helpful. > > For example, in this case, it's actually not about warning but the > > behavior of strict_strtoul() that resets the value, if I understand > > correctly.) > > It is a warning fix - I was passing the wrong type of variable to > strict_strtoul(), though on most architectures int and long are the same > in memory so the behaviour before and after the change is identical. > The fix is to pass a temporary variable of the correct type in and then > assign the result to pop_time rather than passing pop_time in directly. Ah, OK, that I totally missed. Anyway this also fixes another strange behavior - strict_strtoul() stores 0 when it gets a parse error. So, in the older version, the pop_wait itself is reset to 0 at error while the value is kept in the newer version. thanks, Takashi