Skip to contentSkip to conversation

newport: newport_*wait() return 0 on timeout

PATCH In review Roel Kluin 3 participants 5 messages Jan 31, 2009 – Feb 2, 2009

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 newport: newport_*wait() return 0 on timeout

With a postfix decrement t reaches -1 on timeout which results in a return of 0.

---

include/video/newport.h +2 -2
index 1f5ebea..001b935 100644
@@ -453,7 +453,7 @@ static __inline__ int newport_wait(struct newport_regs *regs)
 {
 	int t = BUSY_TIMEOUT;
 
-	while (t--)
+	while (--t)
 		if (!(regs->cset.status & NPORT_STAT_GBUSY))
 			break;
 	return !t;
@@ -463,7 +463,7 @@ static __inline__ int newport_bfwait(struct newport_regs *regs)
 {
 	int t = BUSY_TIMEOUT;
 
-	while (t--)
+	while (--t)
 		if(!(regs->cset.status & NPORT_STAT_BBUSY))
 			break;
 	return !t;
#1 lore raw

Hi Roel,

It seems that you've sent this driver to the wrong ML. Video adapters are not handled on those ML's.

Quoted 19 lines · On Sat, 31 Jan 2009 16:29:39 +0100 Roel Kluin <[email protected]> wrote:

With a postfix decrement t reaches -1 on timeout which results in a return of 0.

---

include/video/newport.h +1 -1
index 1f5ebea..001b935 100644
@@ -453,7 +453,7 @@ static __inline__ int newport_wait(struct newport_regs *regs)
 {
 	int t = BUSY_TIMEOUT;
 
-	while (t--)
+	while (--t)
 		if (!(regs->cset.status & NPORT_STAT_GBUSY))
 			break;
 	return !t;

include/video/newport.h static __inline__ int newport_bfwait(struct newport_regs *regs) · line 469

Quoted 8 lines
include/video/newport.h +1 -1
@@ -463,7 +463,7 @@ static __inline__ int newport_bfwait(struct newport_regs *regs)
 {
 	int t = BUSY_TIMEOUT;
 
-	while (t--)
+	while (--t)
 		if(!(regs->cset.status & NPORT_STAT_BBUSY))
 			break;
 	return !t;

Cheers,
Mauro

author
#2 lore raw

2009/2/2 Mauro Carvalho Chehab <[email protected]>:

Quoted 3 lines

Hi Roel,

It seems that you've sent this driver to the wrong ML. Video adapters are not handled on those ML's.

Any idea where it should be sent?

Thanks,

Roel

#4 lore raw
In reply to roel kluin
Quoted 6 lines · On Mon, 2 Feb 2009 14:32:09 +0100 roel kluin <[email protected]> wrote:

2009/2/2 Mauro Carvalho Chehab <[email protected]>:

Quoted 3 lines

Hi Roel,

It seems that you've sent this driver to the wrong ML. Video adapters are not handled on those ML's.

Any idea where it should be sent?

$ git log include/video/newport.h
commit 3f08ff4a4dab1ebef06d154050fb80ce2c13fc9c
Author: Adrian Bunk <[email protected]>
Date:   Mon Jan 9 20:53:35 2006 -0800

[PATCH] include/video/newport.h: "extern inline" -> "static inline"

"extern inline" doesn't make much sense.

Hmm... this is the only change on this file since -git history. I would forward the patch to Andrew.

Cheers,
Mauro