qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH-for-5.1 v3 00/24] various: Fix error-propagation with Coccinelle scripts (part 1)
@ 2020-04-12 22:35 Philippe Mathieu-Daudé
  2020-04-12 22:35 ` [PATCH-for-5.1 v3 01/24] various: Remove suspicious '\' character outside of #define in C code Philippe Mathieu-Daudé
                   ` (24 more replies)
  0 siblings, 25 replies; 49+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-04-12 22:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Sagar Karandikar, Michael S. Tsirkin,
	Jeff Cody, Jason Wang, Alistair Francis, Edgar E. Iglesias,
	Subbaraya Sundeep, qemu-block, Markus Armbruster, Max Reitz,
	Joel Stanley, Marc-André Lureau, Richard Henderson,
	Philippe Mathieu-Daudé, Eduardo Habkost, Xie Changlong,
	Alistair Francis, Beniamino Galvani, qemu-arm, Peter Chubb,
	Cédric Le Goater, Palmer Dabbelt, David Gibson, Kevin Wolf,
	qemu-riscv, Andrew Jeffery, Wen Congyang,
	Philippe Mathieu-Daudé, Jean-Christophe Dubois, qemu-ppc,
	Bastian Koppelmann, Paolo Bonzini

This series is inspired of Peter Maydell fix [1]:
"hw/arm/xlnx-zynqmp.c: fix some error-handling code",
but grew after v1 [2] review :/

Markus: I added the cocci patches to your Error section, I hope
that's fine :)

Part 1: Simplify error propagation by moving some code from
        DeviceClass::realize() to DeviceClass:initfn().

Regards,

Phil.

