From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752910AbcAGPhe (ORCPT ); Thu, 7 Jan 2016 10:37:34 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:33339 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751515AbcAGPhc (ORCPT ); Thu, 7 Jan 2016 10:37:32 -0500 Date: Thu, 7 Jan 2016 07:37:29 -0800 From: Nish Aravamudan To: Nicholas Mc Guire Cc: Corey Minyard , openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [Openipmi-developer] [PATCH] ipmi: pass timeout as HZ independent value Message-ID: <20160107153729.GA19585@pitfall> References: <1452174757-32188-1-git-send-email-hofrat@osadl.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1452174757-32188-1-git-send-email-hofrat@osadl.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07.01.2016 [14:52:37 +0100], Nicholas Mc Guire wrote: > schedule_timeout_* takes a timeout in jiffies but the code currently is > passing in a constant which makes this timeout HZ dependent, so pass it > through msecs_to_jiffies() to fix this up. > > Signed-off-by: Nicholas Mc Guire > --- > patch was compile tested with x86_64_defconfig + CONFIG_IPMI_HANDLER=m > > Patch is against 4.4-rc8 (localversion-next is -next-20160107) > > drivers/char/ipmi/ipmi_si_intf.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c > index 9fda22e..251d546 100644 > --- a/drivers/char/ipmi/ipmi_si_intf.c > +++ b/drivers/char/ipmi/ipmi_si_intf.c > @@ -1099,7 +1099,8 @@ static int ipmi_thread(void *data) > schedule(); > else if (smi_result == SI_SM_IDLE) { > if (atomic_read(&smi_info->need_watch)) { > - schedule_timeout_interruptible(100); > + schedule_timeout_interruptible( > + msecs_to_jiffies(100)); I believe you can use msleep_interruptible() for this. -Nish