linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Zhaoyang Huang <zhaoyang.huang@linaro.org>
Cc: zhaoyang.huang@spreadtrum.com, rjw@rjwysocki.net,
	linux-kernel@vger.kernel.org, len.brown@intel.com,
	gregkh@linuxfoundation.org, linux-pm@vger.kernel.org
Subject: Re: [RFC PATCH v1] refining the rpm_suspend function
Date: Tue, 19 Jan 2016 20:54:12 +0100	[thread overview]
Message-ID: <20160119195412.GA8414@amd> (raw)
In-Reply-To: <1453194858-17416-1-git-send-email-zhaoyang.huang@spreadtrum.com>

Hi!

> +		else{

missing space.

> +			while (dev->power.runtime_status ==
> +				RPM_SUSPENDING) {
> +				if (dev->power.irq_safe) {
> +					spin_unlock(&dev->power.lock);
> +
> +					cpu_relax();
> +
> +					spin_lock(&dev->power.lock);
> +					continue;
> +				}
> +
> +				/* Wait for the other suspend
> +				running in parallel with us. */
> +				for (;;) {
> +					prepare_to_wait(&dev->power.wait_queue,
> +					&wait,	TASK_UNINTERRUPTIBLE);
> +					if (dev->power.runtime_status
> +						!= RPM_SUSPENDING)
> +						break;

You really need to restructure the code so that you don't get
indentation _this_ deep.


> -	might_sleep_if(!(rpmflags & RPM_ASYNC) && !dev->power.irq_safe);
> +	might_sleep_if (!(rpmflags & RPM_ASYNC) && !dev->power.irq_safe);

Original was right. Function -> no space.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

      parent reply	other threads:[~2016-01-19 19:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19  9:14 [RFC PATCH v1] refining the rpm_suspend function Zhaoyang Huang
2016-01-19 13:49 ` Rafael J. Wysocki
2016-01-19 19:54 ` Pavel Machek [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=20160119195412.GA8414@amd \
    --to=pavel@ucw.cz \
    --cc=gregkh@linuxfoundation.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=zhaoyang.huang@linaro.org \
    --cc=zhaoyang.huang@spreadtrum.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).