All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] sched/wait: fix __wait_event_interruptible_lock_irq_timeout()
@ 2013-10-31 11:48 Heiko Carstens
  2013-10-31 14:41 ` Peter Zijlstra
  2013-11-01  9:52 ` [tip:sched/core] sched/wait: Fix __wait_event_interruptible_lock_irq_timeout() tip-bot for Heiko Carstens
  0 siblings, 2 replies; 3+ messages in thread
From: Heiko Carstens @ 2013-10-31 11:48 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar; +Cc: linux-next

__wait_event_interruptible_lock_irq_timeout() needs the timeout parameter
passed instead of "ret".
This magically compiled since the only user has a local ret variable.
Luckily we got a build warning:

  CC      drivers/s390/scsi/zfcp_qdio.o
drivers/s390/scsi/zfcp_qdio.c: In function 'zfcp_qdio_sbal_get':
include/linux/wait.h:780:15: warning: 'ret' may be used uninitialized
         __ret = schedule_timeout(__ret);   \
               ^
drivers/s390/scsi/zfcp_qdio.c:245:7: note: 'ret' was declared here
  long ret;
       ^
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 include/linux/wait.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/wait.h b/include/linux/wait.h
index fcc968087f05..d3d033ec5313 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -775,7 +775,7 @@ do {									\
 #define __wait_event_interruptible_lock_irq_timeout(wq, condition,	\
 						    lock, timeout)	\
 	___wait_event(wq, ___wait_cond_timeout(condition),		\
-		      TASK_INTERRUPTIBLE, 0, ret,			\
+		      TASK_INTERRUPTIBLE, 0, timeout,			\
 		      spin_unlock_irq(&lock);				\
 		      __ret = schedule_timeout(__ret);			\
 		      spin_lock_irq(&lock));
-- 
1.8.3.4

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

* Re: [PATCH -next] sched/wait: fix __wait_event_interruptible_lock_irq_timeout()
  2013-10-31 11:48 [PATCH -next] sched/wait: fix __wait_event_interruptible_lock_irq_timeout() Heiko Carstens
@ 2013-10-31 14:41 ` Peter Zijlstra
  2013-11-01  9:52 ` [tip:sched/core] sched/wait: Fix __wait_event_interruptible_lock_irq_timeout() tip-bot for Heiko Carstens
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2013-10-31 14:41 UTC (permalink / raw)
  To: Heiko Carstens; +Cc: Ingo Molnar, linux-next

On Thu, Oct 31, 2013 at 12:48:14PM +0100, Heiko Carstens wrote:
> __wait_event_interruptible_lock_irq_timeout() needs the timeout parameter
> passed instead of "ret".
> This magically compiled since the only user has a local ret variable.
> Luckily we got a build warning:
> 
>   CC      drivers/s390/scsi/zfcp_qdio.o
> drivers/s390/scsi/zfcp_qdio.c: In function 'zfcp_qdio_sbal_get':
> include/linux/wait.h:780:15: warning: 'ret' may be used uninitialized
>          __ret = schedule_timeout(__ret);   \
>                ^
> drivers/s390/scsi/zfcp_qdio.c:245:7: note: 'ret' was declared here
>   long ret;
>        ^
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>

Urgh, sorry about that..

Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>

> ---
>  include/linux/wait.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/wait.h b/include/linux/wait.h
> index fcc968087f05..d3d033ec5313 100644
> --- a/include/linux/wait.h
> +++ b/include/linux/wait.h
> @@ -775,7 +775,7 @@ do {									\
>  #define __wait_event_interruptible_lock_irq_timeout(wq, condition,	\
>  						    lock, timeout)	\
>  	___wait_event(wq, ___wait_cond_timeout(condition),		\
> -		      TASK_INTERRUPTIBLE, 0, ret,			\
> +		      TASK_INTERRUPTIBLE, 0, timeout,			\
>  		      spin_unlock_irq(&lock);				\
>  		      __ret = schedule_timeout(__ret);			\
>  		      spin_lock_irq(&lock));
> -- 
> 1.8.3.4
> 

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

* [tip:sched/core] sched/wait: Fix __wait_event_interruptible_lock_irq_timeout()
  2013-10-31 11:48 [PATCH -next] sched/wait: fix __wait_event_interruptible_lock_irq_timeout() Heiko Carstens
  2013-10-31 14:41 ` Peter Zijlstra
@ 2013-11-01  9:52 ` tip-bot for Heiko Carstens
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Heiko Carstens @ 2013-11-01  9:52 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, a.p.zijlstra, heiko.carstens, tglx

Commit-ID:  7d716456a0ee4e9bd63be9234f886d20382ac950
Gitweb:     http://git.kernel.org/tip/7d716456a0ee4e9bd63be9234f886d20382ac950
Author:     Heiko Carstens <heiko.carstens@de.ibm.com>
AuthorDate: Thu, 31 Oct 2013 12:48:14 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 1 Nov 2013 08:42:44 +0100

sched/wait: Fix __wait_event_interruptible_lock_irq_timeout()

__wait_event_interruptible_lock_irq_timeout() needs the timeout
parameter passed instead of "ret".

This magically compiled since the only user has a local ret
variable. Luckily we got a build warning:

  CC      drivers/s390/scsi/zfcp_qdio.o
  drivers/s390/scsi/zfcp_qdio.c: In function 'zfcp_qdio_sbal_get':
  include/linux/wait.h:780:15: warning: 'ret' may be used uninitialized

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20131031114814.GB5551@osiris
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/wait.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/wait.h b/include/linux/wait.h
index 3b23afa..61939ba 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -739,7 +739,7 @@ do {									\
 #define __wait_event_interruptible_lock_irq_timeout(wq, condition,	\
 						    lock, timeout)	\
 	___wait_event(wq, ___wait_cond_timeout(condition),		\
-		      TASK_INTERRUPTIBLE, 0, ret,			\
+		      TASK_INTERRUPTIBLE, 0, timeout,			\
 		      spin_unlock_irq(&lock);				\
 		      __ret = schedule_timeout(__ret);			\
 		      spin_lock_irq(&lock));

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

end of thread, other threads:[~2013-11-01  9:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-31 11:48 [PATCH -next] sched/wait: fix __wait_event_interruptible_lock_irq_timeout() Heiko Carstens
2013-10-31 14:41 ` Peter Zijlstra
2013-11-01  9:52 ` [tip:sched/core] sched/wait: Fix __wait_event_interruptible_lock_irq_timeout() tip-bot for Heiko Carstens

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.