public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Dave Young <dyoung@redhat.com>
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty_ldisc: remove unnecessary negative return check for wait_event_timeout
Date: Tue, 08 Nov 2011 09:27:54 +0100	[thread overview]
Message-ID: <4EB8E80A.1050805@suse.cz> (raw)
In-Reply-To: <20111108054459.GA23162@darkstar.nay.redhat.com>

On 11/08/2011 06:44 AM, Dave Young wrote:
> wait_event_timeout always return value >= 0
> remove the unnecessary ret < 0 check
> 
> Signed-off-by: Dave Young <dyoung@redhat.com>

Acked-by: Jiri Slaby <jslaby@suse.cz>

This is a hangover from times when there was _interruptible.

> ---
>  drivers/tty/tty_ldisc.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> --- linux-2.6.orig/drivers/tty/tty_ldisc.c	2011-11-01 13:06:20.000000000 +0800
> +++ linux-2.6/drivers/tty/tty_ldisc.c	2011-11-08 13:31:30.596308060 +0800
> @@ -556,8 +556,6 @@ static int tty_ldisc_wait_idle(struct tt
>  	int ret;
>  	ret = wait_event_timeout(tty_ldisc_idle,
>  			atomic_read(&tty->ldisc->users) == 1, 5 * HZ);
> -	if (ret < 0)
> -		return ret;
>  	return ret > 0 ? 0 : -EBUSY;
>  }
>  
-- 
js
suse labs

      reply	other threads:[~2011-11-08  8:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08  5:44 [PATCH] tty_ldisc: remove unnecessary negative return check for wait_event_timeout Dave Young
2011-11-08  8:27 ` Jiri Slaby [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=4EB8E80A.1050805@suse.cz \
    --to=jslaby@suse.cz \
    --cc=dyoung@redhat.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /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