Re: [PATCH update] PM: Introduce core framework for run-time PM of I/O devices (rev. 15)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux