[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160119195412.GA8414@amd>
Date: Tue, 19 Jan 2016 20:54:12 +0100
From: Pavel Machek <pavel@....cz>
To: Zhaoyang Huang <zhaoyang.huang@...aro.org>
Cc: zhaoyang.huang@...eadtrum.com, rjw@...ysocki.net,
linux-kernel@...r.kernel.org, len.brown@...el.com,
gregkh@...uxfoundation.org, linux-pm@...r.kernel.org
Subject: Re: [RFC PATCH v1] refining the rpm_suspend function
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
Powered by blists - more mailing lists