Skip to contentSkip to conversation

PM / Sleep: Remove unnecessary label from suspend_freeze_processes()

PATCH In review Rafael J. Wysocki 2 participants 3 messages Feb 10, 2012 – Feb 11, 2012

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

PATCH 1/1 PM / Sleep: Remove unnecessary label from suspend_freeze_processes()

From: Rafael J. Wysocki <[email protected]>

The Finish label in suspend_freeze_processes() is in fact necessary and makes the function look more complicated that it really is, so remove it (along with a few empty lines).

---

The patch is on top of linux-pm/pm-sleep.

Thanks,
Rafael

---
 kernel/power/power.h |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
kernel/power/power.h +1 -4
Index: linux/kernel/power/power.h
===================================================================
@@ -234,16 +234,14 @@ static inline int suspend_freeze_process
 	int error;
 
 	error = freeze_processes();
-
 	/*
 	 * freeze_processes() automatically thaws every task if freezing
 	 * fails. So we need not do anything extra upon error.
 	 */
 	if (error)
-		goto Finish;
+		return error;
 
 	error = freeze_kernel_threads();
-
 	/*
 	 * freeze_kernel_threads() thaws only kernel threads upon freezing
 	 * failure. So we have to thaw the userspace tasks ourselves.
@@ -251,7 +249,6 @@ static inline int suspend_freeze_process
 	if (error)
 		thaw_processes();
 
- Finish:
 	return error;
 }
 
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

The Finish label in suspend_freeze_processes() is in fact necessary

s/necessary/unnecessary

Quoted 1 line

and makes the function look more complicated that it really is, so

s/that/than

Quoted 5 lines

remove it (along with a few empty lines).

---

Regards,
Srivatsa S. Bhat

Quoted 40 lines

The patch is on top of linux-pm/pm-sleep.

Thanks,
Rafael

---
 kernel/power/power.h |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Index: linux/kernel/power/power.h
===================================================================

kernel/power/power.h +1 -4
@@ -234,16 +234,14 @@ static inline int suspend_freeze_process
 	int error;
 
 	error = freeze_processes();
-
 	/*
 	 * freeze_processes() automatically thaws every task if freezing
 	 * fails. So we need not do anything extra upon error.
 	 */
 	if (error)
-		goto Finish;
+		return error;
 
 	error = freeze_kernel_threads();
-
 	/*
 	 * freeze_kernel_threads() thaws only kernel threads upon freezing
 	 * failure. So we have to thaw the userspace tasks ourselves.
@@ -251,7 +249,6 @@ static inline int suspend_freeze_process
 	if (error)
 		thaw_processes();
 
- Finish:
 	return error;
 }
 
#2 lore raw
Quoted 14 lines · Srivatsa S. Bhat
Quoted 3 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

The Finish label in suspend_freeze_processes() is in fact necessary

s/necessary/unnecessary

Quoted 1 line

and makes the function look more complicated that it really is, so

s/that/than

Quoted 8 lines
Quoted 5 lines

remove it (along with a few empty lines).

---

Well, thanks for the fixes!

Rafael

Quoted 43 lines
Quoted 40 lines

The patch is on top of linux-pm/pm-sleep.

Thanks,
Rafael

---
 kernel/power/power.h |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Index: linux/kernel/power/power.h
===================================================================

kernel/power/power.h +1 -4
@@ -234,16 +234,14 @@ static inline int suspend_freeze_process
 	int error;
 
 	error = freeze_processes();
-
 	/*
 	 * freeze_processes() automatically thaws every task if freezing
 	 * fails. So we need not do anything extra upon error.
 	 */
 	if (error)
-		goto Finish;
+		return error;
 
 	error = freeze_kernel_threads();
-
 	/*
 	 * freeze_kernel_threads() thaws only kernel threads upon freezing
 	 * failure. So we have to thaw the userspace tasks ourselves.
@@ -251,7 +249,6 @@ static inline int suspend_freeze_process
 	if (error)
 		thaw_processes();
 
- Finish:
 	return error;
 }