linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* power/disk.c: small fixups
@ 2004-10-20 18:16 Pavel Machek
  2004-10-20 19:37 ` Tim Cambrant
  0 siblings, 1 reply; 10+ messages in thread
From: Pavel Machek @ 2004-10-20 18:16 UTC (permalink / raw)
  To: kernel list, Andrew Morton, Patrick Mochel

Hi!

power_down may never ever fail, so it does not really need to return
anything. Kill obsolete code and fixup old comments. Please apply,

								Pavel

--- foo/kernel/power/disk.c	19 Oct 2004 05:52:31 -0000	1.8
+++ foo/kernel/power/disk.c	20 Oct 2004 17:53:42 -0000
@@ -3,6 +3,7 @@
  *
  * Copyright (c) 2003 Patrick Mochel
  * Copyright (c) 2003 Open Source Development Lab
+ * Copyright (c) 2004 Pavel Machek <pavel@suse.cz>
  *
  * This file is released under the GPLv2.
  *
@@ -41,7 +43,7 @@
  *	there ain't no turning back.
  */
 
-static int power_down(u32 mode)
+static void power_down(u32 mode)
 {
 	unsigned long flags;
 	int error = 0;
@@ -67,7 +69,6 @@
 	   after resume. */
 	printk(KERN_CRIT "Please power me down manually\n");
 	while(1);
-	return 0;
 }
 
 
@@ -162,7 +163,7 @@
  *
  *	If we're going through the firmware, then get it over with quickly.
  *
- *	If not, then call pmdis to do it's thing, then figure out how
+ *	If not, then call swsusp to do it's thing, then figure out how
  *	to power down the system.
  */
 
@@ -184,18 +185,9 @@
 
 	if (in_suspend) {
 		pr_debug("PM: writing image.\n");
-
-		/*
-		 * FIXME: Leftover from swsusp. Are they necessary?
-		 */
-		mb();
-		barrier();
-
 		error = swsusp_write();
-		if (!error) {
-			error = power_down(pm_disk_mode);
-			pr_debug("PM: Power down failed.\n");
-		}
+		if (!error)
+			power_down(pm_disk_mode);
 	} else
 		pr_debug("PM: Image restored successfully.\n");
 	swsusp_free();

-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: power/disk.c: small fixups
  2004-10-20 18:16 power/disk.c: small fixups Pavel Machek
@ 2004-10-20 19:37 ` Tim Cambrant
  2004-10-20 19:44   ` Pavel Machek
  2004-10-21  6:05   ` Con Kolivas
  0 siblings, 2 replies; 10+ messages in thread
From: Tim Cambrant @ 2004-10-20 19:37 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Linux Kernel Mailing List, Andrew Morton

On Wed, Oct 20, 2004 at 08:16:17PM +0200, Pavel Machek wrote:
> power_down may never ever fail, so it does not really need to return
> anything. Kill obsolete code and fixup old comments. Please apply,
> 

...

> @@ -162,7 +163,7 @@
>   *
>   *	If we're going through the firmware, then get it over with quickly.
>   *
> - *	If not, then call pmdis to do it's thing, then figure out how
> + *	If not, then call swsusp to do it's thing, then figure out how
>   *	to power down the system.
>   */

I hate to be picky, but changing "it's" to the more correct "its" would
perhaps be nice to do when you're at it?

-- 

Tim Cambrant <cambrant@acc.umu.se>
http://www.acc.umu.se/~cambrant/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: power/disk.c: small fixups
  2004-10-20 19:37 ` Tim Cambrant
@ 2004-10-20 19:44   ` Pavel Machek
  2004-10-21  6:05   ` Con Kolivas
  1 sibling, 0 replies; 10+ messages in thread
From: Pavel Machek @ 2004-10-20 19:44 UTC (permalink / raw)
  To: Tim Cambrant; +Cc: Linux Kernel Mailing List, Andrew Morton

Hi!

> > power_down may never ever fail, so it does not really need to return
> > anything. Kill obsolete code and fixup old comments. Please apply,
> > 
> 
> ...
> 
> > @@ -162,7 +163,7 @@
> >   *
> >   *	If we're going through the firmware, then get it over with quickly.
> >   *
> > - *	If not, then call pmdis to do it's thing, then figure out how
> > + *	If not, then call swsusp to do it's thing, then figure out how
> >   *	to power down the system.
> >   */
> 
> I hate to be picky, but changing "it's" to the more correct "its" would
> perhaps be nice to do when you're at it?

Fixed; I'll propagate it eventually, just will not regenerate current
patch for it, ok?
								Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: power/disk.c: small fixups
  2004-10-20 19:37 ` Tim Cambrant
  2004-10-20 19:44   ` Pavel Machek
@ 2004-10-21  6:05   ` Con Kolivas
  2004-10-21  6:24     ` Nick Piggin
                       ` (2 more replies)
  1 sibling, 3 replies; 10+ messages in thread
