public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>, linux-next@vger.kernel.org
Subject: Re: [PATCH -next] sched/wait: fix __wait_event_interruptible_lock_irq_timeout()
Date: Thu, 31 Oct 2013 15:41:23 +0100	[thread overview]
Message-ID: <20131031144123.GW19466@laptop.lan> (raw)
In-Reply-To: <20131031114814.GB5551@osiris>

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
> 

      reply	other threads:[~2013-10-31 14:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

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=20131031144123.GW19466@laptop.lan \
    --to=peterz@infradead.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox