All of lore.kernel.org
 help / color / mirror / Atom feed
From: Inki Dae <inki.dae@samsung.com>
To: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>,
	linux-samsung-soc@vger.kernel.org
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/exynos: fix a timeout loop
Date: Mon, 23 Jan 2017 18:32:16 +0900	[thread overview]
Message-ID: <5885CDA0.40700@samsung.com> (raw)
In-Reply-To: <1484931272-20113-1-git-send-email-tjakobi@math.uni-bielefeld.de>



2017년 01월 21일 01:54에 Tobias Jakobi 이(가) 쓴 글:
> From: Dan Carpenter <dan.carpenter@oracle.com>
> 
> We were trying to print an error message if we timed out here, but the
> loop actually ends with "tries" set to UINT_MAX and not zero.  Fix this
> by changing from tries-- to --tries.

Sorry but I already know this patch from long ago but I'm not clear yet.
How the variable, tries, could have UNIT_MAX?

Seems something I'm missing.

Thanks.

> 
> A for loop would actually be the most natural way to do this.  My fix
> means we only loop 99 times instead of 100 but that's probably ok.
> 
> Fixes: a696394c5224 ('drm/exynos: mixer: simplify loop in vp_win_reset()')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Reviewed-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> ---
>  drivers/gpu/drm/exynos/exynos_mixer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
> index edb20a3..fcc7e4f 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -701,7 +701,7 @@ static void vp_win_reset(struct mixer_context *ctx)
>  	unsigned int tries = 100;
>  
>  	vp_reg_write(res, VP_SRESET, VP_SRESET_PROCESSING);
> -	while (tries--) {
> +	while (--tries) {
>  		/* waiting until VP_SRESET_PROCESSING is 0 */
>  		if (~vp_reg_read(res, VP_SRESET) & VP_SRESET_PROCESSING)
>  			break;
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-01-23  9:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170120165445epcas5p1a5fd54c6617006d8b4922d2c0269b17a@epcas5p1.samsung.com>
2017-01-20 16:54 ` [PATCH] drm/exynos: fix a timeout loop Tobias Jakobi
2017-01-23  9:32   ` Inki Dae [this message]
2017-01-23  9:41     ` Chris Wilson
2017-01-24  0:07       ` Inki Dae
2016-10-13 10:20 [patch] " Dan Carpenter
2016-10-13 10:20 ` Dan Carpenter
2016-10-13 11:05 ` Tobias Jakobi
2016-10-13 11:05   ` Tobias Jakobi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5885CDA0.40700@samsung.com \
    --to=inki.dae@samsung.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=tjakobi@math.uni-bielefeld.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.