linux-mips
[Top] [All Lists]

[PATCH 03/10] Loongson: Convert loongson_halt() to use unreachable()

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH 03/10] Loongson: Convert loongson_halt() to use unreachable()
From: Wu Zhangjin <wuzhangjin@gmail.com>
Date: Mon, 4 Jan 2010 17:16:45 +0800
Cc: linux-mips@linux-mips.org, yanh@lemote.com, huhb@lemote.com, zhangfx@lemote.com, Wu Zhangjin <wuzhangjin@gmail.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:in-reply-to:references; bh=tEWdPpqSgDywKc7ivHG1U4Ss4J1ZoK3W1mj2ZYsnZ/k=; b=njxMZ+1R26+fiESW0JhZlY4x30yXvsM+ZePFUNpDbtKcv1tVWYDZLZUqWeZDKlpGIy 9iHKdrd/8ESbnzxsnvJKsSQYrVZTEut0XQt0mfG5mxLgc6/w97kiCFBIPUzka9eZijdd I2KJ/EQkUKFv/blzXDCjDtEfEa0E5+eU5Knf0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=U98kx+FUM5NZ2oCwRjl3aUgyUTtnYGcPWKceOoYaiPsYLsFu+5gWiYmmyoCau9SiEI wK4JFZr6eDm4iW6WXfZ11nEvUFKsLmNd1X9zYk4jn7fUhhwMB14dqOTkmcxHo8e/lgfo J48DPWc7viLarNqgt8nH6OWmmbZgbM/Dm/SqQ=
In-reply-to: <669ff2f39fd2aa3849e472438d3d9d499c8f0e3a.1262596493.git.wuzhangjin@gmail.com>
In-reply-to: <cover.1262596493.git.wuzhangjin@gmail.com>
References: <cover.1262586650.git.wuzhangjin@gmail.com> <f4aeb125cb030f10d34966febfe9715874d52ab2.1262596493.git.wuzhangjin@gmail.com> <669ff2f39fd2aa3849e472438d3d9d499c8f0e3a.1262596493.git.wuzhangjin@gmail.com>
References: <cover.1262596493.git.wuzhangjin@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: Wu Zhangjin <wuzhangjin@gmail.com>

Use the new unreachable() macro instead of while(1);

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
---
 arch/mips/loongson/common/reset.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/mips/loongson/common/reset.c 
b/arch/mips/loongson/common/reset.c
index d57f171..5833f9f 100644
--- a/arch/mips/loongson/common/reset.c
+++ b/arch/mips/loongson/common/reset.c
@@ -6,7 +6,7 @@
  *
  * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
  * Author: Fuxin Zhang, zhangfx@lemote.com
- * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology
+ * Copyright (C) 2009 Lemote, Inc.
  * Author: Zhangjin Wu, wuzj@lemote.com
  */
 #include <linux/init.h>
@@ -28,8 +28,7 @@ static void loongson_restart(char *command)
 static void loongson_halt(void)
 {
        mach_prepare_shutdown();
-       while (1)
-               ;
+       unreachable();
 }
 
 static int __init mips_reboot_setup(void)
-- 
1.6.5.6


<Prev in Thread] Current Thread [Next in Thread>