From: Julien Grall Subject: Re: [PATCH v2 5/6] xen/console: Add noreturn attribute to panic function Date: Mon, 24 Feb 2014 15:55:07 +0000 Message-ID: <530B6B5B.1010706@linaro.org> References: <1393253572-7157-1-git-send-email-julien.grall@linaro.org> <1393253572-7157-6-git-send-email-julien.grall@linaro.org> <530B7230020000780011EE18@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WHxs8-0002Mc-8H for xen-devel@lists.xenproject.org; Mon, 24 Feb 2014 15:55:12 +0000 Received: by mail-ee0-f53.google.com with SMTP id c13so414059eek.40 for ; Mon, 24 Feb 2014 07:55:10 -0800 (PST) In-Reply-To: <530B7230020000780011EE18@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: Keir Fraser , ian.campbell@citrix.com, Andrew Cooper , tim@xen.org, stefano.stabellini@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 02/24/2014 03:24 PM, Jan Beulich wrote: >>>> On 24.02.14 at 15:52, Julien Grall wrote: >> -void panic(const char *fmt, ...) >> +void __attribute__((noreturn)) panic(const char *fmt, ...) >> { >> va_list args; >> unsigned long flags; >> @@ -1085,6 +1085,8 @@ void panic(const char *fmt, ...) >> watchdog_disable(); >> machine_restart(5000); >> } >> + >> + while ( 1 ); > > The canonical thing here would be "for ( ; ; );", since there are > compilers warning about the literal 1 in what you propose. With Andrew's patch series I don't need this patch anymore. I will drop it. -- Julien Grall