From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [Patch v2 1/2] xen/compiler: Replace opencoded __attribute__((noreturn)) Date: Mon, 25 Nov 2013 15:29:10 +0000 Message-ID: <52936CC6.2090407@citrix.com> References: <1385388177-8866-1-git-send-email-andrew.cooper3@citrix.com> <1385388177-8866-2-git-send-email-andrew.cooper3@citrix.com> <52936A250200007800106B26@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vky68-000564-R6 for xen-devel@lists.xenproject.org; Mon, 25 Nov 2013 15:29:17 +0000 In-Reply-To: <52936A250200007800106B26@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , Keir Fraser , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 25/11/13 14:17, Jan Beulich wrote: >>>> On 25.11.13 at 15:02, Andrew Cooper wrote: >> Changes in v2: >> * Remove redundant uses from publically declared functions > Which you got wrong in at least one case: > >> --- a/xen/arch/x86/crash.c >> +++ b/xen/arch/x86/crash.c >> @@ -36,7 +36,7 @@ static unsigned int crashing_cpu; >> static DEFINE_PER_CPU_READ_MOSTLY(bool_t, crash_save_done); >> >> /* This becomes the NMI handler for non-crashing CPUs, when Xen is crashing. >> */ >> -void __attribute__((noreturn)) do_nmi_crash(struct cpu_user_regs *regs) >> +void do_nmi_crash(struct cpu_user_regs *regs) > This function isn't being declared anywhere. The correct thing would > be to add a declaration, the second best thing to keep the (shortened) > annotation here. > > Jan > It is. It is declared using DECLARE_TRAP_HANDLER(nmi_crash); in include/asm-x86/processor.h which cant easily have a noreturn shoehorned in. The only caller is from entry.S, with no callers from C code. Thinking about it, the DECLARE_TRAP_HANDLER() is overkill, and can be removed in preference of a simple void do_crash_nmi(void) noreturn; ~Andrew