Received: by 2002:a19:711a:0:0:0:0:0 with SMTP id m26csp5374633lfc; Mon, 8 Jun 2020 12:54:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPwipoJF0Js2Uga4TmpYZogvWMkC8gprz+mpEEY+IOtubGd7UOrY5AukwRBCduZB5oOSsp X-Received: by 2002:a25:df0b:: with SMTP id w11mr613978ybg.449.1591646082842; Mon, 08 Jun 2020 12:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591646082; cv=none; d=google.com; s=arc-20160816; b=Y3j3Ph8K/pVTLHpZYKQnBe4nusG2O5Xx90xQ1Ld47EHCKkzXRqtmw5cbP4Who0aN6Z vx7fepKRWvxVkHD473q+wAZYgsWTV3WK05t3l9ThG1v41N1JuPgmy33xx87W3m4joA0y KGuwjdhVWgMTTrPduqSifubN6UJnEitq/lxUG/uRbAca58dr/I8m84Wbc7EcJlRsRVd0 qoBfrSvsgPQ8l6jM0gwnOR6Fj9XRzZaPGA8ayBArTQpGkfBtkcBdfz00IBaAD/NVhWs2 9oBGpwORqTX1wWvQrREMY5JACBzr04rugQ5rdSGb6wPtwZV08xkxursF5np4FHUMfPfT S3lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:subject:to:from:date; bh=+sqv/n+dHdqVQBBv8HoeSPhIX6ntoKrWvEWJ5bo+JBY=; b=K35MtuoKisGZGUzGxoVOUSClqAvnzI0DE2juAEORbjf07UPzSNo+D3GWt3yNv/aJjz EX9NNZNhnik0kYz+btDjv9gxo9HFlXM88kuR/z4/0/eluOPv2q8Pc6Ot5EpH5cjvCljm DkPI0jjz/HxdRs3Y7z888PYszMcqJMs+dziHZd+4ho4p9e5MTKfkpQIQhgpbPoVqwXoe k1HjjE/9Hhl1ibY1MKPtKU4S0oab+FXK/+fdI1+iPYx4c5noNB2g5jjMOUnZBs38f3jt HLcuzdIqlHAoEXY33BHTD7kxj9tEtV7BsoQivnuM9SktN/GZq64sLi5goLPBtzX7got4 ukZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 124si479714ybe.206.2020.06.08.12.54.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Jun 2020 12:54:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org" Received: from localhost ([::1]:43566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiNr0-0004sX-7G for alex.bennee@linaro.org; Mon, 08 Jun 2020 15:54:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiNqs-0004rf-Bf; Mon, 08 Jun 2020 15:54:34 -0400 Received: from mail-ej1-f68.google.com ([209.85.218.68]:41694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiNqp-0005i0-N2; Mon, 08 Jun 2020 15:54:33 -0400 Received: by mail-ej1-f68.google.com with SMTP id x1so19694674ejd.8; Mon, 08 Jun 2020 12:54:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+sqv/n+dHdqVQBBv8HoeSPhIX6ntoKrWvEWJ5bo+JBY=; b=tz8z038QlT7UJZiRlc0I9j8QE6jwUc//9JdqZSsbdjqWUmz6DprZfOazcwBJp7Ftmc ATJ0G+AlBY7KHHoofkcrMYSFMhtHDrYG7xhC/0M7uEzmG6O6oBvThkZ5E1VuDl5mN51V 7BShXXr1bjoy/Jg/qI+DKBgmeeGDqSp/spQ87Tgq68EyHwDAbalyuJDhWCE/hevXIbW8 Iic49q6NdF6ZgoSFxb/lM6HBels41Pmq21WTbHHN0iFFD03DJ/6YsaRDZSY9WHZl4uZB 70cl/7/mWjaWK3XxrshDgItb+uZBPP0qxL5ITJnMKBS4UNeOyOyG6jIvAStx8/044xZ5 +vxA== X-Gm-Message-State: AOAM532zvVCYP5HyLYboJGmNu+4TC4zWHPJpKe8LYqIQPUy709Ij6Mxq 3Dcj908ZC0UlXLdhc4WAg9o= X-Received: by 2002:a17:906:d9dc:: with SMTP id qk28mr14717135ejb.6.1591646068901; Mon, 08 Jun 2020 12:54:28 -0700 (PDT) Received: from thl530.multi.box (p5791d09b.dip0.t-ipconnect.de. [87.145.208.155]) by smtp.gmail.com with ESMTPSA id bg21sm11672524ejb.90.2020.06.08.12.54.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 12:54:28 -0700 (PDT) Date: Mon, 8 Jun 2020 21:54:21 +0200 From: Thomas Huth To: Philippe =?UTF-8?B?TWF0aGlldS1EYXVkw6k=?= Subject: Re: [RFC PATCH 22/35] hw/m68k/mcf520x: Emit warning when old code is used Message-ID: <20200608215421.6322016c@thl530.multi.box> In-Reply-To: <20200608160044.15531-23-philmd@redhat.com> References: <20200608160044.15531-1-philmd@redhat.com> <20200608160044.15531-23-philmd@redhat.com> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=209.85.218.68; envelope-from=th.huth@gmail.com; helo=mail-ej1-f68.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/08 15:54:29 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Sagar Karandikar , "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-devel@nongnu.org, Max Filippov , Alistair Francis , Gerd Hoffmann , Stefano Stabellini , Paul Durrant , Magnus Damm , Markus Armbruster , Marcel Apfelbaum , Anthony Perard , =?UTF-8?B?TWFyYy1BbmRyw6k=?= Lureau , David Gibson , Andrzej Zaborowski , Eduardo Habkost , Alistair Francis , qemu-arm@nongnu.org, xen-devel@lists.xenproject.org, qemu-riscv@nongnu.org, Stafford Horne , Palmer Dabbelt , Richard Henderson , "Daniel P . Berrange" , Bastian Koppelmann , Michael Walle , qemu-ppc@nongnu.org, Paolo Bonzini , Aurelien Jarno Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: x50FgCnYLztp Am Mon, 8 Jun 2020 18:00:31 +0200 schrieb Philippe Mathieu-Daud=C3=A9 : > This code hasn't been QOM'ified yet. Warn the user. >=20 > Signed-off-by: Philippe Mathieu-Daud=C3=A9 > --- > hw/m68k/mcf5206.c | 5 +++++ > hw/m68k/mcf5208.c | 3 +++ > 2 files changed, 8 insertions(+) >=20 > 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" > =20 > /* General purpose timer module. */ > typedef struct { > @@ -144,6 +145,8 @@ static m5206_timer_state > *m5206_timer_init(qemu_irq irq) { > m5206_timer_state *s; > =20 > + qdev_warn_deprecated_function_used(); > + > s =3D g_new0(m5206_timer_state, 1); > s->timer =3D ptimer_init(m5206_timer_trigger, s, > PTIMER_POLICY_DEFAULT); s->irq =3D irq; > @@ -566,6 +569,8 @@ qemu_irq *mcf5206_init(MemoryRegion *sysmem, > uint32_t base, M68kCPU *cpu) m5206_mbar_state *s; > qemu_irq *pic; > =20 > + qdev_warn_deprecated_function_used(); > + > s =3D 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" > =20 > #define SYS_FREQ 166666666 > =20 > @@ -191,6 +192,8 @@ static void mcf5208_sys_init(MemoryRegion > *address_space, qemu_irq *pic) m5208_timer_state *s; > int i; > =20 > + 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