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]
Message-Id: <1178538966.7261.18.camel@johannes.berg>
Date:	Mon, 07 May 2007 13:56:06 +0200
From:	Johannes Berg <johannes@...solutions.net>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>, Pavel Machek <pavel@....cz>,
	Nigel Cunningham <nigel@...el.suspend2.net>,
	Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: [PATCH -mm] PM: Separate hibernation code from suspend code

On Mon, 2007-05-07 at 13:46 +0200, Johannes Berg wrote:
> On Sat, 2007-05-05 at 15:50 +0200, Rafael J. Wysocki wrote:
> 
> > @@ -60,6 +60,9 @@ void hibernation_set_ops(struct hibernat
> >  	}
> >  	mutex_lock(&pm_mutex);
> >  	hibernation_ops = ops;
> > +	if (ops)
> > +		hibernation_mode = HIBERNATION_PLATFORM;
> 
> 	else if (hibernation_mode == HIBERNATION_PLATFORM)
> 		hibernation_mode = HIBERNATION_SHUTDOWN;

Also, you could then simplify all the instances of
  (hibernation_mode == HIBERNATION_PLATFORM && hibernation_ops) 
to just
  (hibernation_mode == HIBERNATION_PLATFORM)
in various if statements and other places.

johannes

Download attachment "signature.asc" of type "application/pgp-signature" (191 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