|
[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 18:39, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> On 24/02/14 16:19, Andrew Cooper wrote:
>> On 24/02/14 16:02, Jan Beulich wrote:
>>>>>> 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 ...
>> Hmm - I thought I had fixed all of these - I shall audit and respin. I
>> certainly did intend to be consistent.
>>
>> ~Andrew
>
> And now I remember why it is strictly this way around.
>
> It is a compile error to have the noreturn after the arguments on a
> static function.
>
> shutdown.c:15:1: error: expected â,â or â;â before â{â token
> {
> ^
> shutdown.c:14:13: error: âhalt_this_cpuâ used but never defined [-Werror]
> static void halt_this_cpu(void *arg) noreturn
> ^
>
> but fine to have the attributes between the return type and name.
I.e. precisely like I said I remember things to be.
> I could standardise on the other way around, to be the same as __init &
> friends ?
That's exactly what I was asking for.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |