lkml.org 
[lkml]   [2009]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-08-12 17:49    [W:0.249 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site