[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0908121145200.9635-100000@iolanthe.rowland.org>
Date: Wed, 12 Aug 2009 11:47:08 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Magnus Damm <magnus.damm@...il.com>
cc: "Rafael J. Wysocki" <rjw@...k.pl>, Greg KH <gregkh@...e.de>,
Pavel Machek <pavel@....cz>, Len Brown <lenb@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Linux-pm mailing list <linux-pm@...ts.linux-foundation.org>
Subject: Re: [PATCH update] PM: Introduce core framework for run-time PM of
I/O devices (rev. 15)
On Wed, 12 Aug 2009, Magnus Damm wrote:
> > --- /dev/null
> > +++ linux-2.6/drivers/base/power/runtime.c
> [...]
> > +int __pm_runtime_suspend(struct device *dev, bool from_wq)
> > + __releases(&dev->power.lock) __acquires(&dev->power.lock)
> [...]
> > + if (dev->bus && dev->bus->pm && dev->bus->pm->runtime_suspend) {
> > + spin_unlock_irq(&dev->power.lock);
> > +
> > + retval = dev->bus->pm->runtime_suspend(dev);
> > +
> > + spin_lock_irq(&dev->power.lock);
> > + dev->power.runtime_error = retval;
> > + } else {
> > + retval = -ENOSYS;
> > + }
>
> Nit: { and } above do not follow the regular coding style.
As a matter of fact they do. From Documentation/CodingStyle:
Do not unnecessarily use braces where a single statement will do.
if (condition)
action();
This does not apply if one branch of a conditional statement is a single
statement. Use braces in both branches.
if (condition) {
do_this();
do_that();
} else {
otherwise();
}
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists