* [patch] ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset()
@ 2016-04-06 11:36 Dan Carpenter
2016-04-07 1:21 ` [alsa-devel] " Yang Jie
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-04-06 11:36 UTC (permalink / raw)
To: Jie Yang
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
alsa-devel, linux-kernel, kernel-janitors
In the original code we ended the loop with tries set to -1 instead of
zero.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
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",
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [alsa-devel] [patch] ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset()
2016-04-06 11:36 [patch] ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset() Dan Carpenter
@ 2016-04-07 1:21 ` Yang Jie
0 siblings, 0 replies; 2+ messages in thread
From: Yang Jie @ 2016-04-07 1:21 UTC (permalink / raw)
To: Dan Carpenter
Cc: alsa-devel, Liam Girdwood, kernel-janitors, linux-kernel,
Takashi Iwai, Mark Brown
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 <dan.carpenter@oracle.com>
Acked-by: Jie Yang <yang.jie@intel.com>
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-07 1:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-06 11:36 [patch] ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset() Dan Carpenter
2016-04-07 1:21 ` [alsa-devel] " Yang Jie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).