Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1372446 > unrolled thread
| Started by | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| First post | 2016-04-06 13:40 +0200 |
| Last post | 2016-04-07 03:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[patch] ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset() Dan Carpenter <dan.carpenter@oracle.com> - 2016-04-06 13:40 +0200
Re: [alsa-devel] [patch] ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset() Yang Jie <yang.jie@linux.intel.com> - 2016-04-07 03:20 +0200
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2016-04-06 13:40 +0200 |
| Subject | [patch] ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset() |
| Message-ID | <rkTYv-387-27@gated-at.bofh.it> |
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",
[toc] | [next] | [standalone]
| From | Yang Jie <yang.jie@linux.intel.com> |
|---|---|
| Date | 2016-04-07 03:20 +0200 |
| Subject | Re: [alsa-devel] [patch] ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset() |
| Message-ID | <rl6M2-4lH-17@gated-at.bofh.it> |
| In reply to | #1372446 |
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
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web