[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH] Add new function qemu_register_machines
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] Re: [PATCH] Add new function qemu_register_machines |
Date: |
Thu, 21 May 2009 22:27:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
Stefan Weil wrote:
> 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.
OK, that's a matter of taste.
>
>> 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? :-)
Not a single existing user checks the return code.
Jan
signature.asc
Description: OpenPGP digital signature
Re: [Qemu-devel] [PATCH] Add new function qemu_register_machines, Paul Brook, 2009/05/21