All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Keir Fraser <keir@xen.org>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [Patch v2 2/2] xen: Identify panic and reboot/halt functions as noreturn
Date: Mon, 25 Nov 2013 15:36:57 +0000	[thread overview]
Message-ID: <52936E99.8010102@citrix.com> (raw)
In-Reply-To: <52936C100200007800106B41@nat28.tlf.novell.com>

On 25/11/13 14:26, Jan Beulich wrote:
>>>> On 25.11.13 at 15:02, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> --- a/xen/include/xen/shutdown.h
>> +++ b/xen/include/xen/shutdown.h
>> @@ -1,13 +1,15 @@
>>  #ifndef __XEN_SHUTDOWN_H__
>>  #define __XEN_SHUTDOWN_H__
>>  
>> +#include <xen/compiler.h>
>> +
>>  /* opt_noreboot: If true, machine will need manual reset on error. */
>>  extern bool_t opt_noreboot;
>>  
>> -void dom0_shutdown(u8 reason);
>> +void dom0_shutdown(u8 reason) noreturn;
>>  
>> -void machine_restart(unsigned int delay_millisecs);
>> -void machine_halt(void);
>> -void machine_power_off(void);
>> +void machine_restart(unsigned int delay_millisecs) noreturn;
>> +void machine_halt(void) noreturn;
>> +void machine_power_off(void) noreturn;
> I would have expected that you actually checked that all of these
> functions really have no way of returning (even if just because of
> an error or mistake). But you can't possibly have done this
> verification, or else you would have noticed that there's no
> function machine_power_off() in the code base (and I would have
> expected your patch to remove the stray declaration instead of
> adjusting it).
>
> Jan
>

I thought I had found it in an arm codepath, but git grep indicates I am
wrong.  I did positively identify each possible codepath from panic down
to each tail function.

It should certainly be removed.

~Andrew

  reply	other threads:[~2013-11-25 15:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 14:02 [PATCH v2 0/2] Improvements with noreturn Andrew Cooper
2013-11-25 14:02 ` [Patch v2 1/2] xen/compiler: Replace opencoded __attribute__((noreturn)) Andrew Cooper
2013-11-25 14:17   ` Jan Beulich
2013-11-25 15:29     ` Andrew Cooper
2013-11-26 12:00   ` George Dunlap
2013-11-25 14:02 ` [Patch v2 2/2] xen: Identify panic and reboot/halt functions as noreturn Andrew Cooper
2013-11-25 14:26   ` Jan Beulich
2013-11-25 15:36     ` Andrew Cooper [this message]
2013-11-25 19:46 ` [PATCH v2 0/2] Improvements with noreturn 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=52936E99.8010102@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=ian.campbell@citrix.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.