[1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg691636.html
[2] https://www.mail-archive.com/qemu-devel@nongnu.org/msg692155.html
Supersedes: <20200406174743.16956-1-f4bug@amsat.org>

Philippe Mathieu-Daud=C3=A9 (24):
  various: Remove suspicious '\' character outside of #define in C code
  scripts/coccinelle: Script to simplify DeviceClass error propagation
  hw/arm/allwinner-a10: Move some code from realize() to init()
  hw/arm/aspeed_ast2600: Simplify use of Error*
  hw/arm/aspeed_ast2600: Move some code from realize() to init()
  hw/arm/aspeed_soc: Move some code from realize() to init()
  hw/arm/aspeed_soc: Simplify use of Error*
  hw/arm/fsl-imx6: Simplify checks on 'smp_cpus' count
  hw/arm/fsl-imx6: Move some code from realize() to init()
  hw/arm/fsl-imx31: Move some code from realize() to init()
  hw/arm/msf2-soc: Store MemoryRegion in MSF2State
  hw/arm/stm32f205_soc: Store MemoryRegion in STM32F205State
  hw/arm/stm32f205_soc: Move some code from realize() to init()
  hw/arm/xlnx-zynqmp: Use single propagate_error() call
  hw/arm/xlnx-zynqmp: Split xlnx_zynqmp_create_rpu() as init + realize
  hw/arm/xlnx-zynqmp: Move some code from realize() to init()
  hw/microblaze/xlnx-zynqmp-pmu: Move some code from realize() to init()
  hw/pci-host/pnv_phb3: Move some code from realize() to init()
  hw/riscv/sifive_e: Move some code from realize() to init()
  hw/riscv/sifive_u: Use single type_init()
  hw/riscv/sifive_u: Move some code from realize() to init()
  hw/riscv/sifive_u: Store MemoryRegion in SiFiveUSoCState
  hw/riscv/sifive_u: Move some code from realize() to init()
  hw/riscv/sifive_u: Rename MachineClass::init()

 ...implify-init-realize-error_propagate.cocci |  69 ++++++++++
 include/hw/arm/msf2-soc.h                     |   4 +
 include/hw/arm/stm32f205_soc.h                |   4 +
 include/hw/riscv/sifive_u.h                   |   2 +
 block/replication.c                           |   4 +-
 block/vhdx.c                                  |   8 +-
 dump/dump.c                                   |   2 +-
 hw/arm/allwinner-a10.c                        |  26 ++--
 hw/arm/aspeed_ast2600.c                       |  61 +++++----
 hw/arm/aspeed_soc.c                           |  19 +--
 hw/arm/fsl-imx31.c                            |   4 +-
 hw/arm/fsl-imx6.c                             |  55 ++++----
 hw/arm/msf2-soc.c                             |  18 +--
 hw/arm/stm32f205_soc.c                        |  28 ++--
 hw/arm/xlnx-zynqmp.c                          | 126 +++++++++---------
 hw/microblaze/xlnx-zynqmp-pmu.c               |  46 +++----
 hw/net/virtio-net.c                           |   2 +-
 hw/pci-host/pnv_phb3.c                        |   8 +-
 hw/riscv/sifive_e.c                           |  26 ++--
 hw/riscv/sifive_u.c                           |  66 +++++----
 hw/scsi/scsi-disk.c                           |   2 +-
 hw/sd/sdhci.c                                 |   2 +-
 target/i386/cpu.c                             |  18 +--
 target/microblaze/cpu.c                       |  14 +-
 target/ppc/translate_init.inc.c               |   4 +-
 MAINTAINERS                                   |   1 +
 26 files changed, 342 insertions(+), 277 deletions(-)
 create mode 100644 scripts/coccinelle/simplify-init-realize-error_propagate.=
cocci

--=20
2.21.1



^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2020-04-29  6:05 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-12 22:35 [PATCH-for-5.1 v3 00/24] various: Fix error-propagation with Coccinelle scripts (part 1) Philippe Mathieu-Daudé
2020-04-12 22:35 ` [PATCH-for-5.1 v3 01/24] various: Remove suspicious '\' character outside of #define in C code Philippe Mathieu-Daudé
2020-04-13 15:56   ` Alistair Francis
2020-04-14  2:08   ` David Gibson
2020-04-29  6:03   ` Markus Armbruster
2020-04-12 22:35 ` [PATCH-for-5.1 v3 02/24] scripts/coccinelle: Script to simplify DeviceClass error propagation Philippe Mathieu-Daudé
2020-04-14 12:24   ` Markus Armbruster
2020-04-14 12:30     ` Philippe Mathieu-Daudé
2020-04-14 13:17       ` Markus Armbruster
2020-04-15  6:16         ` Philippe Mathieu-Daudé
2020-04-12 22:35 ` [PATCH-for-5.1 v3 03/24] hw/arm/allwinner-a10: Move some code from realize() to init() Philippe Mathieu-Daudé
2020-04-13 21:02   ` Philippe Mathieu-Daudé
2020-04-12 22:35 ` [PATCH-for-5.1 v3 04/24] hw/arm/aspeed_ast2600: Simplify use of Error* Philippe Mathieu-Daudé
2020-04-12 22:36 ` [PATCH-for-5.1 v3 05/24] hw/arm/aspeed_ast2600: Move some code from realize() to init() Philippe Mathieu-Daudé
2020-04-15  7:50   ` Cédric Le Goater
2020-04-12 22:36 ` [PATCH-for-5.1 v3 06/24] hw/arm/aspeed_soc: " Philippe Mathieu-Daudé
2020-04-12 22:36 ` [PATCH-for-5.1 v3 07/24] hw/arm/aspeed_soc: Simplify use of Error* Philippe Mathieu-Daudé
2020-04-12 22:36 ` [PATCH-for-5.1 v3 08/24] hw/arm/fsl-imx6: Simplify checks on 'smp_cpus' count Philippe Mathieu-Daudé
2020-04-12 22:36 ` [PATCH-for-5.1 v3 09/24] hw/arm/fsl-imx6: Move some code from realize() to init() Philippe Mathieu-Daudé
2020-04-12 22:36 ` [PATCH-for-5.1 v3 10/24] hw/arm/fsl-imx31: " Philippe Mathieu-Daudé
2020-04-12 22:36 ` [PATCH-for-5.1 v3 11/24] hw/arm/msf2-soc: Store MemoryRegion in MSF2State Philippe Mathieu-Daudé
2020-04-13 21:59   ` Alistair Francis
2020-04-12 22:36 ` [PATCH-for-5.1 v3 12/24] hw/arm/stm32f205_soc: Store MemoryRegion in STM32F205State Philippe Mathieu-Daudé
2020-04-13 22:00   ` Alistair Francis
2020-04-12 22:36 ` [PATCH-for-5.1 v3 13/24] hw/arm/stm32f205_soc: Move some code from realize() to init() Philippe Mathieu-Daudé
2020-04-13 22:02   ` Alistair Francis
2020-04-12 22:36 ` [PATCH-for-5.1 v3 14/24] hw/arm/xlnx-zynqmp: Use single propagate_error() call Philippe Mathieu-Daudé
2020-04-13 22:05   ` Alistair Francis
2020-04-12 22:36 ` [PATCH-for-5.1 v3 15/24] hw/arm/xlnx-zynqmp: Split xlnx_zynqmp_create_rpu() as init + realize Philippe Mathieu-Daudé
2020-04-12 22:36 ` [PATCH-for-5.1 v3 16/24] hw/arm/xlnx-zynqmp: Move some code from realize() to init() Philippe Mathieu-Daudé
2020-04-13 22:06   ` Alistair Francis
2020-04-12 22:36 ` [PATCH-for-5.1 v3 17/24] hw/microblaze/xlnx-zynqmp-pmu: " Philippe Mathieu-Daudé
2020-04-13 22:19   ` Alistair Francis
2020-04-12 22:36 ` [PATCH-for-5.1 v3 18/24] hw/pci-host/pnv_phb3: " Philippe Mathieu-Daudé
2020-04-14  2:10   ` David Gibson
2020-04-15  7:51   ` Cédric Le Goater
2020-04-12 22:36 ` [PATCH-for-5.1 v3 19/24] hw/riscv/sifive_e: " Philippe Mathieu-Daudé
2020-04-13 22:20   ` Alistair Francis
2020-04-12 22:36 ` [PATCH-for-5.1 v3 20/24] hw/riscv/sifive_u: Use single type_init() Philippe Mathieu-Daudé
2020-04-13 22:10   ` Alistair Francis
2020-04-12 22:36 ` [PATCH-for-5.1 v3 21/24] hw/riscv/sifive_u: Move some code from realize() to init() Philippe Mathieu-Daudé
2020-04-13 22:16   ` Alistair Francis
2020-04-12 22:36 ` [PATCH-for-5.1 v3 22/24] hw/riscv/sifive_u: Store MemoryRegion in SiFiveUSoCState Philippe Mathieu-Daudé
2020-04-13 22:14   ` Alistair Francis
2020-04-12 22:36 ` [PATCH-for-5.1 v3 23/24] hw/riscv/sifive_u: Move some code from realize() to init() Philippe Mathieu-Daudé
2020-04-13 22:15   ` Alistair Francis
2020-04-12 22:36 ` [PATCH-for-5.1 v3 24/24] hw/riscv/sifive_u: Rename MachineClass::init() Philippe Mathieu-Daudé
2020-04-13 22:14   ` Alistair Francis
2020-04-13  0:39 ` [PATCH-for-5.1 v3 00/24] various: Fix error-propagation with Coccinelle scripts (part 1) no-reply

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).