From: David Gibson <david@gibson.dropbear.id.au>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Sagar Karandikar" <sagark@eecs.berkeley.edu>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
qemu-devel@nongnu.org,
"Alistair Francis" <Alistair.Francis@wdc.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Subbaraya Sundeep" <sundeep.lkml@gmail.com>,
qemu-block@nongnu.org, "Markus Armbruster" <armbru@redhat.com>,
"Aleksandar Markovic" <aleksandar.qemu.devel@gmail.com>,
"Max Reitz" <mreitz@redhat.com>, "Joel Stanley" <joel@jms.id.au>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Aleksandar Rikalo" <aleksandar.rikalo@rt-rk.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Alistair Francis" <alistair@alistair23.me>,
"Beniamino Galvani" <b.galvani@gmail.com>,
qemu-arm@nongnu.org, "Cédric Le Goater" <clg@kaod.org>,
"Richard Henderson" <rth@twiddle.net>,
"Kevin Wolf" <kwolf@redhat.com>,
qemu-riscv@nongnu.org, "Andrew Jeffery" <andrew@aj.id.au>,
"Bastian Koppelmann" <kbastian@mail.uni-paderborn.de>,
"Andrew Baumann" <Andrew.Baumann@microsoft.com>,
"Jean-Christophe Dubois" <jcd@tribudubois.net>,
"Michael Walle" <michael@walle.cc>,
qemu-ppc@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [PATCH-for-5.1 v3 11/23] hw/pci-host/pnv_phb3: Add missing error-propagation code
Date: Tue, 14 Apr 2020 12:12:03 +1000 [thread overview]
Message-ID: <20200414021203.GI48061@umbus.fritz.box> (raw)
In-Reply-To: <20200412224144.12205-12-f4bug@amsat.org>
[-- Attachment #1: Type: text/plain, Size: 2892 bytes --]
On Mon, Apr 13, 2020 at 12:41:32AM +0200, Philippe Mathieu-Daudé wrote:
> Patch created mechanically by running:
>
> $ spatch \
> --macro-file scripts/cocci-macro-file.h --include-headers \
> --sp-file scripts/coccinelle/use-error_propagate-in-realize.cocci \
> --keep-comments --smpl-spacing --in-place --dir hw
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> hw/pci-host/pnv_phb3.c | 24 ++++++++++++++++++++----
> 1 file changed, 20 insertions(+), 4 deletions(-)
>
> diff --git a/hw/pci-host/pnv_phb3.c b/hw/pci-host/pnv_phb3.c
> index 57d717ed23..a9029f5a02 100644
> --- a/hw/pci-host/pnv_phb3.c
> +++ b/hw/pci-host/pnv_phb3.c
> @@ -1008,7 +1008,11 @@ static void pnv_phb3_realize(DeviceState *dev, Error **errp)
>
> /* LSI sources */
> object_property_set_link(OBJECT(&phb->lsis), OBJECT(pnv), "xics",
> - &error_abort);
> + &local_err);
> + if (local_err) {
> + error_propagate(errp, local_err);
> + return;
> + }
> object_property_set_bool(OBJECT(&phb->lsis), true, "realized", &local_err);
> if (local_err) {
> error_propagate(errp, local_err);
> @@ -1023,9 +1027,17 @@ static void pnv_phb3_realize(DeviceState *dev, Error **errp)
>
> /* MSI sources */
> object_property_set_link(OBJECT(&phb->msis), OBJECT(phb), "phb",
> - &error_abort);
> + &local_err);
> + if (local_err) {
> + error_propagate(errp, local_err);
> + return;
> + }
> object_property_set_link(OBJECT(&phb->msis), OBJECT(pnv), "xics",
> - &error_abort);
> + &local_err);
> + if (local_err) {
> + error_propagate(errp, local_err);
> + return;
> + }
> object_property_set_bool(OBJECT(&phb->msis), true, "realized", &local_err);
> if (local_err) {
> error_propagate(errp, local_err);
> @@ -1034,7 +1046,11 @@ static void pnv_phb3_realize(DeviceState *dev, Error **errp)
>
> /* Power Bus Common Queue */
> object_property_set_link(OBJECT(&phb->pbcq), OBJECT(phb), "phb",
> - &error_abort);
> + &local_err);
> + if (local_err) {
> + error_propagate(errp, local_err);
> + return;
> + }
> object_property_set_bool(OBJECT(&phb->pbcq), true, "realized", &local_err);
> if (local_err) {
> error_propagate(errp, local_err);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-04-14 2:35 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-12 22:41 [PATCH-for-5.1 v3 00/23] various: Fix error-propagation with Coccinelle scripts (part 2) Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 01/23] scripts/coccinelle: Catch missing error_propagate() calls in realize() Philippe Mathieu-Daudé
2020-04-14 12:40 ` Markus Armbruster
2020-04-14 13:24 ` Markus Armbruster
2020-04-12 22:41 ` [PATCH-for-5.1 v3 02/23] hw/arm/fsl-imx: Add missing error-propagation code Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 03/23] hw/arm/stm32f*05_soc: " Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 04/23] hw/arm/aspeed: " Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 05/23] hw/arm/allwinner-a10: " Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 06/23] hw/arm/msf2-soc: " Philippe Mathieu-Daudé
2020-04-13 15:57 ` Alistair Francis
2020-04-12 22:41 ` [PATCH-for-5.1 v3 07/23] hw/riscv/sifive: " Philippe Mathieu-Daudé
2020-04-13 22:12 ` Alistair Francis
2020-04-12 22:41 ` [PATCH-for-5.1 v3 08/23] hw/arm/armv7m: " Philippe Mathieu-Daudé
2020-04-13 22:10 ` Alistair Francis
2020-04-12 22:41 ` [PATCH-for-5.1 v3 09/23] hw/intc/arm_gicv3_its_kvm: " Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 10/23] hw/microblaze/xlnx-zynqmp-pmu: " Philippe Mathieu-Daudé
2020-04-13 22:13 ` Alistair Francis
2020-04-12 22:41 ` [PATCH-for-5.1 v3 11/23] hw/pci-host/pnv_phb3: " Philippe Mathieu-Daudé
2020-04-14 2:12 ` David Gibson [this message]
2020-04-12 22:41 ` [PATCH-for-5.1 v3 12/23] hw/block/onenand: " Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 13/23] scripts/coccinelle: Add script to catch missing error_propagate() calls Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 14/23] hw/arm/bcm2835_peripherals: Add missing error-propagation code Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 15/23] hw/arm/fsl-imx: " Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 16/23] hw/arm/stm32fx05_soc: " Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 17/23] hw/dma/xilinx_axidma: " Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 18/23] hw/i386/x86: " Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 19/23] hw/mips/cps: " Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 20/23] hw/misc/macio/macio: " Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 21/23] hw/net/xilinx_axienet: " Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 22/23] hw/riscv/sifive_u: " Philippe Mathieu-Daudé
2020-04-12 22:41 ` [PATCH-for-5.1 v3 23/23] hw/sd/milkymist-memcard: " Philippe Mathieu-Daudé
2020-04-13 1:30 ` [PATCH-for-5.1 v3 00/23] various: Fix error-propagation with Coccinelle scripts (part 2) no-reply
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=20200414021203.GI48061@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=Alistair.Francis@wdc.com \
--cc=Andrew.Baumann@microsoft.com \
--cc=aleksandar.qemu.devel@gmail.com \
--cc=aleksandar.rikalo@rt-rk.com \
--cc=alistair@alistair23.me \
--cc=andrew@aj.id.au \
--cc=armbru@redhat.com \
--cc=aurelien@aurel32.net \
--cc=b.galvani@gmail.com \
--cc=clg@kaod.org \
--cc=edgar.iglesias@gmail.com \
--cc=ehabkost@redhat.com \
--cc=f4bug@amsat.org \
--cc=jasowang@redhat.com \
--cc=jcd@tribudubois.net \
--cc=joel@jms.id.au \
--cc=kbastian@mail.uni-paderborn.de \
--cc=kwolf@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=michael@walle.cc \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=palmer@dabbelt.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=rth@twiddle.net \
--cc=sagark@eecs.berkeley.edu \
--cc=sundeep.lkml@gmail.com \
/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).