qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Sagar Karandikar" <sagark@eecs.berkeley.edu>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Alistair Francis" <Alistair.Francis@wdc.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Paul Durrant" <paul@xen.org>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	qemu-arm@nongnu.org, xen-devel@lists.xenproject.org,
	qemu-riscv@nongnu.org, "Stafford Horne" <shorne@gmail.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Richard Henderson" <rth@twiddle.net>,
	"Daniel P . Berrange" <berrange@redhat.com>,
	"Thomas Huth" <huth@tuxfamily.org>,
	"Bastian Koppelmann" <kbastian@mail.uni-paderborn.de>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Michael Walle" <michael@walle.cc>,
	qemu-ppc@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: [RFC PATCH 03/35] hw/arm/omap: Emit warning when old code is used
Date: Mon,  8 Jun 2020 18:00:12 +0200	[thread overview]
Message-ID: <20200608160044.15531-4-philmd@redhat.com> (raw)
In-Reply-To: <20200608160044.15531-1-philmd@redhat.com>

This code hasn't been QOM'ified yet. Warn the user.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/arm/omap1.c            | 6 ++++++
 hw/char/omap_uart.c       | 5 +++++
 hw/misc/omap_gpmc.c       | 3 +++
 hw/misc/omap_l4.c         | 3 +++
 hw/misc/omap_sdrc.c       | 3 +++
 hw/sd/omap_mmc.c          | 5 +++++
 hw/ssi/omap_spi.c         | 3 +++
 hw/timer/omap_synctimer.c | 4 ++++
 8 files changed, 32 insertions(+)

diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
index 761cc17ea9..d7d6253be0 100644
--- a/hw/arm/omap1.c
+++ b/hw/arm/omap1.c
@@ -40,6 +40,7 @@
 #include "hw/sysbus.h"
 #include "qemu/cutils.h"
 #include "qemu/bcd.h"
+#include "hw/qdev-deprecated.h"
 
 static inline void omap_log_badwidth(const char *funcname, hwaddr addr, int sz)
 {
@@ -1451,6 +1452,7 @@ static struct dpll_ctl_s  *omap_dpll_init(MemoryRegion *memory,
                            hwaddr base, omap_clk clk)
 {
     struct dpll_ctl_s *s = g_malloc0(sizeof(*s));
+    qdev_warn_deprecated_function_used();
     memory_region_init_io(&s->iomem, NULL, &omap_dpll_ops, s, "omap-dpll", 0x100);
 
     s->dpll = clk;
@@ -2427,6 +2429,8 @@ static struct omap_pwl_s *omap_pwl_init(MemoryRegion *system_memory,
 {
     struct omap_pwl_s *s = g_malloc0(sizeof(*s));
 
+    qdev_warn_deprecated_function_used();
+
     omap_pwl_reset(s);
 
     memory_region_init_io(&s->iomem, NULL, &omap_pwl_ops, s,
@@ -2534,6 +2538,8 @@ static struct omap_pwt_s *omap_pwt_init(MemoryRegion *system_memory,
                                         omap_clk clk)
 {
     struct omap_pwt_s *s = g_malloc0(sizeof(*s));
+
+    qdev_warn_deprecated_function_used();
     s->clk = clk;
     omap_pwt_reset(s);
 
diff --git a/hw/char/omap_uart.c b/hw/char/omap_uart.c
index e8da933378..7e106772ce 100644
--- a/hw/char/omap_uart.c
+++ b/hw/char/omap_uart.c
@@ -22,6 +22,7 @@
 #include "hw/arm/omap.h"
 #include "hw/char/serial.h"
 #include "exec/address-spaces.h"
+#include "hw/qdev-deprecated.h"
 
 /* UARTs */
 struct omap_uart_s {
@@ -57,6 +58,8 @@ struct omap_uart_s *omap_uart_init(hwaddr base,
 {
     struct omap_uart_s *s = g_new0(struct omap_uart_s, 1);
 
+    qdev_warn_deprecated_function_used();
+
     s->base = base;
     s->fclk = fclk;
     s->irq = irq;
@@ -168,6 +171,8 @@ struct omap_uart_s *omap2_uart_init(MemoryRegion *sysmem,
     struct omap_uart_s *s = omap_uart_init(base, irq,
                     fclk, iclk, txdma, rxdma, label, chr);
 
+    qdev_warn_deprecated_function_used();
+
     memory_region_init_io(&s->iomem, NULL, &omap_uart_ops, s, "omap.uart", 0x100);
 
     s->ta = ta;
diff --git a/hw/misc/omap_gpmc.c b/hw/misc/omap_gpmc.c
index 10de7a5523..9e29d7a8bd 100644
--- a/hw/misc/omap_gpmc.c
+++ b/hw/misc/omap_gpmc.c
@@ -25,6 +25,7 @@
 #include "hw/arm/omap.h"
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
+#include "hw/qdev-deprecated.h"
 
 /* General-Purpose Memory Controller */
 struct omap_gpmc_s {
@@ -830,6 +831,8 @@ struct omap_gpmc_s *omap_gpmc_init(struct omap_mpu_state_s *mpu,
     int cs;
     struct omap_gpmc_s *s = g_new0(struct omap_gpmc_s, 1);
 
+    qdev_warn_deprecated_function_used();
+
     memory_region_init_io(&s->iomem, NULL, &omap_gpmc_ops, s, "omap-gpmc", 0x1000);
     memory_region_add_subregion(get_system_memory(), base, &s->iomem);
 
diff --git a/hw/misc/omap_l4.c b/hw/misc/omap_l4.c
index 54aeaecd69..b412790c19 100644
--- a/hw/misc/omap_l4.c
+++ b/hw/misc/omap_l4.c
@@ -19,6 +19,7 @@
  */
 #include "qemu/osdep.h"
 #include "hw/arm/omap.h"
+#include "hw/qdev-deprecated.h"
 
 struct omap_l4_s {
     MemoryRegion *address_space;
@@ -33,6 +34,8 @@ struct omap_l4_s *omap_l4_init(MemoryRegion *address_space,
     struct omap_l4_s *bus = g_malloc0(
                     sizeof(*bus) + ta_num * sizeof(*bus->ta));
 
+    qdev_warn_deprecated_function_used();
+
     bus->address_space = address_space;
     bus->ta_num = ta_num;
     bus->base = base;
diff --git a/hw/misc/omap_sdrc.c b/hw/misc/omap_sdrc.c
index f2f72f6810..4f8440ea56 100644
--- a/hw/misc/omap_sdrc.c
+++ b/hw/misc/omap_sdrc.c
@@ -19,6 +19,7 @@
  */
 #include "qemu/osdep.h"
 #include "hw/arm/omap.h"
+#include "hw/qdev-deprecated.h"
 
 /* SDRAM Controller Subsystem */
 struct omap_sdrc_s {
@@ -159,6 +160,8 @@ struct omap_sdrc_s *omap_sdrc_init(MemoryRegion *sysmem,
 {
     struct omap_sdrc_s *s = g_new0(struct omap_sdrc_s, 1);
 
+    qdev_warn_deprecated_function_used();
+
     omap_sdrc_reset(s);
 
     memory_region_init_io(&s->iomem, NULL, &omap_sdrc_ops, s, "omap.sdrc", 0x1000);
diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c
index 4088a8a80b..88fd20e17a 100644
--- a/hw/sd/omap_mmc.c
+++ b/hw/sd/omap_mmc.c
@@ -24,6 +24,7 @@
 #include "hw/irq.h"
 #include "hw/arm/omap.h"
 #include "hw/sd/sd.h"
+#include "hw/qdev-deprecated.h"
 
 struct omap_mmc_s {
     qemu_irq irq;
@@ -599,6 +600,8 @@ struct omap_mmc_s *omap_mmc_init(hwaddr base,
 {
     struct omap_mmc_s *s = g_new0(struct omap_mmc_s, 1);
 
+    qdev_warn_deprecated_function_used();
+
     s->irq = irq;
     s->dma = dma;
     s->clk = clk;
@@ -625,6 +628,8 @@ struct omap_mmc_s *omap2_mmc_init(struct omap_target_agent_s *ta,
 {
     struct omap_mmc_s *s = g_new0(struct omap_mmc_s, 1);
 
+    qdev_warn_deprecated_function_used();
+
     s->irq = irq;
     s->dma = dma;
     s->clk = fclk;
diff --git a/hw/ssi/omap_spi.c b/hw/ssi/omap_spi.c
index 7c7e689707..276f963ae2 100644
--- a/hw/ssi/omap_spi.c
+++ b/hw/ssi/omap_spi.c
@@ -25,6 +25,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/arm/omap.h"
+#include "hw/qdev-deprecated.h"
 
 /* Multichannel SPI */
 struct omap_mcspi_s {
@@ -353,6 +354,8 @@ struct omap_mcspi_s *omap_mcspi_init(struct omap_target_agent_s *ta, int chnum,
     struct omap_mcspi_s *s = g_new0(struct omap_mcspi_s, 1);
     struct omap_mcspi_ch_s *ch = s->ch;
 
+    qdev_warn_deprecated_function_used();
+
     s->irq = irq;
     s->chnum = chnum;
     while (chnum --) {
diff --git a/hw/timer/omap_synctimer.c b/hw/timer/omap_synctimer.c
index 72b997939b..4be24e970e 100644
--- a/hw/timer/omap_synctimer.c
+++ b/hw/timer/omap_synctimer.c
@@ -20,6 +20,8 @@
 #include "qemu/osdep.h"
 #include "qemu/timer.h"
 #include "hw/arm/omap.h"
+#include "hw/qdev-deprecated.h"
+
 struct omap_synctimer_s {
     MemoryRegion iomem;
     uint32_t val;
@@ -101,6 +103,8 @@ struct omap_synctimer_s *omap_synctimer_init(struct omap_target_agent_s *ta,
 {
     struct omap_synctimer_s *s = g_malloc0(sizeof(*s));
 
+    qdev_warn_deprecated_function_used();
+
     omap_synctimer_reset(s);
     memory_region_init_io(&s->iomem, NULL, &omap_synctimer_ops, s, "omap.synctimer",
                           omap_l4_region_size(ta, 0));
-- 
2.21.3



  parent reply	other threads:[~2020-06-08 16:10 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08 16:00 [RFC PATCH 00/35] hw/qdev: Warn when using pre-qdev/QOM devices Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 01/35] qom/object: Update documentation Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 02/35] hw/core/qdev: Add qdev_warn_deprecated_function_used() helper Philippe Mathieu-Daudé
2020-06-08 16:00 ` Philippe Mathieu-Daudé [this message]
2020-06-08 16:00 ` [RFC PATCH 04/35] hw/arm/pxa2xx: Emit warning when old code is used Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 05/35] hw/arm/nseries: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 06/35] hw/timer/arm_timer: " Philippe Mathieu-Daudé
2020-06-09 11:10   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 07/35] hw/char/parallel: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 08/35] hw/display/blizzard: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 09/35] hw/display/ramfb: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 10/35] hw/display/tc6393xb: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 11/35] hw/display/vga-isa-mm: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 12/35] hw/dma/etraxfs_dma: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 13/35] hw/dma/soc_dma: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 14/35] hw/i386/pc: " Philippe Mathieu-Daudé
2020-06-09 11:08   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 15/35] hw/i386/xen/xen-hvm: " Philippe Mathieu-Daudé
2020-06-08 16:54   ` Paul Durrant
2020-06-08 17:37     ` Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 16/35] hw/input/lasips2: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 17/35] hw/input/pckbd: " Philippe Mathieu-Daudé
2020-06-09 11:07   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 18/35] hw/input/ps2: " Philippe Mathieu-Daudé
2020-06-09 11:06   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 19/35] hw/input/tsc2005: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 20/35] hw/intc/i8259: " Philippe Mathieu-Daudé
2020-06-09 11:10   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 21/35] hw/lm32/lm32_hwsetup: " Philippe Mathieu-Daudé
2020-06-09 11:11   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 22/35] hw/m68k/mcf520x: " Philippe Mathieu-Daudé
2020-06-08 19:54   ` Thomas Huth
2020-06-08 16:00 ` [RFC PATCH 23/35] hw/misc/applesmc: " Philippe Mathieu-Daudé
2020-06-09 11:05   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 24/35] hw/misc/cbus: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 25/35] hw/nvram/eeprom93xx: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 26/35] hw/openrisc/cputimer: " Philippe Mathieu-Daudé
2020-06-09 11:13   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 27/35] hw/ppc/ppc: " Philippe Mathieu-Daudé
2020-06-09 11:12   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 28/35] hw/ppc/ppc4xx: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 29/35] hw/ppc/ppc_booke: " Philippe Mathieu-Daudé
2020-06-09 11:12   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 30/35] hw/ppc/virtex_ml507: " Philippe Mathieu-Daudé
2020-06-09 11:12   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 31/35] hw/sh4: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 32/35] hw/riscv: " Philippe Mathieu-Daudé
2020-06-09 11:04   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 33/35] hw/timer/slavio_timer: " Philippe Mathieu-Daudé
2020-06-09 11:03   ` Paolo Bonzini
2020-06-08 16:00 ` [RFC PATCH 34/35] hw/usb/hcd-musb: " Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 35/35] hw/xtensa/xtfpga: " Philippe Mathieu-Daudé
2020-06-08 16:14 ` [RFC PATCH 00/35] hw/qdev: Warn when using pre-qdev/QOM devices Peter Maydell
2020-06-08 16:17   ` Philippe Mathieu-Daudé
2020-06-09 11:14     ` Paolo Bonzini

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=20200608160044.15531-4-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=Alistair.Francis@wdc.com \
    --cc=alistair@alistair23.me \
    --cc=anthony.perard@citrix.com \
    --cc=armbru@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=berrange@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=edgar.iglesias@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=huth@tuxfamily.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=kraxel@redhat.com \
    --cc=magnus.damm@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=michael@walle.cc \
    --cc=mst@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@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=shorne@gmail.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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).