From: Avi Kivity <avi@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Paul Brook <paul@codesourcery.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH 0/10] qdev patches.
Date: Mon, 22 Jun 2009 12:36:58 +0300 [thread overview]
Message-ID: <4A3F50BA.2030103@redhat.com> (raw)
In-Reply-To: <4A3F4BB9.6060604@redhat.com>
On 06/22/2009 12:15 PM, Gerd Hoffmann wrote:
> On 06/19/09 19:51, Paul Brook wrote:
>> * qdev: update pci device registration
>>
>> I dislike passing an {array,length} pair. Especially when it requires
>> every
>> user to manually get the right length.
>
> qemu has a ARRAY_SIZE macro which can be used like this:
> (from uhci patch):
>
> pci_qdev_register(uhci_info, ARRAY_SIZE(uhci_info));
>
> to get the right length, so I don't see this as a problem.
>
> I can create pci_qdev_register_{single,array} macros to hide the
> length parameter. I can also just drop the length argument and just
> use multiple calls in the (few) places where multiple drivers are
> registered at once. What do you prefer?
There's a third alternative, zero terminating the array.
If most calls register one qdev, I'd prefer pci_qdev_register() and
pci_qdev_register_many().
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2009-06-22 9:38 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 12:59 [Qemu-devel] [PATCH 0/10] qdev patches Gerd Hoffmann
2009-06-17 12:59 ` [Qemu-devel] [PATCH 01/10] qdev: update pci device registration Gerd Hoffmann
2009-06-17 12:59 ` [Qemu-devel] [PATCH 02/10] qdev: replace bus_type enum with bus_info struct Gerd Hoffmann
2009-06-17 12:59 ` [Qemu-devel] [PATCH 03/10] qdev: remove DeviceType Gerd Hoffmann
2009-06-17 12:59 ` [Qemu-devel] [PATCH 04/10] qdev/pci: bus name Gerd Hoffmann
2009-06-17 12:59 ` [Qemu-devel] [PATCH 05/10] qdev: hook up i440fx Gerd Hoffmann
2009-06-17 12:59 ` [Qemu-devel] [PATCH 06/10] qdev: convert piix-ide, first step Gerd Hoffmann
2009-06-17 12:59 ` [Qemu-devel] [PATCH 07/10] qdev-ify: piix acpi Gerd Hoffmann
2009-06-17 12:59 ` [Qemu-devel] [PATCH 08/10] qdev-ify: uhci Gerd Hoffmann
2009-06-17 12:59 ` [Qemu-devel] [PATCH 09/10] qdev-ify: usb Gerd Hoffmann
2009-06-17 12:59 ` [Qemu-devel] [PATCH 10/10] qdev-ify: scsi Gerd Hoffmann
2009-06-18 14:39 ` [Qemu-devel] Re: [PATCH 0/10] qdev patches Gerd Hoffmann
2009-06-19 15:59 ` Gerd Hoffmann
2009-06-19 17:51 ` Paul Brook
2009-06-22 9:15 ` Gerd Hoffmann
2009-06-22 9:36 ` Avi Kivity [this message]
2009-06-22 9:57 ` Gerd Hoffmann
2009-06-22 11:25 ` Gerd Hoffmann
2009-06-22 11:29 ` Avi Kivity
2009-06-22 14:02 ` Gerd Hoffmann
2009-06-22 13:45 ` Gerd Hoffmann
2009-06-19 16:26 ` [Qemu-devel] " Paul Brook
2009-06-26 21:16 ` Markus Armbruster
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=4A3F50BA.2030103@redhat.com \
--to=avi@redhat.com \
--cc=kraxel@redhat.com \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
/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).