diff options
author | Markus Armbruster | 2020-06-10 07:32:30 +0200 |
---|---|---|
committer | Markus Armbruster | 2020-06-15 22:05:28 +0200 |
commit | 8352a5b8ccdaeb3fc1b00550399abc375ae62d8b (patch) | |
tree | de9f2708db29129900f8c5a0688b7bf04f9106ee /include/hw/sysbus.h | |
parent | microbit: Tidy up sysbus_init_child_obj() @child argument (diff) | |
download | qemu-8352a5b8ccdaeb3fc1b00550399abc375ae62d8b.tar.gz qemu-8352a5b8ccdaeb3fc1b00550399abc375ae62d8b.tar.xz qemu-8352a5b8ccdaeb3fc1b00550399abc375ae62d8b.zip |
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 <armbru@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200610053247.1583243-42-armbru@redhat.com>
Diffstat (limited to 'include/hw/sysbus.h')
0 files changed, 0 insertions, 0 deletions