qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 1/4] cpus: Define callback for QEM


From: Eric Blake
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 1/4] cpus: Define callback for QEMU "nmi" command
Date: Thu, 03 Jul 2014 06:36:58 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 07/03/2014 12:41 AM, Nikunj A Dadhania wrote:
> Alexey Kardashevskiy <address@hidden> writes:
>> diff --git a/hw/core/nmi.c b/hw/core/nmi.c
>> new file mode 100644
>> index 0000000..db1295f
>> --- /dev/null
>> +++ b/hw/core/nmi.c
>> @@ -0,0 +1,84 @@
> 
> [...]
> 
>> +
>> +static void nmi_children(Object *o, struct do_nmi_s *ns);
>> +
> 
> [...]
> 
>> +
>> +void nmi_children(Object *o, struct do_nmi_s *ns)
> 
> Above declared as static and implemented non-static.

No, it is implemented as static, by definition of the C language (the
compiler does not require you to repeat the 'static', but it still
honors all attributes present on either the declaration or the
implementation).  Although you are right that it looks inconsistent.

On the other hand, if the function is not mutually recursive with
something else in the file, I personally prefer hoisting static
functions to be implemented in topological order, instead of finding a
static declaration and then having to hunt for the body.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]