qemu-e2k/hw/vfio
Markus Armbruster af175e85f9 error: Eliminate error_propagate() with Coccinelle, part 2
When all we do with an Error we receive into a local variable is
propagating to somewhere else, we can just as well receive it there
right away.  The previous commit did that with a Coccinelle script I
consider fairly trustworthy.  This commit uses the same script with
the matching of return taken out, i.e. we convert

    if (!foo(..., &err)) {
        ...
        error_propagate(errp, err);
        ...
    }

to

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

This is unsound: @err could still be read between afterwards.  I don't
know how to express "no read of @err without an intervening write" in
Coccinelle.  Instead, I manually double-checked for uses of @err.

Suboptimal line breaks tweaked manually.  qdev_realize() simplified
further to placate scripts/checkpatch.pl.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200707160613.848843-36-armbru@redhat.com>
2020-07-10 15:18:08 +02:00
..
Kconfig hw/vfio: Move the IGD quirk code to a separate file 2020-02-06 11:55:42 -07:00
Makefile.objs hw/vfio: Move the IGD quirk code to a separate file 2020-02-06 11:55:42 -07:00
amd-xgbe.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
ap.c vfio: Convert to ram_block_discard_disable() 2020-07-02 05:54:59 -04:00
calxeda-xgmac.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
ccw.c vfio: Convert to ram_block_discard_disable() 2020-07-02 05:54:59 -04:00
common.c vfio: Convert to ram_block_discard_disable() 2020-07-02 05:54:59 -04:00
display.c Revert "hw/display/ramfb: initialize fw-config space with xres/ yres" 2020-05-18 15:42:34 +02:00
igd.c hw/vfio: Move the IGD quirk code to a separate file 2020-02-06 11:55:42 -07:00
pci-quirks.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
pci.c error: Eliminate error_propagate() with Coccinelle, part 2 2020-07-10 15:18:08 +02:00
pci.h hw/vfio: Move the IGD quirk code to a separate file 2020-02-06 11:55:42 -07:00
platform.c lockable: replaced locks with lock guard macros where appropriate 2020-05-04 16:07:43 +01:00
spapr.c vfio/spapr: Fix page size calculation 2020-04-07 08:55:10 +10:00
trace-events spapr: Support NVIDIA V100 GPU with NVLink2 2019-04-26 10:41:23 +10:00