linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PM / Sleep: Remove unnecessary label from suspend_freeze_processes()
@ 2012-02-10 23:35 Rafael J. Wysocki
  2012-02-11  4:19 ` Srivatsa S. Bhat
  0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2012-02-10 23:35 UTC (permalink / raw)
  To: Linux PM list; +Cc: LKML, Srivatsa S. Bhat

From: Rafael J. Wysocki <rjw@sisk.pl>

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

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---

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
===================================================================
--- linux.orig/kernel/power/power.h
+++ 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;
 }
 

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

* Re: [PATCH] PM / Sleep: Remove unnecessary label from suspend_freeze_processes()
  2012-02-10 23:35 [PATCH] PM / Sleep: Remove unnecessary label from suspend_freeze_processes() Rafael J. Wysocki
@ 2012-02-11  4:19 ` Srivatsa S. Bhat
  2012-02-11 21:36   ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Srivatsa S. Bhat @ 2012-02-11  4:19 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Linux PM list, LKML

On 02/11/2012 05:05 AM, Rafael J. Wysocki wrote:

> From: Rafael J. Wysocki <rjw@sisk.pl>
> 
> The Finish label in suspend_freeze_processes() is in fact necessary


s/necessary/unnecessary

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


s/that/than

> remove it (along with a few empty lines).
> 
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> 


Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>

Regards,
Srivatsa S. Bhat

> 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
> ===================================================================
> --- linux.orig/kernel/power/power.h
> +++ 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;
>  }
> 
> 


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

* Re: [PATCH] PM / Sleep: Remove unnecessary label from suspend_freeze_processes()
  2012-02-11  4:19 ` Srivatsa S. Bhat
@ 2012-02-11 21:36   ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2012-02-11 21:36 UTC (permalink / raw)
  To: Srivatsa S. Bhat; +Cc: Linux PM list, LKML

On Saturday, February 11, 2012, Srivatsa S. Bhat wrote:
> On 02/11/2012 05:05 AM, Rafael J. Wysocki wrote:
> 
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> > 
> > The Finish label in suspend_freeze_processes() is in fact necessary
> 
> 
> s/necessary/unnecessary
> 
> > and makes the function look more complicated that it really is, so
> 
> 
> s/that/than
> 
> > remove it (along with a few empty lines).
> > 
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > ---
> > 
> 
> 
> Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>

Well, thanks for the fixes!

Rafael


> > 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
> > ===================================================================
> > --- linux.orig/kernel/power/power.h
> > +++ 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;
> >  }
> > 
> > 
> 
> 
> 


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

end of thread, other threads:[~2012-02-11 21:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-10 23:35 [PATCH] PM / Sleep: Remove unnecessary label from suspend_freeze_processes() Rafael J. Wysocki
2012-02-11  4:19 ` Srivatsa S. Bhat
2012-02-11 21:36   ` Rafael J. Wysocki

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