All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Inki Dae <inki.dae@samsung.com>,
	Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Cc: linux-samsung-soc@vger.kernel.org,
	kernel-janitors@vger.kernel.org,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	dri-devel@lists.freedesktop.org
Subject: Re: [patch] drm/exynos: fix a timeout loop
Date: Thu, 13 Oct 2016 11:05:00 +0000	[thread overview]
Message-ID: <57FF6A5C.6060108@math.uni-bielefeld.de> (raw)
In-Reply-To: <20161013102040.GA5576@mwanda>

Hello Dan,

sorry for the blunder! Patch looks good to me.

Reviewed-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>


With best wishes,
Tobias


Dan Carpenter wrote:
> 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.
> 
> 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>
> 
> 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;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


WARNING: multiple messages have this Message-ID (diff)
From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Inki Dae <inki.dae@samsung.com>,
	Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Cc: linux-samsung-soc@vger.kernel.org,
	kernel-janitors@vger.kernel.org,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	dri-devel@lists.freedesktop.org
Subject: Re: [patch] drm/exynos: fix a timeout loop
Date: Thu, 13 Oct 2016 13:05:00 +0200	[thread overview]
Message-ID: <57FF6A5C.6060108@math.uni-bielefeld.de> (raw)
In-Reply-To: <20161013102040.GA5576@mwanda>

Hello Dan,

sorry for the blunder! Patch looks good to me.

Reviewed-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>


With best wishes,
Tobias


Dan Carpenter wrote:
> 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.
> 
> 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>
> 
> 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;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-10-13 11:05 UTC|newest]

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

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=57FF6A5C.6060108@math.uni-bielefeld.de \
    --to=tjakobi@math.uni-bielefeld.de \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=javier@osg.samsung.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sw0312.kim@samsung.com \
    /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.