public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Horms <horms@verge.net.au>
To: ebiederm@xmission.com, linux-kernel@vger.kernel.org, fastboot@osdl.org
Subject: Re: [PATCH] kexec: typo in machine_kexec()
Date: Sat, 20 May 2006 11:09:19 +0900	[thread overview]
Message-ID: <20060520020919.GA6802@verge.net.au> (raw)
In-Reply-To: <20060405055754.GA3277@verge.net.au>

kexec: rework kexec_crash logic to make it a little less nested

Signed-Off-By: Simon Horman <horms@verge.net.au>

 kernel/kexec.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

6d28ed0c03ff2d9345a5b198a52f6ee3cc7dd424
diff --git a/kernel/kexec.c b/kernel/kexec.c
index bf39d28..281736f 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1042,6 +1042,7 @@ #endif
 
 void crash_kexec(struct pt_regs *regs)
 {
+	struct pt_regs fixed_regs;
 	struct kimage *image;
 	int locked;
 
@@ -1055,16 +1056,15 @@ void crash_kexec(struct pt_regs *regs)
 	 * sufficient.  But since I reuse the memory...
 	 */
 	locked = xchg(&kexec_lock, 1);
-	if (!locked) {
-		image = xchg(&kexec_crash_image, NULL);
-		if (image) {
-			struct pt_regs fixed_regs;
-			crash_setup_regs(&fixed_regs, regs);
-			machine_crash_shutdown(&fixed_regs);
-			machine_kexec(image);
-		}
-		xchg(&kexec_lock, 0);
+	if (locked)
+		return;
+	image = xchg(&kexec_crash_image, NULL);
+	if (image) {
+		crash_setup_regs(&fixed_regs, regs);
+		machine_crash_shutdown(&fixed_regs);
+		machine_kexec(image);
 	}
+	xchg(&kexec_lock, 0);
 }
 
 static int __init crash_notes_memory_init(void)


  parent reply	other threads:[~2006-05-21  2:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-04 23:48 [PATCH] kexec: typo in machine_kexec() Horms
2006-04-05  3:05 ` Randy.Dunlap
2006-04-05  5:56   ` Eric W. Biederman
2006-04-05 15:19     ` [PATCH] kexec: update MAINTAINERS Randy.Dunlap
2006-04-05  5:57   ` [PATCH] kexec: typo in machine_kexec() Horms
2006-04-05  6:24     ` Con Kolivas
2006-04-05 15:49       ` Eric W. Biederman
2006-04-05 17:09         ` Randy.Dunlap
2006-05-20  2:09     ` Horms [this message]
2006-04-05  3:10 ` Con Kolivas

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=20060520020919.GA6802@verge.net.au \
    --to=horms@verge.net.au \
    --cc=ebiederm@xmission.com \
    --cc=fastboot@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /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