[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/3] adb: Correct class size on TYPE_ADB_DEVICE
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 1/3] adb: Correct class size on TYPE_ADB_DEVICE |
Date: |
Tue, 1 Sep 2020 11:56:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 8/25/20 1:16 PM, David Gibson wrote:
> The TypeInfo incorrectly just lets the class size be inherited. It won't
> actually break things, since the class is abstract, but we should get it
> right.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> hw/input/adb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/input/adb.c b/hw/input/adb.c
> index 013fcc9c54..84331b9fce 100644
> --- a/hw/input/adb.c
> +++ b/hw/input/adb.c
> @@ -309,6 +309,7 @@ static void adb_device_class_init(ObjectClass *oc, void
> *data)
> static const TypeInfo adb_device_type_info = {
> .name = TYPE_ADB_DEVICE,
> .parent = TYPE_DEVICE,
> + .class_size = sizeof(ADBDeviceClass),
> .instance_size = sizeof(ADBDevice),
> .abstract = true,
> .class_init = adb_device_class_init,
>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 1/3] adb: Correct class size on TYPE_ADB_DEVICE,
Philippe Mathieu-Daudé <=