Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760747AbbBIWAo (ORCPT ); Mon, 9 Feb 2015 17:00:44 -0500 Received: from mga09.intel.com ([134.134.136.24]:2564 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754475AbbBIWAn (ORCPT ); Mon, 9 Feb 2015 17:00:43 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,546,1418112000"; d="scan'208";a="683314170" Subject: Re: [PATCH] misc: mic: fixup return type of wait_for_completion_timeout From: Sudeep Dutt To: Nicholas Mc Guire Cc: sudeep.dutt@intel.com, Ashutosh Dixit , Siva Yerramreddy , Greg Kroah-Hartman , Nikhil Rao , linux-kernel@vger.kernel.org In-Reply-To: <1423508949-15360-1-git-send-email-hofrat@osadl.org> References: <1423508949-15360-1-git-send-email-hofrat@osadl.org> Content-Type: text/plain; charset="UTF-8" Date: Mon, 09 Feb 2015 14:00:13 -0800 Message-ID: <1423519213.4499.22.camel@rbtaylor-desk1.amr.corp.intel.com> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-30.el6) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2400 Lines: 69 On Mon, 2015-02-09 at 14:09 -0500, Nicholas Mc Guire wrote: > return type of wait_for_completion_timeout is unsigned long not int. The > rc variable is renamed timeout to reflect its use and the type adjusted to > unsigned long. > Acked-by: Sudeep Dutt Thanks for the patch! > Signed-off-by: Nicholas Mc Guire > --- > > Patch was only compile tested with x86_64_defconfig + CONFIG_INTEL_MIC_BUS=m > CONFIG_INTEL_MIC_HOST=m > > Patch is against 3.19.0-rc7 (localversion-next is -next-20150209) > > drivers/misc/mic/host/mic_boot.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/drivers/misc/mic/host/mic_boot.c b/drivers/misc/mic/host/mic_boot.c > index ff2b0fb..d9fa609 100644 > --- a/drivers/misc/mic/host/mic_boot.c > +++ b/drivers/misc/mic/host/mic_boot.c > @@ -309,7 +309,7 @@ void mic_complete_resume(struct mic_device *mdev) > */ > void mic_prepare_suspend(struct mic_device *mdev) > { > - int rc; > + unsigned long timeout; > > #define MIC_SUSPEND_TIMEOUT (60 * HZ) > > @@ -331,10 +331,10 @@ void mic_prepare_suspend(struct mic_device *mdev) > */ > mic_set_state(mdev, MIC_SUSPENDING); > mutex_unlock(&mdev->mic_mutex); > - rc = wait_for_completion_timeout(&mdev->reset_wait, > - MIC_SUSPEND_TIMEOUT); > + timeout = wait_for_completion_timeout(&mdev->reset_wait, > + MIC_SUSPEND_TIMEOUT); > /* Force reset the card if the shutdown completion timed out */ > - if (!rc) { > + if (!timeout) { > mutex_lock(&mdev->mic_mutex); > mic_set_state(mdev, MIC_SUSPENDED); > mutex_unlock(&mdev->mic_mutex); > @@ -348,10 +348,10 @@ void mic_prepare_suspend(struct mic_device *mdev) > */ > mic_set_state(mdev, MIC_SUSPENDED); > mutex_unlock(&mdev->mic_mutex); > - rc = wait_for_completion_timeout(&mdev->reset_wait, > - MIC_SUSPEND_TIMEOUT); > + timeout = wait_for_completion_timeout(&mdev->reset_wait, > + MIC_SUSPEND_TIMEOUT); > /* Force reset the card if the shutdown completion timed out */ > - if (!rc) > + if (!timeout) > mic_stop(mdev, true); > break; > default: -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/