]> Git Repo - qemu.git/commit
sysbus: Tidy up sysbus_init_child_obj()'s @childsize arg, part 1
authorMarkus Armbruster <[email protected]>
Wed, 10 Jun 2020 05:32:30 +0000 (07:32 +0200)
committerMarkus Armbruster <[email protected]>
Mon, 15 Jun 2020 20:05:28 +0000 (22:05 +0200)
commit8352a5b8ccdaeb3fc1b00550399abc375ae62d8b
treede9f2708db29129900f8c5a0688b7bf04f9106ee
parentb0d09949fe2e0d3ebe806356bf782894f5b8acc5
sysbus: Tidy up sysbus_init_child_obj()'s @childsize arg, part 1

The callers of sysbus_init_child_obj() commonly pass either &child,
sizeof(child), or pchild, sizeof(*pchild).  Tidy up the few that use
sizeof(child_type) instead, mostly to keep future commits simpler.

Coccinelle script:

    @@
    expression parent, propname, type;
    type T;
    T child;
    @@
    -    sysbus_init_child_obj(parent, propname, &child, sizeof(T), type)
    +    sysbus_init_child_obj(parent, propname, &child, sizeof(child), type)

    @@
    expression parent, propname, type;
    type T;
    T *child;
    @@
    -    sysbus_init_child_obj(parent, propname, child, sizeof(T), type)
    +    sysbus_init_child_obj(parent, propname, child, sizeof(*child), type)

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>
hw/arm/bcm2835_peripherals.c
hw/arm/mps2-tz.c
hw/arm/musca.c
hw/display/sm501.c
hw/microblaze/xlnx-zynqmp-pmu.c
This page took 0.027537 seconds and 4 git commands to generate.