From: Sudeep Dutt <sudeep.dutt@intel.com>
To: Nicholas Mc Guire <hofrat@osadl.org>
Cc: sudeep.dutt@intel.com, Ashutosh Dixit <ashutosh.dixit@intel.com>,
Siva Yerramreddy <yshivakrishna@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Nikhil Rao <nikhil.rao@intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] misc: mic: fixup return type of wait_for_completion_timeout
Date: Mon, 09 Feb 2015 14:00:13 -0800 [thread overview]
Message-ID: <1423519213.4499.22.camel@rbtaylor-desk1.amr.corp.intel.com> (raw)
In-Reply-To: <1423508949-15360-1-git-send-email-hofrat@osadl.org>
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 <sudeep.dutt@intel.com>
Thanks for the patch!
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> ---
>
> 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:
prev parent reply other threads:[~2015-02-09 22:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-09 19:09 [PATCH] misc: mic: fixup return type of wait_for_completion_timeout Nicholas Mc Guire
2015-02-09 22:00 ` Sudeep Dutt [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=1423519213.4499.22.camel@rbtaylor-desk1.amr.corp.intel.com \
--to=sudeep.dutt@intel.com \
--cc=ashutosh.dixit@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hofrat@osadl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nikhil.rao@intel.com \
--cc=yshivakrishna@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).