lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