From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Keir Fraser <keir@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: [PATCH v4 4/5] xen: Misc cleanup as a result of the previous patches
Date: Tue, 25 Feb 2014 12:23:30 +0000 [thread overview]
Message-ID: <1393331011-22240-5-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1393331011-22240-1-git-send-email-andrew.cooper3@citrix.com>
This includes:
* A stale comment in sh_skip_sync()
* A dead for ever loop in __bug()
* A prototype for machine_power_off() which unimplemented in any architecture
* Replacing a for(;;); loop with unreachable()
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <JBeulich@suse.com>
---
xen/arch/x86/efi/boot.c | 2 +-
xen/arch/x86/mm/shadow/common.c | 1 -
xen/drivers/char/console.c | 1 -
xen/include/xen/shutdown.h | 1 -
4 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/xen/arch/x86/efi/boot.c b/xen/arch/x86/efi/boot.c
index a26e0af..62c4812 100644
--- a/xen/arch/x86/efi/boot.c
+++ b/xen/arch/x86/efi/boot.c
@@ -201,7 +201,7 @@ static void __init noreturn blexit(const CHAR16 *str)
efi_bs->FreePages(xsm.addr, PFN_UP(xsm.size));
efi_bs->Exit(efi_ih, EFI_SUCCESS, 0, NULL);
- for( ; ; ); /* not reached */
+ unreachable(); /* not reached */
}
/* generic routine for printing error messages */
diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index 11c6b62..b400ccb 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -875,7 +875,6 @@ static int sh_skip_sync(struct vcpu *v, mfn_t gl1mfn)
SHADOW_ERROR("gmfn %#lx was OOS but not shadowed as an l1.\n",
mfn_x(gl1mfn));
BUG();
- return 0; /* BUG() is no longer __attribute__((noreturn)). */
}
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 532c426..7d4383c 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -1089,7 +1089,6 @@ void __bug(char *file, int line)
printk("Xen BUG at %s:%d\n", file, line);
dump_execution_state();
panic("Xen BUG at %s:%d", file, line);
- for ( ; ; ) ;
}
void __warn(char *file, int line)
diff --git a/xen/include/xen/shutdown.h b/xen/include/xen/shutdown.h
index f04905b..a00bfef 100644
--- a/xen/include/xen/shutdown.h
+++ b/xen/include/xen/shutdown.h
@@ -10,6 +10,5 @@ void noreturn dom0_shutdown(u8 reason);
void noreturn machine_restart(unsigned int delay_millisecs);
void noreturn machine_halt(void);
-void machine_power_off(void);
#endif /* __XEN_SHUTDOWN_H__ */
--
1.7.10.4
next prev parent reply other threads:[~2014-02-25 12:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-25 12:23 [PATCH v4 0/5] Improvements with noreturn Andrew Cooper
2014-02-25 12:23 ` [PATCH v4 1/5] xen/compiler: Replace opencoded __attribute__((noreturn)) Andrew Cooper
2014-02-25 13:36 ` Jan Beulich
2014-02-25 13:48 ` Andrew Cooper
2014-02-28 16:33 ` Jan Beulich
2014-02-28 17:32 ` Andrew Cooper
2014-02-25 12:23 ` [PATCH v4 2/5] x86/crash: Fix up declaration of do_nmi_crash() Andrew Cooper
2014-02-25 12:23 ` [PATCH v4 3/5] xen: Identify panic and reboot/halt functions as noreturn Andrew Cooper
2014-02-25 12:23 ` Andrew Cooper [this message]
2014-02-25 12:23 ` [PATCH v4 5/5] xen/x86: Identify reset_stack_and_jump() " Andrew Cooper
2014-02-25 13:40 ` [PATCH v4 0/5] Improvements with noreturn Jan Beulich
2014-02-28 15:15 ` Keir Fraser
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=1393331011-22240-5-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xen.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;
as well as URLs for NNTP newsgroup(s).