Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1328754 > unrolled thread

Re: [PATCH] staging: dgnc: convert to wait_event_interruptible_timeout

Started by"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
First post2016-02-08 05:20 +0100
Last post2016-02-08 05:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] staging: dgnc: convert to  wait_event_interruptible_timeout "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org> - 2016-02-08 05:20 +0100

#1328754 — Re: [PATCH] staging: dgnc: convert to wait_event_interruptible_timeout

From"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Date2016-02-08 05:20 +0100
SubjectRe: [PATCH] staging: dgnc: convert to wait_event_interruptible_timeout
Message-ID<qZLsS-8e3-3@gated-at.bofh.it>
On Thu, Dec 24, 2015 at 01:54:12PM +0000, Gujulan Elango, Hari Prasath (H.) wrote:
> This patch makes use of wait_event_interruptible_timeout to achieve timeout
> functionality.This is a TODO mentiond in the comment which is also removed.
> It also aligns with what the function is supposed to do as in the
> comments.
> 
> Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
> ---
>  drivers/staging/dgnc/dgnc_neo.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
> index 39c76e7..7d9efe0 100644
> --- a/drivers/staging/dgnc/dgnc_neo.c
> +++ b/drivers/staging/dgnc/dgnc_neo.c
> @@ -1306,10 +1306,8 @@ static int neo_drain(struct tty_struct *tty, uint seconds)
>  	/*
>  	 * Go to sleep waiting for the tty layer to wake me back up when
>  	 * the empty flag goes away.
> -	 *
> -	 * NOTE: TODO: Do something with time passed in.
>  	 */
> -	rc = wait_event_interruptible(un->un_flags_wait, ((un->un_flags & UN_EMPTY) == 0));
> +	rc = wait_event_interruptible_timeout(un->un_flags_wait, ((un->un_flags & UN_EMPTY) == 0), msecs_to_jiffies(seconds * 1000));

Any reason you didn't properly wrap your line at the 80 column limit?

Please fix and resend.

thanks,

greg k-h

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web