* [Qemu-devel] [PATCH] usb-bsd: convert to QOM
@ 2012-02-03 23:41 Anthony Liguori
2012-02-04 11:54 ` Blue Swirl
0 siblings, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2012-02-03 23:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Gerd Hoffman
Untested but simple enough.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
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,
};
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] usb-bsd: convert to QOM
2012-02-03 23:41 [Qemu-devel] [PATCH] usb-bsd: convert to QOM Anthony Liguori
@ 2012-02-04 11:54 ` Blue Swirl
2012-02-04 17:07 ` Anthony Liguori
0 siblings, 1 reply; 5+ messages in thread
From: Blue Swirl @ 2012-02-04 11:54 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, Gerd Hoffman
On Fri, Feb 3, 2012 at 23:41, Anthony Liguori <aliguori@us.ibm.com> wrote:
> Untested but simple enough.
>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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,
> };
>
> 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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] usb-bsd: convert to QOM
2012-02-04 11:54 ` Blue Swirl
@ 2012-02-04 17:07 ` Anthony Liguori
2012-02-04 17:26 ` Blue Swirl
0 siblings, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2012-02-04 17:07 UTC (permalink / raw)
To: Blue Swirl; +Cc: Anthony Liguori, qemu-devel, Gerd Hoffman
On 02/04/2012 05:54 AM, Blue Swirl wrote:
> On Fri, Feb 3, 2012 at 23:41, Anthony Liguori<aliguori@us.ibm.com> wrote:
>> Untested but simple enough.
>>
>> Signed-off-by: Anthony Liguori<aliguori@us.ibm.com>
>
> 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
>>
>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] usb-bsd: convert to QOM
2012-02-04 17:07 ` Anthony Liguori
@ 2012-02-04 17:26 ` Blue Swirl
2012-02-04 17:31 ` Blue Swirl
0 siblings, 1 reply; 5+ messages in thread
From: Blue Swirl @ 2012-02-04 17:26 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Anthony Liguori, qemu-devel, Gerd Hoffman
On Sat, Feb 4, 2012 at 17:07, Anthony Liguori <anthony@codemonkey.ws> wrote:
> On 02/04/2012 05:54 AM, Blue Swirl wrote:
>>
>> On Fri, Feb 3, 2012 at 23:41, Anthony Liguori<aliguori@us.ibm.com> wrote:
>>>
>>> Untested but simple enough.
>>>
>>> Signed-off-by: Anthony Liguori<aliguori@us.ibm.com>
>>
>>
>> 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.
OK, fixed and pushed.
> 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
>>>
>>>
>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] usb-bsd: convert to QOM
2012-02-04 17:26 ` Blue Swirl
@ 2012-02-04 17:31 ` Blue Swirl
0 siblings, 0 replies; 5+ messages in thread
From: Blue Swirl @ 2012-02-04 17:31 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Anthony Liguori, qemu-devel, Gerd Hoffman
On Sat, Feb 4, 2012 at 17:26, Blue Swirl <blauwirbel@gmail.com> wrote:
> On Sat, Feb 4, 2012 at 17:07, Anthony Liguori <anthony@codemonkey.ws> wrote:
>> On 02/04/2012 05:54 AM, Blue Swirl wrote:
>>>
>>> On Fri, Feb 3, 2012 at 23:41, Anthony Liguori<aliguori@us.ibm.com> wrote:
>>>>
>>>> Untested but simple enough.
>>>>
>>>> Signed-off-by: Anthony Liguori<aliguori@us.ibm.com>
>>>
>>>
>>> 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.
>
> OK, fixed and pushed.
Except I forgot to 'git add' before 'git commit --amend'. Pushed the
fix instead.
>> 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
>>>>
>>>>
>>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-02-04 17:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-03 23:41 [Qemu-devel] [PATCH] usb-bsd: convert to QOM Anthony Liguori
2012-02-04 11:54 ` Blue Swirl
2012-02-04 17:07 ` Anthony Liguori
2012-02-04 17:26 ` Blue Swirl
2012-02-04 17:31 ` Blue Swirl
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).