From: Con Kolivas @ 2004-10-21  6:05 UTC (permalink / raw)
  To: Tim Cambrant; +Cc: Pavel Machek, Linux Kernel Mailing List, Andrew Morton

Tim Cambrant writes:

> On Wed, Oct 20, 2004 at 08:16:17PM +0200, Pavel Machek wrote:
>> power_down may never ever fail, so it does not really need to return
>> anything. Kill obsolete code and fixup old comments. Please apply,
>> 
> 
> ...
> 
>> @@ -162,7 +163,7 @@
>>   *
>>   *	If we're going through the firmware, then get it over with quickly.
>>   *
>> - *	If not, then call pmdis to do it's thing, then figure out how
>> + *	If not, then call swsusp to do it's thing, then figure out how
>>   *	to power down the system.
>>   */
> 
> I hate to be picky, but changing "it's" to the more correct "its" would
> perhaps be nice to do when you're at it?

"it's" means it belongs to, so therefore "it's" is correct usage here.

Con


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: power/disk.c: small fixups
  2004-10-21  6:05   ` Con Kolivas
@ 2004-10-21  6:24     ` Nick Piggin
  2004-10-21 19:31     ` Bill Davidsen
  2004-10-24 10:09     ` Matthias Urlichs
  2 siblings, 0 replies; 10+ messages in thread
From: Nick Piggin @ 2004-10-21  6:24 UTC (permalink / raw)
  To: Con Kolivas
  Cc: Tim Cambrant, Pavel Machek, Linux Kernel Mailing List, Andrew Morton

Con Kolivas wrote:
> Tim Cambrant writes:
> 
>> On Wed, Oct 20, 2004 at 08:16:17PM +0200, Pavel Machek wrote:
>>
>>> power_down may never ever fail, so it does not really need to return
>>> anything. Kill obsolete code and fixup old comments. Please apply,
>>>
>>
>> ...
>>
>>> @@ -162,7 +163,7 @@
>>>   *
>>>   *    If we're going through the firmware, then get it over with 
>>> quickly.
>>>   *
>>> - *    If not, then call pmdis to do it's thing, then figure out how
>>> + *    If not, then call swsusp to do it's thing, then figure out how
>>>   *    to power down the system.
>>>   */
>>
>>
>> I hate to be picky, but changing "it's" to the more correct "its" would
>> perhaps be nice to do when you're at it?
> 
> 
> "it's" means it belongs to, so therefore "it's" is correct usage here.
> 

Actually this is an exception. "it's" is an abbreviation for "it is",
"its" is possessive.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: power/disk.c: small fixups
  2004-10-21  6:05   ` Con Kolivas
  2004-10-21  6:24     ` Nick Piggin
@ 2004-10-21 19:31     ` Bill Davidsen
  2004-10-24 10:09     ` Matthias Urlichs
  2 siblings, 0 replies; 10+ messages in thread
From: Bill Davidsen @ 2004-10-21 19:31 UTC (permalink / raw)
  To: linux-kernel

Con Kolivas wrote:
> Tim Cambrant writes:
> 
>> On Wed, Oct 20, 2004 at 08:16:17PM +0200, Pavel Machek wrote:
>>
>>> power_down may never ever fail, so it does not really need to return
>>> anything. Kill obsolete code and fixup old comments. Please apply,
>>>
>>
>> ...
>>
>>> @@ -162,7 +163,7 @@
>>>   *
>>>   *    If we're going through the firmware, then get it over with 
>>> quickly.
>>>   *
>>> - *    If not, then call pmdis to do it's thing, then figure out how
>>> + *    If not, then call swsusp to do it's thing, then figure out how
>>>   *    to power down the system.
>>>   */
>>
>>
>> I hate to be picky, but changing "it's" to the more correct "its" would
>> perhaps be nice to do when you're at it?
> 
> 
> "it's" means it belongs to, so therefore "it's" is correct usage here.

In this case, no. "its" is posessive already, without the apostrophe.

See: http://owl.english.purdue.edu/handouts/grammar/g_apost.html

-- 
    -bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
  last possible moment - but no longer"  -me

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: power/disk.c: small fixups
  2004-10-21  6:05   ` Con Kolivas
  2004-10-21  6:24     ` Nick Piggin
  2004-10-21 19:31     ` Bill Davidsen
@ 2004-10-24 10:09     ` Matthias Urlichs
  2004-10-24 14:17       ` Maciej W. Rozycki
  2 siblings, 1 reply; 10+ messages in thread
From: Matthias Urlichs @ 2004-10-24 10:09 UTC (permalink / raw)
  To: linux-kernel

Hi, Con Kolivas wrote:

> "it's" means it belongs to, so therefore "it's" is correct usage here.

Wrong. "it's" is a contraction of "it is".

Nothing more, nothing less.

This usage has become so bad that my brain defaults to flagging the
apostrophized version of *anything* as wrong. :-/

Consider yourself lucky, though; in German the problem is even worse.

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: power/disk.c: small fixups
  2004-10-24 10:09     ` Matthias Urlichs
@ 2004-10-24 14:17       ` Maciej W. Rozycki
  0 siblings, 0 replies; 10+ messages in thread
From: Maciej W. Rozycki @ 2004-10-24 14:17 UTC (permalink / raw)
  To: Matthias Urlichs; +Cc: linux-kernel

On Sun, 24 Oct 2004, Matthias Urlichs wrote:

> > "it's" means it belongs to, so therefore "it's" is correct usage here.
> 
> Wrong. "it's" is a contraction of "it is".
> 
> Nothing more, nothing less.

 Well, it may be a contraction of "it has" as well, depending on the
context. ;-)

  Maciej

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: power/disk.c: small fixups
  2004-10-26  6:12 Clayton Weaver
@ 2004-10-26  8:55 ` David Weinehall
  0 siblings, 0 replies; 10+ messages in thread
From: David Weinehall @ 2004-10-26  8:55 UTC (permalink / raw)
  To: Clayton Weaver; +Cc: linux-kernel

On Tue, Oct 26, 2004 at 01:12:29AM -0500, Clayton Weaver wrote:

[snip]

> So, if "it's" is not a possessive, then it's a
> contraction, where the ' represents one or
> more omitted letters. (No comment on the "it has"
> variant, which I cannot remember ever seeing
> in practice but can think of no reason for ruling
> out as definitively incorrect usage.)

Never seen "it has" contracted to "it's" in practice?
Hey, don't you ever listen to The Beatles?!

o/~ It's been a hard day's night o/~

[snip]


Regards: David
-- 
 /) David Weinehall <tao@acc.umu.se> /) Northern lights wander      (\
//  Maintainer of the v2.0 kernel   //  Dance across the winter sky //
\)  http://www.acc.umu.se/~tao/    (/   Full colour fire           (/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: power/disk.c: small fixups
@ 2004-10-26  6:12 Clayton Weaver
  2004-10-26  8:55 ` David Weinehall
  0 siblings, 1 reply; 10+ messages in thread
From: Clayton Weaver @ 2004-10-26  6:12 UTC (permalink / raw)
  To: linux-kernel

(re: "it's" and similar non-code documentation issues, plus
a tangent from a completely different topic)

Among the best references ever on "The King's English"
(traditional phrase informally meaning "correct English
usage"):

_The Elements of Style_, Strunk and White:

  <http://www.bartleby.com/141/>

The above work is not an encyclopedic reference on
English usage (not complete), but nonetheless:

  "The pronominal possessives hers, its, theirs, yours,
   and oneself have no apostrophe."

So, if "it's" is not a possessive, then it's a
contraction, where the ' represents one or
more omitted letters. (No comment on the "it has"
variant, which I cannot remember ever seeing
in practice but can think of no reason for ruling
out as definitively incorrect usage.)

----

Touching on a tangent from an earlier topic
this week, what about a small, very sensitive emi
collector that plugs into a ps/2 mouse port,
serial port or usb port on a headless, keyboardless,
interactive-user-less server? Something sending
environmentally random data at a rate designed
to accumulate abundant real entropy without hosing
server performance on headless boxes?

(One wants "background noise of the universe"
for a usable input source, at a data rate
high enough to get rid of that nagging anxiety
about whether one always has enough entropy for
ipsec, etc, when no one is using the keyboard or
mouse, there may or may not be any disks, network
data flows tend to stay at fairly consistent rates
due to rate-limiting, etc.)

Regards,

Clayton Weaver
<mailto: cgweav@email.com>
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-10-26  8:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-20 18:16 power/disk.c: small fixups Pavel Machek
2004-10-20 19:37 ` Tim Cambrant
2004-10-20 19:44   ` Pavel Machek
2004-10-21  6:05   ` Con Kolivas
2004-10-21  6:24     ` Nick Piggin
2004-10-21 19:31     ` Bill Davidsen
2004-10-24 10:09     ` Matthias Urlichs
2004-10-24 14:17       ` Maciej W. Rozycki
2004-10-26  6:12 Clayton Weaver
2004-10-26  8:55 ` David Weinehall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).