qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Stefan Weil <weil@mail.berlios.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH] Add new function qemu_register_machines
Date: Thu, 21 May 2009 22:27:14 +0200	[thread overview]
Message-ID: <4A15B922.1040501@web.de> (raw)
In-Reply-To: <4A15B76E.4030807@mail.berlios.de>

[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]

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 <weil@mail.berlios.de>
>>>>>   
>>>>>         
>>>> 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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  reply	other threads:[~2009-05-21 20:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-21 18:26 [Qemu-devel] [PATCH] Add new function qemu_register_machines Stefan Weil
2009-05-21 19:03 ` Anthony Liguori
2009-05-21 19:28   ` Stefan Weil
2009-05-21 20:13     ` [Qemu-devel] " Jan Kiszka
2009-05-21 20:19       ` Stefan Weil
2009-05-21 20:27         ` Jan Kiszka [this message]
2009-05-21 20:30           ` Anthony Liguori
2009-05-21 22:33 ` [Qemu-devel] " Paul Brook
2009-05-22 10:08   ` Stefan Weil
2009-05-22 11:59     ` Paul Brook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A15B922.1040501@web.de \
    --to=jan.kiszka@web.de \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=weil@mail.berlios.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).