public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Linux PM list <linux-pm@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Subject: [PATCH] PM / Sleep: Remove unnecessary label from suspend_freeze_processes()
Date: Sat, 11 Feb 2012 00:35:32 +0100	[thread overview]
Message-ID: <201202110035.32993.rjw@sisk.pl> (raw)

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;
 }
 

             reply	other threads:[~2012-02-10 23:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-10 23:35 Rafael J. Wysocki [this message]
2012-02-11  4:19 ` [PATCH] PM / Sleep: Remove unnecessary label from suspend_freeze_processes() Srivatsa S. Bhat
2012-02-11 21:36   ` Rafael J. Wysocki

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=201202110035.32993.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=srivatsa.bhat@linux.vnet.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox