[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 3/5] xen: Identify panic and reboot/halt functions as noreturn

>>> On 24.02.14 at 16:01, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:

This patch shows a somewhat undesirable inconsistency (having been
present in I think les obvious ways in earlier patches too):

> --- a/xen/arch/arm/shutdown.c
> +++ b/xen/arch/arm/shutdown.c
> @@ -11,7 +11,7 @@ static void raw_machine_reset(void)
>      platform_reset();
>  }
> -static void halt_this_cpu(void *arg)
> +static void noreturn halt_this_cpu(void *arg)

For function definitions you place the attribute where I personally
would expect it to be (iirc it can't go between the closing paren
after the parameter declarations and the opening brace of the
function body), yet ...

> --- a/xen/arch/x86/cpu/mcheck/mce.h
> +++ b/xen/arch/x86/cpu/mcheck/mce.h
> @@ -57,7 +57,7 @@ int mce_available(struct cpuinfo_x86 *c);
>  unsigned int mce_firstbank(struct cpuinfo_x86 *c);
>  /* Helper functions used for collecting error telemetry */
>  struct mc_info *x86_mcinfo_getptr(void);
> -void mc_panic(char *s);
> +void mc_panic(char *s) noreturn;

... on function declarations you put it at the end when it could go
equally well at the same place where it sits function definitions.

This isn't meant to say that I don't approve of the patch, but I'd
like to ask considering to be more consistent in the future.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.