kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] [media] media: ti-vpe: vpdma: fix a timeout loop
@ 2016-11-25 21:28 Dan Carpenter
  2016-11-28 16:51 ` Benoit Parrot
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-11-25 21:28 UTC (permalink / raw)
  To: Benoit Parrot, Nikhil Devshatwar
  Cc: Mauro Carvalho Chehab, linux-media, kernel-janitors

The check assumes that we end on zero but actually we end on -1.  Change
the post-op to a pre-op so that we do end on zero.  Techinically now we
only loop 499 times instead of 500 but that's fine.

Fixes: dc12b124353b ("[media] media: ti-vpe: vpdma: Add abort channel desc and cleanup APIs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/media/platform/ti-vpe/vpdma.c b/drivers/media/platform/ti-vpe/vpdma.c
index 13bfd71..23472e3 100644
--- a/drivers/media/platform/ti-vpe/vpdma.c
+++ b/drivers/media/platform/ti-vpe/vpdma.c
@@ -453,7 +453,7 @@ int vpdma_list_cleanup(struct vpdma_data *vpdma, int list_num,
 	if (ret)
 		return ret;
 
-	while (vpdma_list_busy(vpdma, list_num) && timeout--)
+	while (vpdma_list_busy(vpdma, list_num) && --timeout)
 		;
 
 	if (timeout = 0) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] [media] media: ti-vpe: vpdma: fix a timeout loop
  2016-11-25 21:28 [patch] [media] media: ti-vpe: vpdma: fix a timeout loop Dan Carpenter
@ 2016-11-28 16:51 ` Benoit Parrot
  0 siblings, 0 replies; 2+ messages in thread
From: Benoit Parrot @ 2016-11-28 16:51 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Nikhil Devshatwar, Mauro Carvalho Chehab, linux-media,
	kernel-janitors

Dan,

Thanks for the patch.

Acked-by: Benoit Parrot <bparrot@ti.com>

Dan Carpenter <dan.carpenter@oracle.com> wrote on Sat [2016-Nov-26 00:28:34 +0300]:
> The check assumes that we end on zero but actually we end on -1.  Change
> the post-op to a pre-op so that we do end on zero.  Techinically now we
> only loop 499 times instead of 500 but that's fine.
> 
> Fixes: dc12b124353b ("[media] media: ti-vpe: vpdma: Add abort channel desc and cleanup APIs")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/media/platform/ti-vpe/vpdma.c b/drivers/media/platform/ti-vpe/vpdma.c
> index 13bfd71..23472e3 100644
> --- a/drivers/media/platform/ti-vpe/vpdma.c
> +++ b/drivers/media/platform/ti-vpe/vpdma.c
> @@ -453,7 +453,7 @@ int vpdma_list_cleanup(struct vpdma_data *vpdma, int list_num,
>  	if (ret)
>  		return ret;
>  
> -	while (vpdma_list_busy(vpdma, list_num) && timeout--)
> +	while (vpdma_list_busy(vpdma, list_num) && --timeout)
>  		;
>  
>  	if (timeout = 0) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-28 16:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-25 21:28 [patch] [media] media: ti-vpe: vpdma: fix a timeout loop Dan Carpenter
2016-11-28 16:51 ` Benoit Parrot

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).