From: Herbert Xu Subject: [IA64]: noreturn cannot be used if function may return Date: Fri, 5 Jan 2007 17:07:22 +1100 Message-ID: <20070105060722.GA19824@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , Xen Development Mailing List List-Id: xen-devel@lists.xenproject.org Hi Keir: I spotted some bogus uses of the noreturn keyword on ia64. [IA64]: noreturn cannot be used if function may return The functions die_if_kernel and vmx_die_if_kernel can certainly return. This disqualifies them from using the noreturn keyword which is reserved for functions that never return. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- diff -r 338ceb7b1f09 xen/arch/ia64/linux-xen/unaligned.c --- a/xen/arch/ia64/linux-xen/unaligned.c Thu Jan 04 10:58:01 2007 +0000 +++ b/xen/arch/ia64/linux-xen/unaligned.c Fri Jan 05 17:03:31 2007 +1100 @@ -24,7 +24,7 @@ #include #include -extern void die_if_kernel(char *str, struct pt_regs *regs, long err) __attribute__ ((noreturn)); +extern void die_if_kernel(char *str, struct pt_regs *regs, long err); #undef DEBUG_UNALIGNED_TRAP diff -r 338ceb7b1f09 xen/arch/ia64/xen/xenmisc.c --- a/xen/arch/ia64/xen/xenmisc.c Thu Jan 04 10:58:01 2007 +0000 +++ b/xen/arch/ia64/xen/xenmisc.c Fri Jan 05 17:03:31 2007 +1100 @@ -77,7 +77,7 @@ void console_print(char *msg) // called from unaligned.c //////////////////////////////////// -void die_if_kernel(char *str, struct pt_regs *regs, long err) /* __attribute__ ((noreturn)) */ +void die_if_kernel(char *str, struct pt_regs *regs, long err) { if (user_mode(regs)) return; @@ -88,7 +88,7 @@ void die_if_kernel(char *str, struct pt_ domain_crash_synchronous(); } -void vmx_die_if_kernel(char *str, struct pt_regs *regs, long err) /* __attribute__ ((noreturn)) */ +void vmx_die_if_kernel(char *str, struct pt_regs *regs, long err) { if (vmx_user_mode(regs)) return;