From: Takashi Iwai Subject: Re: [PATCH] ASoC: Fix warning from strict_strtoul() Date: Fri, 04 Jul 2008 17:09:36 +0200 Message-ID: References: <1215183674-13038-1-git-send-email-broonie@opensource.wolfsonmicro.com> 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 mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id D761D24A75 for ; Fri, 4 Jul 2008 17:09:37 +0200 (CEST) In-Reply-To: <1215183674-13038-1-git-send-email-broonie@opensource.wolfsonmicro.com> 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 16:01:14 +0100, Mark Brown wrote: > > Signed-off-by: Mark Brown Thanks, applied. (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.) Takashi > --- > sound/soc/soc-dapm.c | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c > index 9e83357..456d78a 100644 > --- a/sound/soc/soc-dapm.c > +++ b/sound/soc/soc-dapm.c > @@ -808,7 +808,11 @@ static ssize_t dapm_pop_time_store(struct device *dev, > const char *buf, size_t count) > > { > - if (strict_strtoul(buf, 10, &pop_time) < 0) > + unsigned long val; > + > + if (strict_strtoul(buf, 10, &val) >= 0) > + pop_time = val; > + else > printk(KERN_ERR "Unable to parse pop_time setting\n"); > > return count; > -- > 1.5.6 >