From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M7ErO-00061h-5h for qemu-devel@nongnu.org; Thu, 21 May 2009 16:27:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M7ErI-0005zu-OI for qemu-devel@nongnu.org; Thu, 21 May 2009 16:27:24 -0400 Received: from [199.232.76.173] (port=48964 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M7ErI-0005zj-Lv for qemu-devel@nongnu.org; Thu, 21 May 2009 16:27:20 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:59663) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M7ErH-0007bU-WF for qemu-devel@nongnu.org; Thu, 21 May 2009 16:27:20 -0400 Message-ID: <4A15B922.1040501@web.de> Date: Thu, 21 May 2009 22:27:14 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4A159CBE.9020606@mail.berlios.de> <4A15A570.4000305@us.ibm.com> <4A15AB58.1090601@mail.berlios.de> <4A15B5F7.4020402@web.de> <4A15B76E.4030807@mail.berlios.de> In-Reply-To: <4A15B76E.4030807@mail.berlios.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig35D866AA15473BD4377FB6F3" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH] Add new function qemu_register_machines List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Anthony Liguori , QEMU Developers This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig35D866AA15473BD4377FB6F3 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Stefan Weil wrote: > Jan Kiszka schrieb: >> Stefan Weil wrote: >> =20 >>> Anthony Liguori schrieb: >>> =20 >>>> Stefan Weil wrote: >>>> =20 >>>>> Add new function qemu_register_machines. >>>>> >>>>> The patch removes the unused prototype register_machines >>>>> and adds a new function which makes registration of >>>>> more than one machine a little easier. >>>>> >>>>> The new function is applied to the machines in hw/spitz.c >>>>> (where a static keyword for akitapda_machine was missing), >>>>> but it can also be applied to several other QEMU source files. >>>>> >>>>> Signed-off-by: Stefan Weil >>>>> =20 >>>>> =20 >>>> Might as well eliminate qemu_register_machine() and convert everythi= ng >>>> to use qemu_register_machines(). >>>> >>>> =20 >>> Yes. But I prefer to have both interfaces. >>> qemu_register_machine(&my_machine) looks nicer >>> than qemu_register_machines(&my_machine, 1). >>> >>> =20 >> static inline void qemu_register_machine(QEMUMachine *m) >> { >> qemu_register_machines(m, 1); >> } >> >> =20 >=20 > No. Inline for functions which are only called once > is a (very small, I admit) waste of code. OK, that's a matter of taste. >=20 >> BTW, this is also a good chance to drop the now unused return value. >> >> Jan >> >> =20 >=20 > Yes. But one never knows, maybe some day it will be used again? :-) Not a single existing user checks the return code. Jan --------------enig35D866AA15473BD4377FB6F3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkoVuSYACgkQniDOoMHTA+lDUwCeJvYQ1AzJvr7E5E89gj9e6TgT uUUAn17DOjvl9RFJrIA7bGlWZHMXJKtF =qDXM -----END PGP SIGNATURE----- --------------enig35D866AA15473BD4377FB6F3--