All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hood <jdthood@mail.com>
To: linux-laptop@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Combined APM patch
Date: 10 Jan 2002 07:51:05 -0500	[thread overview]
Message-ID: <1010667066.12688.41.camel@thanatos> (raw)
In-Reply-To: <20020107155226.5c6409b6.sfr@canb.auug.org.au>
In-Reply-To: <20020107155226.5c6409b6.sfr@canb.auug.org.au>

Just browsing the diff between my patch and Stephen's, I have
a couple of questions.

< static int			suspends_pending; /* = 0 */
---
> static int			suspends_pending;

Is it not good practice to note when the code _assumes_ zero-
initialization?  I have seen comments like these elsewhere in
the kernel sources.

< 	static int use_apm_idle; /* = 0 */
< 	static unsigned int last_jiffies; /* = 0 */
< 	static unsigned int last_stime; /* = 0 */
---
> 	static int use_apm_idle = 0;
> 	static unsigned int last_jiffies = 0;
> 	static unsigned int last_stime = 0;

Are static variables defined within functions not initialized
to zero at load time, as global static variables are?

< 			ignore_sys_suspend = 0;
---
> 			waiting_for_resume = 0;

Don't you think "ignore_sys_suspend" is a name more consistent
with the other "ignore_yadda_yadda" variable names?  Minor issue.

Everything else looks good to me.

On Sun, 2002-01-06 at 23:52, Stephen Rothwell wrote:
> This is my version of the combined APM patches;
> 
> 	Change notification order so that user mode is notified
> 		before drivers of impending suspends.
> 	Move the idling back into the idle loop.
> 	A couple of small tidy ups.
> 
> See header comments for attributions.
> 
> This works for me (including as a module).
> 
> Please test and let me know - it seems to lower my power requirements
> by about 10% on my Thinkpad (over stock 2.4.17).
> 
> http://www.canb.auug.org.au/~sfr/2.4.17-APM.1.diff

The kernel compiles fine with your patch; I'll test over the
next few days.

Thanks
Thomas





  reply	other threads:[~2002-01-10 12:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-07  4:52 [PATCH] Combined APM patch Stephen Rothwell
2002-01-10 12:51 ` Thomas Hood [this message]
2002-01-12  9:43 ` Borsenkow Andrej
2002-01-27  8:39 ` Borsenkow Andrej
  -- strict thread matches above, loose matches on Subject: below --
2002-01-10 16:20 David Balazic
2002-01-10 18:37 Bob Toxen
2002-01-11 15:22 Thomas Hood
2002-01-11 15:40 ` Russell King
2002-01-18 10:43   ` Thomas Hood
2002-01-18 10:57     ` Russell King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1010667066.12688.41.camel@thanatos \
    --to=jdthood@mail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-laptop@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.