From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2gGG-000144-Rr for qemu-devel@nongnu.org; Thu, 03 Jul 2014 08:37:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2gGB-0005ma-Np for qemu-devel@nongnu.org; Thu, 03 Jul 2014 08:37:12 -0400 Message-ID: <53B54E6A.2000708@redhat.com> Date: Thu, 03 Jul 2014 06:36:58 -0600 From: Eric Blake MIME-Version: 1.0 References: <1402630619-4408-1-git-send-email-aik@ozlabs.ru> <1402630619-4408-2-git-send-email-aik@ozlabs.ru> <87tx6zndvl.fsf@abhimanyu.in.ibm.com> In-Reply-To: <87tx6zndvl.fsf@abhimanyu.in.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ujMgpBlB2BBXDj4k3lScK6AgUb8wRsDrW" Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 1/4] cpus: Define callback for QEMU "nmi" command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikunj A Dadhania , Alexey Kardashevskiy , qemu-devel@nongnu.org Cc: Peter Maydell , Alexander Graf , Luiz Capitulino , Christian Borntraeger , qemu-ppc@nongnu.org, Cornelia Huck , Paolo Bonzini , Richard Henderson This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ujMgpBlB2BBXDj4k3lScK6AgUb8wRsDrW Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/03/2014 12:41 AM, Nikunj A Dadhania wrote: > Alexey Kardashevskiy 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 @@ >=20 > [...] >=20 >> + >> +static void nmi_children(Object *o, struct do_nmi_s *ns); >> + >=20 > [...] >=20 >> + >> +void nmi_children(Object *o, struct do_nmi_s *ns) >=20 > 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ujMgpBlB2BBXDj4k3lScK6AgUb8wRsDrW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTtU5qAAoJEKeha0olJ0NqDgQIAI4fXkXTDT0s5AvgWPoukLg4 dZhsjOyCz5kRrxxGS0lHZ96fPPreqmqPfXY62a6uILUkI6XSa0qj9vT90rO4Q2ra OKC7XyKnt25fsVKXUKEySOmWrh0rYMwDl9CrYy37DTmEsDnazpPs+kdRspGyLwCy +sf7OFKqCCUKqdzruqtaOVMiLaZm7merzwIHXwKLo4qGMfSNpeUD9WKidEJQBk3A wytuLWgjxgcBJKjizb6srXbscNWinAvSUtitcFPMdhuZOISw74tH3jwb7D3xD5B4 U/ARtQkmsFOTRSFa3MDJ4MDZNaPnRSXKK/jiTEfvHYhlYBw1eZdyhmiIxU+gD40= =/o2H -----END PGP SIGNATURE----- --ujMgpBlB2BBXDj4k3lScK6AgUb8wRsDrW--