From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rtj5U-0005nb-Tp for qemu-devel@nongnu.org; Sat, 04 Feb 2012 12:07:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rtj5T-0000NC-8T for qemu-devel@nongnu.org; Sat, 04 Feb 2012 12:07:44 -0500 Received: from mail-pw0-f45.google.com ([209.85.160.45]:42053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rtj5T-0000Mx-3l for qemu-devel@nongnu.org; Sat, 04 Feb 2012 12:07:43 -0500 Received: by pbaa11 with SMTP id a11so4998227pba.4 for ; Sat, 04 Feb 2012 09:07:42 -0800 (PST) Message-ID: <4F2D65D9.1030208@codemonkey.ws> Date: Sat, 04 Feb 2012 11:07:37 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1328312519-23799-1-git-send-email-aliguori@us.ibm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] usb-bsd: convert to QOM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Anthony Liguori , qemu-devel@nongnu.org, Gerd Hoffman On 02/04/2012 05:54 AM, Blue Swirl wrote: > On Fri, Feb 3, 2012 at 23:41, Anthony Liguori wrote: >> Untested but simple enough. >> >> Signed-off-by: Anthony Liguori > > 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 >> >> >