qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] usb-bsd: convert to QOM


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] usb-bsd: convert to QOM
Date: Sat, 04 Feb 2012 11:07:37 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15

On 02/04/2012 05:54 AM, Blue Swirl wrote:
On Fri, Feb 3, 2012 at 23:41, Anthony Liguori<address@hidden>  wrote:
Untested but simple enough.

Signed-off-by: Anthony Liguori<address@hidden>

There are still some problems, though build does not fail anymore:
   CC    usb-bsd.o
/src/qemu/usb-bsd.c:417: warning: initialization from incompatible pointer type
/src/qemu/usb-bsd.c:401: warning: 'usb_host_class_initfn' defined but not used

---
  usb-bsd.c |   11 ++++++-----
  1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/usb-bsd.c b/usb-bsd.c
index 2c6afc8..43fd1a1 100644
--- a/usb-bsd.c
+++ b/usb-bsd.c
@@ -410,15 +410,16 @@ static void usb_host_class_initfn(ObjectClass *klass, 
void *data)
     uc->handle_destroy = usb_host_handle_destroy;
  }

-static struct DeviceInfo usb_host_dev_info = {
-    .name      = "usb-host",
-    .size      = sizeof(USBHostDevice),
-    .class_init= usb_host_initfn,
+static TypeInfo usb_host_dev_info = {
+    .name          = "usb-host",
+    .parent        = TYPE_USB_DEVICE,
+    .instance_size = sizeof(USBHostDevice),
+    .class_init    = usb_host_initfn,

That's a typo.  It should be usb_host_class_initfn.

We don't do -Werror on BSD which is a I guess why the build wasn't failing 
before.

Can you make the change and commit? I can also provide another patch if you'd prefer that approach.

Regards,

Anthony Liguori

  };

  static void usb_host_register_devices(void)
  {
-    usb_qdev_register(&usb_host_dev_info, NULL, NULL);
+    type_register_static(&usb_host_dev_info);
  }
  device_init(usb_host_register_devices)

--
1.7.4.1







reply via email to

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