Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1449665 > unrolled thread

[PATCH] omapfb/dss: wait_for_completion_interruptible_timeout expects long

Started byNicholas Mc Guire <hofrat@osadl.org>
First post2016-07-25 19:20 +0200
Last post2016-08-10 21:50 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] omapfb/dss: wait_for_completion_interruptible_timeout expects long Nicholas Mc Guire <hofrat@osadl.org> - 2016-07-25 19:20 +0200
    Re: [PATCH] omapfb/dss: wait_for_completion_interruptible_timeout  expects long Nicholas Mc Guire <der.herr@hofr.at> - 2016-08-10 20:50 +0200
    Re: [PATCH] omapfb/dss: wait_for_completion_interruptible_timeout  expects long Tomi Valkeinen <tomi.valkeinen@ti.com> - 2016-08-10 21:50 +0200

#1449665 — [PATCH] omapfb/dss: wait_for_completion_interruptible_timeout expects long

FromNicholas Mc Guire <hofrat@osadl.org>
Date2016-07-25 19:20 +0200
Subject[PATCH] omapfb/dss: wait_for_completion_interruptible_timeout expects long
Message-ID<rYRHP-7ix-9@gated-at.bofh.it>
wait_for_completion_timeout_interruptible returns long not unsigned long.
an appropriately typed variable is introduced and assignments fixed up.

Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---

API non-compliance was located by coccinelle

This is mostly cosmetic since the returned value is only compared 
at present, however if remaining time (completion occurred) where ever 
used, then a signal received would be interpreted as a large remaining 
jiffies left, which would be wrong.

Compile tested with: omap2plus_defconfig (implies CONFIG_FB_OMAP2_DSS)

Patch is against 4.7.0-rc7 (localversion-next -next-20160724)

 drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c
index 3691bde..a864608 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c
@@ -644,6 +644,7 @@ int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask,
 {
 
 	int r;
+	long time_left;
 	DECLARE_COMPLETION_ONSTACK(completion);
 
 	r = omap_dispc_register_isr(dispc_irq_wait_handler, &completion,
@@ -652,15 +653,15 @@ int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask,
 	if (r)
 		return r;
 
-	timeout = wait_for_completion_interruptible_timeout(&completion,
+	time_left = wait_for_completion_interruptible_timeout(&completion,
 			timeout);
 
 	omap_dispc_unregister_isr(dispc_irq_wait_handler, &completion, irqmask);
 
-	if (timeout == 0)
+	if (time_left == 0)
 		return -ETIMEDOUT;
 
-	if (timeout == -ERESTARTSYS)
+	if (time_left == -ERESTARTSYS)
 		return -ERESTARTSYS;
 
 	return 0;
-- 
2.1.4

[toc] | [next] | [standalone]


#1459490 — Re: [PATCH] omapfb/dss: wait_for_completion_interruptible_timeout expects long

FromNicholas Mc Guire <der.herr@hofr.at>
Date2016-08-10 20:50 +0200
SubjectRe: [PATCH] omapfb/dss: wait_for_completion_interruptible_timeout expects long
Message-ID<s4GJH-j6-1@gated-at.bofh.it>
In reply to#1449665
On Wed, Aug 10, 2016 at 01:21:46PM +0300, Tomi Valkeinen wrote:
> On 25/07/16 20:12, Nicholas Mc Guire wrote:
> > wait_for_completion_timeout_interruptible returns long not unsigned long.
> > an appropriately typed variable is introduced and assignments fixed up.
> > 
> > Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")
> > 
> > Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> > ---
> > 
> > API non-compliance was located by coccinelle
> > 
> > This is mostly cosmetic since the returned value is only compared 
> > at present, however if remaining time (completion occurred) where ever 
> > used, then a signal received would be interpreted as a large remaining 
> > jiffies left, which would be wrong.
> > 
> > Compile tested with: omap2plus_defconfig (implies CONFIG_FB_OMAP2_DSS)
> > 
> > Patch is against 4.7.0-rc7 (localversion-next -next-20160724)
> > 
> >  drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> Thanks, queued for v4.9. I dropped the "Fixes: " line, as that commit
> only does a copy of the files, so the commit didn't really introduce the
> bug.
>
sorry for the wrong fixes tag - did not notice that - and thanks for
fixing this.

thx!
hofrat

[toc] | [prev] | [next] | [standalone]


#1459724 — Re: [PATCH] omapfb/dss: wait_for_completion_interruptible_timeout expects long

FromTomi Valkeinen <tomi.valkeinen@ti.com>
Date2016-08-10 21:50 +0200
SubjectRe: [PATCH] omapfb/dss: wait_for_completion_interruptible_timeout expects long
Message-ID<s4GJH-j6-3@gated-at.bofh.it>
In reply to#1449665

[Multipart message — attachments visible in raw view] — view raw

On 25/07/16 20:12, Nicholas Mc Guire wrote:
> wait_for_completion_timeout_interruptible returns long not unsigned long.
> an appropriately typed variable is introduced and assignments fixed up.
> 
> Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")
> 
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> ---
> 
> API non-compliance was located by coccinelle
> 
> This is mostly cosmetic since the returned value is only compared 
> at present, however if remaining time (completion occurred) where ever 
> used, then a signal received would be interpreted as a large remaining 
> jiffies left, which would be wrong.
> 
> Compile tested with: omap2plus_defconfig (implies CONFIG_FB_OMAP2_DSS)
> 
> Patch is against 4.7.0-rc7 (localversion-next -next-20160724)
> 
>  drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Thanks, queued for v4.9. I dropped the "Fixes: " line, as that commit
only does a copy of the files, so the commit didn't really introduce the
bug.

 Tomi

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web