lkml.org 
[lkml]   [2005]   [Jul]   [11]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] [38/48] Suspend2 2.1.9.8 for 2.6.12: 614-plugins.patch
FromNigel Cunningham <>
DateMon, 11 Jul 2005 20:05:33 +1000
Hi.

On Mon, 2005-07-11 at 04:08, Pavel Machek wrote:
> Hi!
> 
> > +unsigned long suspend2_powerdown_method = 5; /* S5 = off */
> 
> Constants.....
> 
> > +	if (suspend2_powerdown_method == 3 ||
> > +	    suspend2_powerdown_method == 4)
> 
> Constants...
> 
> > +	if (suspend2_powerdown_method == 3 ||
> > +	    suspend2_powerdown_method == 4)
> 
> Constants...

Once per file is enough :>

> > +		suspend2_prepare_status(1, 0, "Ready to reboot.");
> > +		suspend2_prepare_status(1, 0, "Seeking to enter ACPI state");
> > +			suspend2_prepare_status(1, 0, "Preparing to enter ACPI state failed. Using normal powerdown.");
> > +			suspend2_prepare_status(1, 0, "Suspending devices failed. Using normal powerdown.");
> > +			suspend2_prepare_status(1, 0, "Entering ACPI state failed. Using normal powerdown.");
> > +		suspend2_prepare_status(1, 0, "Powering down.");
> 
> Too many magical constants here... Plus I don't really like your own
> logging subsystem.

The first parameter isn't needed anymore - gone. Second one changed to
an enum DONT_CLEAR_BAR | CLEAR_BAR.
Not liking it - that's alright there's some code you've written that I
don't like either :>

Nigel
-- 
Evolution.
Enumerate the requirements.
Consider the interdependencies.
Calculate the probabilities.
Be amazed that people believe it happened. 

-
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: 2005-07-11 10:07    [W:0.435 / U:0.020 seconds]
©2003-2008 Jasper Spaans