From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755470AbcBHEJz (ORCPT ); Sun, 7 Feb 2016 23:09:55 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:58719 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753280AbcBHEJy (ORCPT ); Sun, 7 Feb 2016 23:09:54 -0500 Date: Sun, 7 Feb 2016 20:09:53 -0800 From: "gregkh@linuxfoundation.org" To: "Gujulan Elango, Hari Prasath (H.)" Cc: "lidza.louina@gmail.com" , "markh@compro.net" , "driverdev-devel@linuxdriverproject.org" , "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] staging: dgnc: convert to wait_event_interruptible_timeout Message-ID: <20160208040953.GA30989@kroah.com> References: <20151224135458.GA353@IND12F0122> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151224135458.GA353@IND12F0122> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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