Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754743AbcDGBOW (ORCPT ); Wed, 6 Apr 2016 21:14:22 -0400 Received: from mga02.intel.com ([134.134.136.20]:45827 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753804AbcDGBOU (ORCPT ); Wed, 6 Apr 2016 21:14:20 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,448,1455004800"; d="scan'208";a="927109974" Subject: Re: [alsa-devel] [patch] ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset() To: Dan Carpenter References: <20160406113606.GA23032@mwanda> Cc: alsa-devel@alsa-project.org, Liam Girdwood , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Takashi Iwai , Mark Brown From: Yang Jie Message-ID: <5705B5FE.8030105@linux.intel.com> Date: Thu, 7 Apr 2016 09:21:02 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20160406113606.GA23032@mwanda> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1082 Lines: 35 On 2016年04月06日 19:36, Dan Carpenter wrote: > In the original code we ended the loop with tries set to -1 instead of > zero. > > Signed-off-by: Dan Carpenter Acked-by: Jie Yang Dan, thanks for finding and correcting it. Thanks, ~Keyon > --- > Not tested. > > diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c b/sound/soc/intel/haswell/sst-haswell-ipc.c > index ac60f13..9156522 100644 > --- a/sound/soc/intel/haswell/sst-haswell-ipc.c > +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c > @@ -1345,7 +1345,7 @@ int sst_hsw_stream_reset(struct sst_hsw *hsw, struct sst_hsw_stream *stream) > return 0; > > /* wait for pause to complete before we reset the stream */ > - while (stream->running && tries--) > + while (stream->running && --tries) > msleep(1); > if (!tries) { > dev_err(hsw->dev, "error: reset stream %d still running\n", > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel >