Markus Armbruster
57d479c9c6
ssi: Convert uses of ssi_create_slave_no_init() with Coccinelle
Replace
dev = ssi_create_slave_no_init(bus, type_name);
...
qdev_init_nofail(dev);
by
dev = qdev_new(type_name);
...
qdev_realize_and_unref(dev, bus, &error_fatal);
Recent commit "qdev: New qdev_new(), qdev_realize(), etc." explains
why.
@@
type SSIBus;
identifier bus;
expression dev, qbus, expr;
expression list args;
@@
- bus = (SSIBus *)qbus;
+ bus = qbus; // TODO fix up decl
...
- dev = ssi_create_slave_no_init(bus, args);
+ dev = qdev_new(args);
... when != dev = expr
- qdev_init_nofail(dev);
+ qdev_realize_and_unref(dev, bus, &error_fatal);
@@
expression dev, bus, expr;
expression list args;
@@
- dev = ssi_create_slave_no_init(bus, args);
+ dev = qdev_new(args);
... when != dev = expr
- qdev_init_nofail(dev);
+ qdev_realize_and_unref(dev, BUS(bus), &error_fatal);
Bus declarations fixed up manually.
Cc: Alistair Francis <alistair@alistair23.me>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200610053247.1583243-24-armbru@redhat.com>
2020-06-15 22:05:28 +02:00
..
2020-05-15 07:07:58 +02:00
2020-05-15 07:07:58 +02:00
2020-01-24 20:59:15 +01:00
2020-06-15 21:36:09 +02:00
2020-06-15 21:36:09 +02:00
2020-06-15 21:36:09 +02:00
2020-06-15 22:05:28 +02:00
2020-06-05 17:23:09 +01:00
2020-05-15 07:07:58 +02:00
2020-02-20 14:47:08 +01:00
2020-04-03 19:23:37 +01:00
2020-06-15 22:00:10 +02:00
2020-02-19 16:49:54 +00:00
2019-09-03 16:20:34 +01:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:00:10 +02:00
2020-05-21 22:05:27 +01:00
2020-05-21 22:05:27 +01:00
2020-05-21 22:05:27 +01:00
2020-05-21 22:05:27 +01:00
2020-05-21 22:05:27 +01:00
2020-03-05 16:09:14 +00:00
2020-06-15 22:05:08 +02:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:00:10 +02:00
2020-05-21 22:05:27 +01:00
2020-02-19 16:49:55 +00:00
2020-03-17 15:18:46 +01:00
2020-03-12 16:27:33 +00:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:00:10 +02:00
2019-08-16 13:31:53 +02:00
2020-06-15 22:00:10 +02:00
2020-02-19 16:49:55 +00:00
2020-05-15 07:07:58 +02:00
2020-06-15 22:05:28 +02:00
2019-10-24 20:10:27 +02:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:00:10 +02:00
2020-05-15 07:07:58 +02:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:00:10 +02:00
2020-03-17 15:18:46 +01:00
2020-06-15 22:00:10 +02:00
2020-03-17 15:18:46 +01:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:05:28 +02:00
2020-06-15 22:05:08 +02:00
2020-03-05 16:09:14 +00:00
2019-12-20 14:03:00 +00:00
2020-02-20 14:47:08 +01:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:00:10 +02:00
2020-03-17 15:18:50 +01:00
2020-06-15 21:35:52 +02:00
2020-06-15 22:00:10 +02:00
2019-10-22 17:44:01 +01:00
2020-03-05 12:18:16 -05:00
2020-03-17 15:18:46 +01:00
2019-03-22 16:18:07 +00:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:00:10 +02:00
2020-06-09 12:46:45 -04:00
2020-06-15 22:05:08 +02:00
2020-06-15 22:05:28 +02:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:00:10 +02:00
2020-06-15 22:05:28 +02:00
2020-05-15 07:07:58 +02:00
2020-03-05 16:09:15 +00:00