From: Thomas Huth <huth@tuxfamily.org>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
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>,
qemu-devel@nongnu.org, "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>,
"Bastian Koppelmann" <kbastian@mail.uni-paderborn.de>,
"Michael Walle" <michael@walle.cc>,
qemu-ppc@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [RFC PATCH 22/35] hw/m68k/mcf520x: Emit warning when old code is used
Date: Mon, 8 Jun 2020 21:54:21 +0200 [thread overview]
Message-ID: <20200608215421.6322016c@thl530.multi.box> (raw)
In-Reply-To: <20200608160044.15531-23-philmd@redhat.com>
Am Mon, 8 Jun 2020 18:00:31 +0200
schrieb Philippe Mathieu-Daudé <philmd@redhat.com>:
> This code hasn't been QOM'ified yet. Warn the user.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/m68k/mcf5206.c | 5 +++++
> hw/m68k/mcf5208.c | 3 +++
> 2 files changed, 8 insertions(+)
>
> diff --git a/hw/m68k/mcf5206.c b/hw/m68k/mcf5206.c
> index a2fef04f8e..ec0d176674 100644
> --- a/hw/m68k/mcf5206.c
> +++ b/hw/m68k/mcf5206.c
> @@ -16,6 +16,7 @@
> #include "qemu/timer.h"
> #include "hw/ptimer.h"
> #include "sysemu/sysemu.h"
> +#include "hw/qdev-deprecated.h"
>
> /* General purpose timer module. */
> typedef struct {
> @@ -144,6 +145,8 @@ static m5206_timer_state
> *m5206_timer_init(qemu_irq irq) {
> m5206_timer_state *s;
>
> + qdev_warn_deprecated_function_used();
> +
> s = g_new0(m5206_timer_state, 1);
> s->timer = ptimer_init(m5206_timer_trigger, s,
> PTIMER_POLICY_DEFAULT); s->irq = irq;
> @@ -566,6 +569,8 @@ qemu_irq *mcf5206_init(MemoryRegion *sysmem,
> uint32_t base, M68kCPU *cpu) m5206_mbar_state *s;
> qemu_irq *pic;
>
> + qdev_warn_deprecated_function_used();
> +
> s = g_new0(m5206_mbar_state, 1);
Ok, it's quite obvious what you refer to here...
> memory_region_init_io(&s->iomem, NULL, &m5206_mbar_ops, s,
> diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
> index 2ab9701ad6..72627f6833 100644
> --- a/hw/m68k/mcf5208.c
> +++ b/hw/m68k/mcf5208.c
> @@ -26,6 +26,7 @@
> #include "hw/sysbus.h"
> #include "elf.h"
> #include "exec/address-spaces.h"
> +#include "hw/qdev-deprecated.h"
>
> #define SYS_FREQ 166666666
>
> @@ -191,6 +192,8 @@ static void mcf5208_sys_init(MemoryRegion
> *address_space, qemu_irq *pic) m5208_timer_state *s;
> int i;
>
> + qdev_warn_deprecated_function_used();
> +
> /* SDRAMC. */
> memory_region_init_io(iomem, NULL, &m5208_sys_ops, NULL,
> "m5208-sys", 0x00004000); memory_region_add_subregion(address_space,
> 0xfc0a8000, iomem);
... but it is not so obvious what you refer to here. I think that new
function should maybe have a "char *what" parameter that contains the
name of the struct you refer to. Or at least add a comment in front of
the function with a short description?
Thomas
next prev parent reply other threads:[~2020-06-08 19:55 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 ` [RFC PATCH 03/35] hw/arm/omap: Emit warning when old code is used Philippe Mathieu-Daudé
2020-06-08 16:00 ` [RFC PATCH 04/35] hw/arm/pxa2xx: " 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 [this message]
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=20200608215421.6322016c@thl530.multi.box \
--to=huth@tuxfamily.org \
--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=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=philmd@redhat.com \
--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).