Skip to contentSkip to conversation

power/disk.c: small fixups

PATCH Pavel Machek 7 participants 8 messages Oct 20, 2004 – Oct 24, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

kernel/power/disk.c +5 -14
@@ -3,6 +3,7 @@
  *
  * Copyright (c) 2003 Patrick Mochel
  * Copyright (c) 2003 Open Source Development Lab
+ * Copyright (c) 2004 Pavel Machek <[email protected]>
  *
  * 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();
Signature · 2 lines
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
#1 lore raw
Quoted 3 lines · Pavel Machek

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

...

kernel/power/disk.c line 168

Quoted 8 lines
kernel/power/disk.c +1 -1
@@ -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?

Signature · 2 lines
Tim Cambrant <[email protected]>
http://www.acc.umu.se/~cambrant/
#2 lore raw
Quoted 7 lines · Tim Cambrant
Quoted 3 lines · Pavel Machek

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

...

Quoted 11 lines

kernel/power/disk.c line 168

Quoted 8 lines
kernel/power/disk.c +1 -1
@@ -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

#7 lore raw
In reply to Tim Cambrant

Hi!

Quoted 6 lines
Quoted 3 lines

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

...

Quoted 11 lines

kernel/power/disk.c line 168

Quoted 8 lines
kernel/power/disk.c +1 -1
@@ -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

Signature · 2 lines
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
#3 lore raw
In reply to Con Kolivas
Quoted 25 lines · Con Kolivas
Quoted 8 lines · Tim Cambrant
Quoted 3 lines · Pavel Machek

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

...

Quoted 13 lines
Quoted 9 lines
(quoted diff) +0 -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.

*/

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?

Quoted 2 lines

"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.

#4 lore raw
In reply to Con Kolivas
Quoted 25 lines · Con Kolivas
Quoted 8 lines · Tim Cambrant
Quoted 3 lines · Pavel Machek

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

...

Quoted 13 lines
Quoted 9 lines
(quoted diff) +0 -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.

*/

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?

Quoted 1 line

"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

Signature · 3 lines
   -bill davidsen ([email protected])
"The secret to procrastination is to put things off until the
 last possible moment - but no longer"  -me
#5 lore raw
In reply to Con Kolivas
Quoted 1 line · Con Kolivas

"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.

Signature · 1 line
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  [email protected]
#6 lore raw
Quoted 5 lines · Matthias Urlichs
Quoted 1 line

"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