From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M7EkM-0004cw-JE for qemu-devel@nongnu.org; Thu, 21 May 2009 16:20:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M7EkH-0004cP-DT for qemu-devel@nongnu.org; Thu, 21 May 2009 16:20:09 -0400 Received: from [199.232.76.173] (port=35706 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M7EkH-0004cK-Aq for qemu-devel@nongnu.org; Thu, 21 May 2009 16:20:05 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:64820) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M7EkG-0006ph-Q9 for qemu-devel@nongnu.org; Thu, 21 May 2009 16:20:05 -0400 Message-ID: <4A15B76E.4030807@mail.berlios.de> Date: Thu, 21 May 2009 22:19:58 +0200 From: Stefan Weil MIME-Version: 1.0 References: <4A159CBE.9020606@mail.berlios.de> <4A15A570.4000305@us.ibm.com> <4A15AB58.1090601@mail.berlios.de> <4A15B5F7.4020402@web.de> In-Reply-To: <4A15B5F7.4020402@web.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit 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: Jan Kiszka Cc: Anthony Liguori , QEMU Developers Jan Kiszka schrieb: > Stefan Weil wrote: > >> Anthony Liguori schrieb: >> >>> Stefan Weil wrote: >>> >>>> 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 >>>> >>>> >>> Might as well eliminate qemu_register_machine() and convert everything >>> to use qemu_register_machines(). >>> >>> >> Yes. But I prefer to have both interfaces. >> qemu_register_machine(&my_machine) looks nicer >> than qemu_register_machines(&my_machine, 1). >> >> > > static inline void qemu_register_machine(QEMUMachine *m) > { > qemu_register_machines(m, 1); > } > > No. Inline for functions which are only called once is a (very small, I admit) waste of code. > BTW, this is also a good chance to drop the now unused return value. > > Jan > > Yes. But one never knows, maybe some day it will be used again? :-)