mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
hw: Remove assert_no_error usages
Replace assert_no_error() usages with the error_abort system. &error_abort is passed into API calls to signal to the Error sub-system that any errors are fatal. Removes need for caller assertions. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
90c3f6e026
commit
5433a0a89e
7 changed files with 33 additions and 85 deletions
|
@ -59,16 +59,13 @@ xilinx_axiethernet_init(DeviceState *dev, NICInfo *nd, StreamSlave *ds,
|
|||
StreamSlave *cs, hwaddr base, qemu_irq irq, int txmem,
|
||||
int rxmem)
|
||||
{
|
||||
Error *errp = NULL;
|
||||
|
||||
qdev_set_nic_properties(dev, nd);
|
||||
qdev_prop_set_uint32(dev, "rxmem", rxmem);
|
||||
qdev_prop_set_uint32(dev, "txmem", txmem);
|
||||
object_property_set_link(OBJECT(dev), OBJECT(ds),
|
||||
"axistream-connected", &errp);
|
||||
"axistream-connected", &error_abort);
|
||||
object_property_set_link(OBJECT(dev), OBJECT(cs),
|
||||
"axistream-control-connected", &errp);
|
||||
assert_no_error(errp);
|
||||
"axistream-control-connected", &error_abort);
|
||||
qdev_init_nofail(dev);
|
||||
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq);
|
||||
|
@ -78,14 +75,11 @@ static inline void
|
|||
xilinx_axidma_init(DeviceState *dev, StreamSlave *ds, StreamSlave *cs,
|
||||
hwaddr base, qemu_irq irq, qemu_irq irq2, int freqhz)
|
||||
{
|
||||
Error *errp = NULL;
|
||||
|
||||
qdev_prop_set_uint32(dev, "freqhz", freqhz);
|
||||
object_property_set_link(OBJECT(dev), OBJECT(ds),
|
||||
"axistream-connected", &errp);
|
||||
"axistream-connected", &error_abort);
|
||||
object_property_set_link(OBJECT(dev), OBJECT(cs),
|
||||
"axistream-control-connected", &errp);
|
||||
assert_no_error(errp);
|
||||
"axistream-control-connected", &error_abort);
|
||||
qdev_init_nofail(dev);
|
||||
|
||||
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue