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?