mbox series

[0/3] ppc: Fixes for class and instance size problems

Message ID 20200825111627.2007820-1-david@gibson.dropbear.id.au
Headers show
Series ppc: Fixes for class and instance size problems | expand

Message

David Gibson Aug. 25, 2020, 11:16 a.m. UTC
As requested, some fixes for the ppc things found by Eduardo's
scripts.

Cédric Le Goater (1):
  ppc/pnv: Fix TypeInfo of PnvLpcController abstract class

David Gibson (2):
  adb: Correct class size on TYPE_ADB_DEVICE
  spapr: Correct type for SPAPR_DRC_PCI

 hw/input/adb.c             | 1 +
 hw/ppc/pnv_lpc.c           | 3 +--
 include/hw/ppc/spapr_drc.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Philippe Mathieu-Daudé Sept. 1, 2020, 9:56 a.m. UTC | #1
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>