qemu-e2k/hw/scsi
Markus Armbruster 778a2dc592 qom: Use returned bool to check for failure, Coccinelle part
The previous commit enables conversion of

    foo(..., &err);
    if (err) {
        ...
    }

to

    if (!foo(..., errp)) {
        ...
    }

for QOM functions that now return true / false on success / error.
Coccinelle script:

    @@
    identifier fun = {
        object_apply_global_props, object_initialize_child_with_props,
        object_initialize_child_with_propsv, object_property_get,
        object_property_get_bool, object_property_parse, object_property_set,
        object_property_set_bool, object_property_set_int,
        object_property_set_link, object_property_set_qobject,
        object_property_set_str, object_property_set_uint, object_set_props,
        object_set_propv, user_creatable_add_dict,
        user_creatable_complete, user_creatable_del
    };
    expression list args, args2;
    typedef Error;
    Error *err;
    @@
    -    fun(args, &err, args2);
    -    if (err)
    +    if (!fun(args, &err, args2))
         {
             ...
         }

Fails to convert hw/arm/armsse.c, because Coccinelle gets confused by
ARMSSE being used both as typedef and function-like macro there.
Convert manually.

Line breaks tidied up manually.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20200707160613.848843-29-armbru@redhat.com>
2020-07-10 15:18:08 +02:00
..
emulation.c
esp-pci.c scsi/esp-pci: add g_assert() for fix clang analyzer warning in esp_pci_io_write() 2020-05-04 11:17:27 +02:00
esp.c hw/scsi/esp: Remove superfluous semicolon 2020-02-18 20:20:49 +01:00
Kconfig
lsi53c895a.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
Makefile.objs
megasas.c hw/scsi/megasas: Fix possible out-of-bounds array access in tracepoints 2020-06-26 09:39:37 -04:00
mfi.h
mpi.h
mptconfig.c
mptendian.c
mptsas.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
mptsas.h
scsi-bus.c qom: Use returned bool to check for failure, Coccinelle part 2020-07-10 15:18:08 +02:00
scsi-disk.c block: consolidate blocksize properties consistency checks 2020-06-17 14:53:40 +02:00
scsi-generic.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
spapr_vscsi.c qdev: Convert uses of qdev_create() with Coccinelle 2020-06-15 22:00:10 +02:00
srp.h
trace-events hw/scsi/spapr_vscsi: Convert debug fprintf() to trace event 2020-03-17 15:08:50 +11:00
vhost-scsi-common.c
vhost-scsi.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
vhost-user-scsi.c qom/object: Move Object typedef to 'qemu/typedefs.h' 2020-06-10 12:09:36 -04:00
viosrp.h hw/scsi/spapr_vscsi: Do not mix SRP IU size with DMA buffer size 2020-03-17 15:08:50 +11:00
virtio-scsi-dataplane.c
virtio-scsi.c qdev: Drop qbus_set_hotplug_handler() parameter @errp 2020-07-02 06:25:29 +02:00
vmw_pvscsi.c qdev: Drop qbus_set_hotplug_handler() parameter @errp 2020-07-02 06:25:29 +02:00
vmw_pvscsi.h