From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PULL 66/84] microbit: Tidy up sysbus_init_child_obj() @child argument
Date: Mon, 15 Jun 2020 22:39:50 +0200 [thread overview]
Message-ID: <20200615204008.3069956-67-armbru@redhat.com> (raw)
In-Reply-To: <20200615204008.3069956-1-armbru@redhat.com>
The callers of sysbus_init_child_obj() commonly pass either &child,
sizeof(child), or pchild, sizeof(*pchild). Tidy up two that don't,
mostly to keep future commits simpler.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200610053247.1583243-41-armbru@redhat.com>
---
hw/arm/microbit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/arm/microbit.c b/hw/arm/microbit.c
index ef213695bd..72fab429c4 100644
--- a/hw/arm/microbit.c
+++ b/hw/arm/microbit.c
@@ -39,7 +39,7 @@ static void microbit_init(MachineState *machine)
Object *soc = OBJECT(&s->nrf51);
Object *i2c = OBJECT(&s->i2c);
- sysbus_init_child_obj(OBJECT(machine), "nrf51", soc, sizeof(s->nrf51),
+ sysbus_init_child_obj(OBJECT(machine), "nrf51", &s->nrf51, sizeof(s->nrf51),
TYPE_NRF51_SOC);
qdev_prop_set_chr(DEVICE(&s->nrf51), "serial0", serial_hd(0));
object_property_set_link(soc, OBJECT(system_memory), "memory",
@@ -51,7 +51,7 @@ static void microbit_init(MachineState *machine)
* hack until we implement the nRF51 TWI controller properly and the
* magnetometer/accelerometer devices.
*/
- sysbus_init_child_obj(OBJECT(machine), "microbit.twi", i2c,
+ sysbus_init_child_obj(OBJECT(machine), "microbit.twi", &s->i2c,
sizeof(s->i2c), TYPE_MICROBIT_I2C);
object_property_set_bool(i2c, true, "realized", &error_fatal);
mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(i2c), 0);
--
2.26.2
next prev parent reply other threads:[~2020-06-15 21:17 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 20:38 [PULL 00/84] QOM patches for 2020-06-15 Markus Armbruster
2020-06-15 20:38 ` [PULL 01/84] qom: Constify object_get_canonical_path{, _component}()'s parameter Markus Armbruster
2020-06-15 20:38 ` [PULL 02/84] qom: Make "info qom-tree" show children sorted Markus Armbruster
2020-06-15 20:38 ` [PULL 03/84] arm/stm32f405: Fix realization of "stm32f2xx-adc" devices Markus Armbruster
2020-06-15 20:38 ` [PULL 04/84] display/xlnx_dp: Fix to realize "i2c-ddc" and "aux-to-i2c-bridge" Markus Armbruster
2020-06-15 20:38 ` [PULL 05/84] sd/pxa2xx_mmci: Fix to realize "pxa2xx-mmci" device Markus Armbruster
2020-06-15 20:38 ` [PULL 06/84] arm/aspeed: Compute the number of CPUs from the SoC definition Markus Armbruster
2020-06-15 20:38 ` [PULL 07/84] arm/aspeed: Rework NIC attachment Markus Armbruster
2020-06-15 20:38 ` [PULL 08/84] armv7m: Delete unused "ARM,bitband-memory" devices Markus Armbruster
2020-06-15 20:38 ` [PULL 09/84] auxbus: Fix aux-to-i2c-bridge to be a subtype of aux-slave Markus Armbruster
2020-06-15 20:38 ` [PULL 10/84] mac_via: Fix to realize "mos6522-q800-via*" devices Markus Armbruster
2020-06-15 20:38 ` [PULL 11/84] macio: Fix to realize "mos6522-cuda" and "mos6522-pmu" devices Markus Armbruster
2020-06-15 20:38 ` [PULL 12/84] macio: Delete unused "macio-gpio" devices Markus Armbruster
2020-06-15 20:38 ` [PULL 13/84] pnv/phb4: Delete unused "pnv-phb4-pec-stack" devices Markus Armbruster
2020-06-15 20:38 ` [PULL 14/84] MAINTAINERS: Make section PowerNV cover pci-host/pnv* as well Markus Armbruster
2020-06-15 20:38 ` [PULL 15/84] ppc4xx: Drop redundant device realization Markus Armbruster
2020-06-15 20:39 ` [PULL 16/84] macio: Put "macio-nvram" device on the macio bus Markus Armbruster
2020-06-15 20:58 ` BALATON Zoltan
2020-06-16 6:48 ` Philippe Mathieu-Daudé
2020-06-15 20:39 ` [PULL 17/84] macio: Fix macio-bus to be a subtype of System bus Markus Armbruster
2020-06-15 20:39 ` [PULL 18/84] ppc/pnv: Put "*-pnv-chip" and "pnv-xive" on the main system bus Markus Armbruster
2020-06-15 20:39 ` [PULL 19/84] pnv/psi: Correct the pnv-psi* devices not to be sysbus devices Markus Armbruster
2020-06-15 20:39 ` [PULL 20/84] display/sm501 display/ati: Fix to realize "i2c-ddc" Markus Armbruster
2020-06-15 20:39 ` [PULL 21/84] riscv: Fix to put "riscv.hart_array" devices on sysbus Markus Armbruster
2020-06-15 20:39 ` [PULL 22/84] riscv: Fix type of SiFive[EU]SocState, member parent_obj Markus Armbruster
2020-06-15 20:39 ` [PULL 23/84] sparc/leon3: Fix to put grlib,* devices on sysbus Markus Armbruster
2020-06-15 20:39 ` [PULL 24/84] qdev: Assert devices are plugged into a bus that can take them Markus Armbruster
2020-06-15 20:39 ` [PULL 25/84] sd: Hide the qdev-but-not-quite thing created by sd_init() Markus Armbruster
2020-06-15 20:39 ` [PULL 26/84] qdev: Assert onboard devices all get realized properly Markus Armbruster
2020-06-15 20:39 ` [PULL 27/84] qdev: Rename qbus_realize() to qbus_init() Markus Armbruster
2020-06-15 20:39 ` [PULL 28/84] Revert "hw/prep: realize the PCI root bus as part of the prep init" Markus Armbruster
2020-06-15 20:39 ` [PULL 29/84] Revert "hw/versatile: realize the PCI root bus as part of the versatile init" Markus Armbruster
2020-06-15 20:39 ` [PULL 30/84] qdev: New qdev_new(), qdev_realize(), etc Markus Armbruster
2020-06-15 20:39 ` [PULL 31/84] qdev: Put qdev_new() to use with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 32/84] qdev: Convert to qbus_realize(), qbus_unrealize() Markus Armbruster
2020-06-15 20:39 ` [PULL 33/84] qdev: Convert to qdev_unrealize() with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 34/84] qdev: Convert to qdev_unrealize() manually Markus Armbruster
2020-06-15 20:39 ` [PULL 35/84] qdev: Convert uses of qdev_create() with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 36/84] qdev: Convert uses of qdev_create() manually Markus Armbruster
2020-06-15 20:39 ` [PULL 37/84] qdev: Convert uses of qdev_set_parent_bus() with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 38/84] qdev: Convert uses of qdev_set_parent_bus() manually Markus Armbruster
2020-06-15 20:39 ` [PULL 39/84] pci: New pci_new(), pci_realize_and_unref() etc Markus Armbruster
2020-06-15 20:39 ` [PULL 40/84] hw/ppc: Eliminate two superfluous QOM casts Markus Armbruster
2020-06-15 20:39 ` [PULL 41/84] pci: Convert uses of pci_create() etc. with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 42/84] pci: Convert uses of pci_create() etc. manually Markus Armbruster
2020-06-15 20:39 ` [PULL 43/84] pci: pci_create(), pci_create_multifunction() are now unused, drop Markus Armbruster
2020-06-15 20:39 ` [PULL 44/84] isa: New isa_new(), isa_realize_and_unref() etc Markus Armbruster
2020-06-15 20:39 ` [PULL 45/84] isa: Convert uses of isa_create() with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 46/84] isa: Convert uses of isa_create(), isa_try_create() manually Markus Armbruster
2020-06-15 20:39 ` [PULL 47/84] isa: isa_create(), isa_try_create() are now unused, drop Markus Armbruster
2020-06-15 20:39 ` [PULL 48/84] ssi: ssi_auto_connect_slaves() never does anything, drop Markus Armbruster
2020-06-15 20:39 ` [PULL 49/84] ssi: Convert uses of ssi_create_slave_no_init() with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 50/84] ssi: Convert last use of ssi_create_slave_no_init() manually Markus Armbruster
2020-06-15 20:39 ` [PULL 51/84] ssi: ssi_create_slave_no_init() is now unused, drop Markus Armbruster
2020-06-15 20:39 ` [PULL 52/84] usb: New usb_new(), usb_realize_and_unref() Markus Armbruster
2020-06-15 20:39 ` [PULL 53/84] usb: Convert uses of usb_create() Markus Armbruster
2020-06-15 20:39 ` [PULL 54/84] usb: usb_create() is now unused, drop Markus Armbruster
2020-06-15 20:39 ` [PULL 55/84] usb: Eliminate usb_try_create_simple() Markus Armbruster
2020-06-15 20:39 ` [PULL 56/84] qdev: qdev_create(), qdev_try_create() are now unused, drop Markus Armbruster
2020-06-15 20:39 ` [PULL 57/84] auxbus: Rename aux_init_bus() to aux_bus_init() Markus Armbruster
2020-06-15 20:39 ` [PULL 58/84] auxbus: New aux_bus_realize(), pairing with aux_bus_init() Markus Armbruster
2020-06-15 20:39 ` [PULL 59/84] auxbus: Convert a use of qdev_set_parent_bus() Markus Armbruster
2020-06-15 20:39 ` [PULL 60/84] auxbus: Eliminate aux_create_slave() Markus Armbruster
2020-06-15 20:39 ` [PULL 61/84] qom: Tidy up a few object_initialize_child() calls Markus Armbruster
2020-06-15 20:39 ` [PULL 62/84] qom: Less verbose object_initialize_child() Markus Armbruster
2020-06-15 20:39 ` [PULL 63/84] macio: Convert use of qdev_set_parent_bus() Markus Armbruster
2020-06-15 20:39 ` [PULL 64/84] macio: Eliminate macio_init_child_obj() Markus Armbruster
2020-06-15 20:39 ` [PULL 65/84] sysbus: Drop useless OBJECT() in sysbus_init_child_obj() calls Markus Armbruster
2020-06-15 20:39 ` Markus Armbruster [this message]
2020-06-15 20:39 ` [PULL 67/84] sysbus: Tidy up sysbus_init_child_obj()'s @childsize arg, part 1 Markus Armbruster
2020-06-15 20:39 ` [PULL 68/84] hw/arm/armsse: Pass correct child size to sysbus_init_child_obj() Markus Armbruster
2020-06-15 20:39 ` [PULL 69/84] sysbus: Tidy up sysbus_init_child_obj()'s @childsize arg, part 2 Markus Armbruster
2020-06-15 20:39 ` [PULL 70/84] sysbus: New sysbus_realize(), sysbus_realize_and_unref() Markus Armbruster
2020-06-15 20:39 ` [PULL 71/84] sysbus: Convert to sysbus_realize() etc. with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 72/84] qdev: Drop qdev_realize() support for null bus Markus Armbruster
2020-06-15 20:39 ` [PULL 73/84] sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 1 Markus Armbruster
2020-06-15 20:39 ` [PULL 74/84] sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 2 Markus Armbruster
2020-06-15 20:39 ` [PULL 75/84] sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 3 Markus Armbruster
2020-06-15 20:40 ` [PULL 76/84] sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 4 Markus Armbruster
2020-06-15 20:40 ` [PULL 77/84] sysbus: sysbus_init_child_obj() is now unused, drop Markus Armbruster
2020-06-15 20:40 ` [PULL 78/84] microbit: Eliminate two local variables in microbit_init() Markus Armbruster
2020-06-15 20:40 ` [PULL 79/84] s390x/event-facility: Simplify creation of SCLP event devices Markus Armbruster
2020-06-15 20:40 ` [PULL 80/84] qdev: Make qdev_realize() support bus-less devices Markus Armbruster
2020-06-15 20:40 ` [PULL 81/84] qdev: Use qdev_realize() in qdev_device_add() Markus Armbruster
2020-06-15 20:40 ` [PULL 82/84] qdev: Convert bus-less devices to qdev_realize() with Coccinelle Markus Armbruster
2020-06-15 20:40 ` [PULL 83/84] qdev: qdev_init_nofail() is now unused, drop Markus Armbruster
2020-06-15 20:40 ` [PULL 84/84] MAINTAINERS: Make section QOM cover hw/core/*bus.c as well Markus Armbruster
2020-06-16 12:26 ` [PULL 00/84] QOM patches for 2020-06-15 Peter Maydell
2020-06-16 15:26 ` Thomas Huth
2020-06-17 3:30 ` Philippe Mathieu-Daudé
2020-06-26 18:28 ` Peter Maydell
2020-06-27 11:53 ` Markus Armbruster
2020-06-27 15:11 ` Peter Maydell
2020-06-29 7:25 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200615204008.3069956-67-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).