qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH] Add new function qemu_register_machines


From: Stefan Weil
Subject: [Qemu-devel] Re: [PATCH] Add new function qemu_register_machines
Date: Thu, 21 May 2009 22:19:58 +0200
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)

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 <address@hidden>
>>>>   
>>>>         
>>> 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? :-)






reply via email to

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