linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jack Stone <jwjstone@fastmail.fm>
To: Viresh Kumar <viresh.kumar@st.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	viro@zeniv.linux.org.uk, shawn.bohrer@gmail.com
Subject: Re: [PATCH resend] fs/eventpoll.c: fix compilation warning
Date: Fri, 14 Jan 2011 13:07:16 +0000	[thread overview]
Message-ID: <4D304A84.1000601@fastmail.fm> (raw)
In-Reply-To: <1295005953-12173-1-git-send-email-viresh.kumar@st.com>

[cc Al Viro and Shawn Bohrer]
On 14/01/2011 11:52, Viresh Kumar wrote:
> This patch fixes following compilation warning
> fs/eventpoll.c:1119: warning: 'slack' may be used uninitialized in this function
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
> ---
>  fs/eventpoll.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/eventpoll.c b/fs/eventpoll.c
> index 8cf0724..89b5e98 100644
> --- a/fs/eventpoll.c
> +++ b/fs/eventpoll.c
> @@ -1116,7 +1116,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
>  {
>  	int res, eavail, timed_out = 0;
>  	unsigned long flags;
> -	long slack;
> +	long uninitialized_var(slack);
>  	wait_queue_t wait;
>  	struct timespec end_time;
>  	ktime_t expires, *to = NULL;

Hi Viresh,

This is certainly the correct thing to do if timeout cannot be negative.

Al, Shawn

Can timeout be negative, and if so what does it mean?

Thanks,

Jack

  reply	other threads:[~2011-01-14 13:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-14 11:52 [PATCH resend] fs/eventpoll.c: fix compilation warning Viresh Kumar
2011-01-14 13:07 ` Jack Stone [this message]
2011-01-14 14:48   ` Shawn Bohrer
2011-01-14 15:21     ` Davide Libenzi
2011-01-15  0:05     ` Andrew Morton
2011-01-15 11:10       ` Jack Stone
2011-01-15 16:20       ` Shawn Bohrer
2011-01-15 17:00         ` [PATCH 1/3] epoll: initialize slack for negative timeout values Shawn Bohrer
2011-01-15 19:06           ` Davide Libenzi
2011-03-18  7:38           ` Mike Frysinger
2011-01-15 17:00         ` [PATCH 2/3] epoll: short circuit the timeout==0 case Shawn Bohrer
2011-01-15 17:00         ` [PATCH 3/3] epoll: remove unnecessary test of ep->ovflist for available events Shawn Bohrer
2011-01-15 19:03           ` Davide Libenzi

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=4D304A84.1000601@fastmail.fm \
    --to=jwjstone@fastmail.fm \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shawn.bohrer@gmail.com \
    --cc=viresh.kumar@st.com \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).