From patchwork Sat Jul 4 15:38:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 278586 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E716C433E0 for ; Sat, 4 Jul 2020 15:41:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D787C208D5 for ; Sat, 4 Jul 2020 15:41:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OZ7x3F0K" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D787C208D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrkI5-00036f-1H for qemu-devel@archiver.kernel.org; Sat, 04 Jul 2020 11:41:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrkGA-0000fB-GC for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:39:22 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:47545 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jrkG8-0007So-UG for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:39:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593877160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4VxXE4SCiQENXjR0p5gMwHzmkYsDqhVYN6kqXLwme2s=; b=OZ7x3F0KfnBBeJLBGBYSuRS4OwXUIkoslH2dy+3a4HMwnQ77x9699ExR1sJz6nY59V/Ot2 dpArIDx9FLxEgFQq/C5ES7oKzfBaEC94rZ4sRkJTmmv9oR8MUiuEG1FpZjazzoaSy1SEz5 GmWjp07TcZKqcnxNGwsjtUKMtbGmaW8= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-308-gubUxzL4Pa6OyAD0pp2lAA-1; Sat, 04 Jul 2020 11:39:18 -0400 X-MC-Unique: gubUxzL4Pa6OyAD0pp2lAA-1 Received: by mail-wr1-f69.google.com with SMTP id g14so35924862wrp.8 for ; Sat, 04 Jul 2020 08:39:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4VxXE4SCiQENXjR0p5gMwHzmkYsDqhVYN6kqXLwme2s=; b=s/K2CZEwcQrCOrd5UXOhQyEpX3akg7DckT9AFWWVUjC8C46RMudjeyagowC6yVhJXI fco6ncdgbO8Cq8dVcJiC+/Ef7sa6dmdVNGTnRCLBYZXjRQ+0QAKsIYszcPVlRet2rroP VUctE/eh/RsdjOb9aqdITqBmJsYt2uptHlcdraMZmNbS7IHNF09jiwykyPD9GYeVruB6 wtHGZFs0e+L7H9I2jagjwP3iaukX9XSkzn/d/kJEaB0fh3GRuO0hC+tgSd6u6hDdh/Bm fMSqa7CLoVkrZ36UIhj6lPic9QuYYzcjEFzxKM6abFCbUCMhlTGkgyBHgYHjb+Q0ccOY NStg== X-Gm-Message-State: AOAM532NR3+q7S5NO+x8rFx3r7bIkSsnRK9vLBo1JLyc+N+13IkN2SuN MMlBTeSPKGEeGwIDEaZ2cY3GwpSsnInfGAX4coXBXzluaoChJmuN7+nqdVN1YTG+nldrDSogNMH 9bCv9HDzTcPDOjc4= X-Received: by 2002:a7b:cf10:: with SMTP id l16mr41861939wmg.93.1593877157274; Sat, 04 Jul 2020 08:39:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBJo4FUom82vRU8/5mP45VfvlfhObz1DhaGdrkvZdmWsyz2BGimXVJAaF2JPT0rdOWUhT2Jg== X-Received: by 2002:a7b:cf10:: with SMTP id l16mr41861890wmg.93.1593877156946; Sat, 04 Jul 2020 08:39:16 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id m10sm17446986wru.4.2020.07.04.08.39.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 08:39:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 01/23] qom/object: Update documentation Date: Sat, 4 Jul 2020 17:38:46 +0200 Message-Id: <20200704153908.12118-2-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704153908.12118-1-philmd@redhat.com> References: <20200704153908.12118-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 11:39:15 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@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" , Max Filippov , Alistair Francis , Gerd Hoffmann , "Edgar E. Iglesias" , Yoshinori Sato , Magnus Damm , Palmer Dabbelt , Eduardo Habkost , Alistair Francis , qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Stafford Horne , David Gibson , qemu-riscv@nongnu.org, Thomas Huth , Bastian Koppelmann , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The documentation was introduced in 2f28d2ff9dc, then 0d09e41a51 and a27bd6c77 moved the headers around. Update the comment. Signed-off-by: Philippe Mathieu-Daudé --- include/qom/object.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index 94a61ccc3f..03dcd3623e 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -43,7 +43,7 @@ typedef struct InterfaceInfo InterfaceInfo; * * Creating a minimal type * - * #include "qdev.h" + * #include "hw/qdev-core.h" * * #define TYPE_MY_DEVICE "my-device" * @@ -144,7 +144,7 @@ typedef struct InterfaceInfo InterfaceInfo; * * Overriding a virtual function * - * #include "qdev.h" + * #include "hw/qdev-core.h" * * void my_device_class_init(ObjectClass *klass, void *class_data) * { @@ -168,7 +168,7 @@ typedef struct InterfaceInfo InterfaceInfo; * * Defining an abstract class * - * #include "qdev.h" + * #include "hw/qdev-core.h" * * typedef struct MyDeviceClass * { From patchwork Sat Jul 4 15:38:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 278585 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DFF6C433DF for ; Sat, 4 Jul 2020 15:41:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EF017208D5 for ; Sat, 4 Jul 2020 15:41:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gQAD4Su3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF017208D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrkIC-0003O3-6u for qemu-devel@archiver.kernel.org; Sat, 04 Jul 2020 11:41:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrkGK-0000zk-6Z for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:39:32 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:40291 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jrkGI-0007U9-3M for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:39:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593877169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GuGL8s6Y6URpcSNtr04xteyMjyUSDj0tV/o+btZV9Wk=; b=gQAD4Su3QAYn/HnnmdZ8m7L6td6RXinkyj1+nF0OYI3npbKV8UWa1oWl59MnwnP8/CbImi QRbtO52bkQPkihDpgi9tVxu+49bCD0t49d7G0jCdZy7szWr5/X19bIu8nTZxcUzrQi8hP6 2N/Vf76ILNW070PCa9VPy4vdg8SPXSo= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-182-S2J_Yr8UMUugQz6J38B_-g-1; Sat, 04 Jul 2020 11:39:24 -0400 X-MC-Unique: S2J_Yr8UMUugQz6J38B_-g-1 Received: by mail-wm1-f70.google.com with SMTP id g6so33903116wmk.4 for ; Sat, 04 Jul 2020 08:39:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GuGL8s6Y6URpcSNtr04xteyMjyUSDj0tV/o+btZV9Wk=; b=Zp65qnrBgqREqyyH19E/fG0bqS6bxLZ4bOJ6mPDA+KIetZ53VZv3L0UEhZIF+xWFoM 6QmMWuPrPbDqX+g45FycdjpU5ZXCePkneWEo8jCctI+gf1/QAj/hf6xB26zJ4XehLDg7 rT/mcbXbdjEo64dgnwP5HDecK8UnZZczPl/l7j6EvIMzUECy7u1z8BfGOqM5lFG7gRsT Cba7olwY2kMfcugl7YPM2Cc3Wg6ygx44wlhRmmaJaukiX7HygZ4t4/rjP0wAEb2FbBVA 111IV6KSmBopVfQNmQayiY9QgnoCcN+Gc2KiOvEDQpFcuU0eje8IFVii83XCmAV/wOAG 9m/Q== X-Gm-Message-State: AOAM532fFt6lUDcZyoti3dxwTwitrV7afBG648ljLRgsnqrwHf3ujEGa FNbiuqMJO449E6AJmBnLTWYXhoDOrpzaC+QGkOPUFjqKNnSHmJ8T9+WpREIaW626oyOOxlawB7s G8V5OJQqQxc8Gnmc= X-Received: by 2002:adf:fac8:: with SMTP id a8mr12152865wrs.368.1593877162695; Sat, 04 Jul 2020 08:39:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZRv9/lwGDgzqtfWRi8evJQZCpRLoZKGzZD2as3kqahxAbsMaLzXOum5g8F2YJmelnvLmX8Q== X-Received: by 2002:adf:fac8:: with SMTP id a8mr12152843wrs.368.1593877162442; Sat, 04 Jul 2020 08:39:22 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id f16sm16564180wmh.27.2020.07.04.08.39.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 08:39:21 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 02/23] hw/core/qdev: Add qdev_warn_deprecated_function_used() helper Date: Sat, 4 Jul 2020 17:38:47 +0200 Message-Id: <20200704153908.12118-3-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704153908.12118-1-philmd@redhat.com> References: <20200704153908.12118-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 11:39:15 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@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" , Max Filippov , Alistair Francis , Gerd Hoffmann , "Edgar E. Iglesias" , Yoshinori Sato , Magnus Damm , Palmer Dabbelt , Eduardo Habkost , Alistair Francis , qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Stafford Horne , David Gibson , qemu-riscv@nongnu.org, Thomas Huth , Bastian Koppelmann , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" When built with --enable-qdev-deprecation-warning, calling qdev_warn_deprecated_function_used() will emit a warning such: $ qemu-system-arm -M verdex ... qemu-system-arm: warning: use of deprecated non-qdev/non-qom code in pxa2xx_lcdc_init() qemu-system-arm: warning: use of deprecated non-qdev/non-qom code in pxa2xx_i2s_init() qemu-system-arm: warning: use of deprecated non-qdev/non-qom code in pxa27x_keypad_init() Signed-off-by: Philippe Mathieu-Daudé --- I'd rather use --enable-qdev-debug suggested here: https://www.mail-archive.com/qemu-devel@nongnu.org/msg719802.html --- configure | 8 ++++++++ include/hw/qdev-deprecated.h | 26 ++++++++++++++++++++++++++ hw/core/qdev.c | 8 ++++++++ 3 files changed, 42 insertions(+) create mode 100644 include/hw/qdev-deprecated.h diff --git a/configure b/configure index 8a65240d4a..aac3dc0767 100755 --- a/configure +++ b/configure @@ -441,6 +441,7 @@ edk2_blobs="no" pkgversion="" pie="" qom_cast_debug="yes" +qdev_deprecation_warning="no" trace_backends="log" trace_file="trace" spice="" @@ -1124,6 +1125,8 @@ for opt do ;; --enable-qom-cast-debug) qom_cast_debug="yes" ;; + --enable-qdev-deprecation-warning) qdev_deprecation_warning="yes" + ;; --disable-virtfs) virtfs="no" ;; --enable-virtfs) virtfs="yes" @@ -1915,6 +1918,7 @@ disabled with --disable-FEATURE, default is enabled if available: virglrenderer virgl rendering support xfsctl xfsctl support qom-cast-debug cast debugging support + qdev-deprecation-warning display qdev deprecation warnings tools build qemu-io, qemu-nbd and qemu-img tools vxhs Veritas HyperScale vDisk backend support bochs bochs image format support @@ -6966,6 +6970,7 @@ echo "gcov enabled $gcov" echo "TPM support $tpm" echo "libssh support $libssh" echo "QOM debugging $qom_cast_debug" +echo "QDEV deprecation warnings $qdev_deprecation_warning" echo "Live block migration $live_block_migration" echo "lzo support $lzo" echo "snappy support $snappy" @@ -7594,6 +7599,9 @@ fi if test "$qom_cast_debug" = "yes" ; then echo "CONFIG_QOM_CAST_DEBUG=y" >> $config_host_mak fi +if test "$qdev_deprecation_warning" = "yes" ; then + echo "CONFIG_QDEV_DEPRECATION_WARNING=y" >> $config_host_mak +fi if test "$rbd" = "yes" ; then echo "CONFIG_RBD=m" >> $config_host_mak echo "RBD_CFLAGS=$rbd_cflags" >> $config_host_mak diff --git a/include/hw/qdev-deprecated.h b/include/hw/qdev-deprecated.h new file mode 100644 index 0000000000..b815f62dae --- /dev/null +++ b/include/hw/qdev-deprecated.h @@ -0,0 +1,26 @@ +/* + * QEMU QOM qdev deprecation helpers + * + * Copyright (c) 2020 Red Hat, Inc. + * + * Author: + * Philippe Mathieu-Daudé + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ +#ifndef HW_QDEV_DEPRECATED_H +#define HW_QDEV_DEPRECATED_H + +/** + * qdev_warn_deprecated_function_used: + * + * Display a warning that deprecated code is used. + */ +#define qdev_warn_deprecated_function_used() \ + qdev_warn_deprecated_function(__func__) +void qdev_warn_deprecated_function(const char *function); + +#endif diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 2131c7f951..1134f46631 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -35,6 +35,7 @@ #include "hw/hotplug.h" #include "hw/irq.h" #include "hw/qdev-properties.h" +#include "hw/qdev-deprecated.h" #include "hw/boards.h" #include "hw/sysbus.h" #include "hw/qdev-clock.h" @@ -838,6 +839,13 @@ void qdev_alias_all_properties(DeviceState *target, Object *source) } while (class != object_class_by_name(TYPE_DEVICE)); } +void qdev_warn_deprecated_function(const char *function) +{ +#ifdef CONFIG_QDEV_DEPRECATION_WARNING + warn_report("use of deprecated non-qdev/non-qom code in %s()", function); +#endif +} + static bool device_get_realized(Object *obj, Error **errp) { DeviceState *dev = DEVICE(obj); From patchwork Sat Jul 4 15:38:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 278584 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E07CC433E0 for ; Sat, 4 Jul 2020 15:43:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 57959208D5 for ; Sat, 4 Jul 2020 15:43:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AMZJx4Fw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 57959208D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrkKM-0007Hh-JM for qemu-devel@archiver.kernel.org; Sat, 04 Jul 2020 11:43:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrkGL-00012j-NO for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:39:33 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:43326) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jrkGJ-0007UQ-L1 for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:39:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593877171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZSSg9nfJ42WhMhBqmBHSws/rdrCKvh4AMKvzensIz1k=; b=AMZJx4Fw6ewal2qxw2dXp1lnqAObgZt8fmLsl68cTMBtsIIXK/SoZR2V0vOSS2nyCXt3VV vmP84XZ9nZ3yXywAvE/7JhI6CQD5dcAToF0KbNEwTh8rk4qERJBdfDfCt5K2+HpoOtYvDI Jyld0QTIRhU63VrONNGdVfZymbei+Nw= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-18--MAcd7w5PyqgmV7JcZVkYw-1; Sat, 04 Jul 2020 11:39:29 -0400 X-MC-Unique: -MAcd7w5PyqgmV7JcZVkYw-1 Received: by mail-wr1-f69.google.com with SMTP id v3so6245619wrq.10 for ; Sat, 04 Jul 2020 08:39:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZSSg9nfJ42WhMhBqmBHSws/rdrCKvh4AMKvzensIz1k=; b=a05VHZ1O1UqLqs1stOiTONhun5bPzqDpk91vaWrmuJ0Tc55foaws31ReFkRGzIln6x CtcgH7UqzTW4JL60i3pjC4h+j7m4ELEBwHpLCTRbz0xbAgoRMnTCcm1ZScnsFAJpRP38 xhsQw8J/7zH+7sfWV8ajfG8X/p68EJMbXQzc1vwQ7ZJ0e2IjNIyIrKPQsRjLpKlAwB5X he8uRaY7eye0rnVY7eUWK50O+PBX0QFQG62JFMDiOYcv/6kdeg0kF1Gp+nNV6cbTDP2u 6FgkwdhmVlV7qhEcpvUFwTSLZtMElceWnxdk+UmTzlV8pP9E5nWp/uQFHKOkwSFXdgS8 dSfg== X-Gm-Message-State: AOAM533hAY7UDpcJBS1CLRtIBDrjQJxWrZLLEiFbqNqRipERJcCAJ9A9 SuTuSU7EPkqxLGxjX2Am/dgQxjMm/HJJzvABFX+ZU14bacfTKu3lXJthl+L3JA3uOfuPGp8vQYI XwsM0BwVJdB++xg8= X-Received: by 2002:adf:e6c8:: with SMTP id y8mr43870356wrm.40.1593877168058; Sat, 04 Jul 2020 08:39:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx83m2/1x22hMaJ0Whe7Lmaiks6pmpO/OOc377SxlVOT6hqyjC195vNbSLUWPE/Ac89IqVLug== X-Received: by 2002:adf:e6c8:: with SMTP id y8mr43870340wrm.40.1593877167780; Sat, 04 Jul 2020 08:39:27 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id 33sm18326425wri.16.2020.07.04.08.39.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 08:39:27 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 03/23] hw/arm/omap: Emit warning when old code is used Date: Sat, 4 Jul 2020 17:38:48 +0200 Message-Id: <20200704153908.12118-4-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704153908.12118-1-philmd@redhat.com> References: <20200704153908.12118-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 11:39:20 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@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" , Max Filippov , Alistair Francis , Gerd Hoffmann , "Edgar E. Iglesias" , Yoshinori Sato , Magnus Damm , Palmer Dabbelt , Eduardo Habkost , Alistair Francis , qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Stafford Horne , David Gibson , qemu-riscv@nongnu.org, Thomas Huth , Bastian Koppelmann , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- 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 6ba0df6b6d..db4f2ee304 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)); From patchwork Sat Jul 4 15:38:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 278582 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7722C433DF for ; Sat, 4 Jul 2020 15:45:53 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91FE7207D4 for ; Sat, 4 Jul 2020 15:45:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="h7KWcpfm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91FE7207D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrkMS-0002bl-QN for qemu-devel@archiver.kernel.org; Sat, 04 Jul 2020 11:45:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrkGU-0001Fa-Qc for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:39:42 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:60238 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jrkGQ-0007Vs-WA for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:39:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593877178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wUMsI8pPCoJLWJQxhYCjSGYgbzwxCwXM4hINsxgIP8Y=; b=h7KWcpfm9KduiEDZxR5gYa6nx79ZGGIqdfCoa13ugWsdMpkjWs2R27EESXegfbvsxBTR+j WTw0ki31XCNKiFr8EF115b52ZVh4oq3QtyF6UN9Bk0zCHAhZ/zJJJmP0rYrP9wIvgLOGLL NsrqxjPVCEqp7xGgY64EQrBXHzQ2yVo= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-460-VAB2_2eYMIGT9-fGAUjYkQ-1; Sat, 04 Jul 2020 11:39:34 -0400 X-MC-Unique: VAB2_2eYMIGT9-fGAUjYkQ-1 Received: by mail-wr1-f69.google.com with SMTP id y13so35955446wrp.13 for ; Sat, 04 Jul 2020 08:39:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wUMsI8pPCoJLWJQxhYCjSGYgbzwxCwXM4hINsxgIP8Y=; b=OuVZUYzAIpV9y4hfqTPrESBw0+ocvBmQs/jEN+wsUhROlghrnEW6azb8ChqYwbb1c2 /OLOGdnG9rsKTCP5BalHrwafXGEQsAmh+Go04NCtnHGl63tpSDVywZcIYERMfq3UKAii wNxKVC5OzgFPpmEK0Phg8cjdECAjyrjtUineL6ULaz2/DnD2sG6HGe4qhnRtL0apEp5+ n071KrMU9uFMld7u6/InJv3uubLZKh795X8vJ90m16OvlI/NGzKIYqrvJrLvwyW0lZyz /3cNcs9zsQy0Wc65YZ12hv/nzGU2avyWFbNqmWrSvXYXzdHWrr/ER8Pd5hSkAIQ438Yq uiMw== X-Gm-Message-State: AOAM531OX+u7Thw/EcESCLm2kwOkbjFtapD1HvdQiOTmaHARqwa0cNWY ETpqF8sDwKZDGEqBRbKxOqpruVMMQ0DHEDnHCUZ9cOTwpH4zIgDNTfgiHJYmfc/zP+R5R49rLti kURisU1JYCinW0bg= X-Received: by 2002:a05:6000:111:: with SMTP id o17mr43727444wrx.178.1593877173364; Sat, 04 Jul 2020 08:39:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhZpaC4/kffjhUCkKRReiugjCiLRymQ9MrOurXjYEblSE5KLvKS6tusliBNPYaGxM9snMfzQ== X-Received: by 2002:a05:6000:111:: with SMTP id o17mr43727419wrx.178.1593877173151; Sat, 04 Jul 2020 08:39:33 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id e5sm17685316wrs.33.2020.07.04.08.39.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 08:39:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 04/23] hw/arm/pxa2xx: Emit warning when old code is used Date: Sat, 4 Jul 2020 17:38:49 +0200 Message-Id: <20200704153908.12118-5-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704153908.12118-1-philmd@redhat.com> References: <20200704153908.12118-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 11:39:20 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@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" , Max Filippov , Alistair Francis , Gerd Hoffmann , "Edgar E. Iglesias" , Yoshinori Sato , Magnus Damm , Palmer Dabbelt , Eduardo Habkost , Alistair Francis , qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Stafford Horne , David Gibson , qemu-riscv@nongnu.org, Thomas Huth , Bastian Koppelmann , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/pxa2xx.c | 3 +++ hw/display/pxa2xx_lcd.c | 3 +++ hw/input/pxa2xx_keypad.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index f104a33463..adc7263e59 100644 --- a/hw/arm/pxa2xx.c +++ b/hw/arm/pxa2xx.c @@ -27,6 +27,7 @@ #include "sysemu/qtest.h" #include "qemu/cutils.h" #include "qemu/log.h" +#include "hw/qdev-deprecated.h" static struct { hwaddr io_base; @@ -1768,6 +1769,8 @@ static PXA2xxI2SState *pxa2xx_i2s_init(MemoryRegion *sysmem, { PXA2xxI2SState *s = g_new0(PXA2xxI2SState, 1); + qdev_warn_deprecated_function_used(); + s->irq = irq; s->rx_dma = rx_dma; s->tx_dma = tx_dma; diff --git a/hw/display/pxa2xx_lcd.c b/hw/display/pxa2xx_lcd.c index ff90104b80..cf6241ff21 100644 --- a/hw/display/pxa2xx_lcd.c +++ b/hw/display/pxa2xx_lcd.c @@ -20,6 +20,7 @@ /* FIXME: For graphic_rotate. Should probably be done in common code. */ #include "sysemu/sysemu.h" #include "framebuffer.h" +#include "hw/qdev-deprecated.h" struct DMAChannel { uint32_t branch; @@ -1011,6 +1012,8 @@ PXA2xxLCDState *pxa2xx_lcdc_init(MemoryRegion *sysmem, PXA2xxLCDState *s; DisplaySurface *surface; + qdev_warn_deprecated_function_used(); + s = (PXA2xxLCDState *) g_malloc0(sizeof(PXA2xxLCDState)); s->invalidated = 1; s->irq = irq; diff --git a/hw/input/pxa2xx_keypad.c b/hw/input/pxa2xx_keypad.c index 62aa6f6b15..6de1e9e4bb 100644 --- a/hw/input/pxa2xx_keypad.c +++ b/hw/input/pxa2xx_keypad.c @@ -17,6 +17,7 @@ #include "migration/vmstate.h" #include "hw/arm/pxa.h" #include "ui/console.h" +#include "hw/qdev-deprecated.h" /* * Keypad @@ -316,6 +317,8 @@ PXA2xxKeyPadState *pxa27x_keypad_init(MemoryRegion *sysmem, { PXA2xxKeyPadState *s; + qdev_warn_deprecated_function_used(); + s = (PXA2xxKeyPadState *) g_malloc0(sizeof(PXA2xxKeyPadState)); s->irq = irq; From patchwork Sat Jul 4 15:38:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 278583 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADA0DC433E0 for ; Sat, 4 Jul 2020 15:44:19 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7784A208D5 for ; Sat, 4 Jul 2020 15:44:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PdxxxNSj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7784A208D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrkKw-0008IC-Ks for qemu-devel@archiver.kernel.org; Sat, 04 Jul 2020 11:44:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrkGi-0001UD-Sx for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:39:56 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:37616 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jrkGg-0007Z0-VG for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:39:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593877193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2ORhV1sd4nU6DWHF34s88hmmcxuNYxVDeCG6mbf27fE=; b=PdxxxNSjW+X5GSf+ZRYLkeBTC+K3lufMSY7VUcnM3NA/4o65E1ESbePtGGQFeHZKgYe22A 4WUNB/sdTbzJyR/5ceQzl+gQkBuKLpO4XUFowAzbAiybUYPvXlV4EspgrVRf2uQDj44MJu LP+B8STb+qqqmq0pzwHWciJlbrptI94= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-212-Bsp1_4KzN02dOZ1cQ70xGA-1; Sat, 04 Jul 2020 11:39:51 -0400 X-MC-Unique: Bsp1_4KzN02dOZ1cQ70xGA-1 Received: by mail-wm1-f72.google.com with SMTP id t18so39726021wmj.5 for ; Sat, 04 Jul 2020 08:39:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2ORhV1sd4nU6DWHF34s88hmmcxuNYxVDeCG6mbf27fE=; b=nVFbYRw6KrpUpUGNpX2dsWqqNWBj1npBcqnSrp4l+WYHXGTvjzx1Ct3aE64LahMgRb JJ8NXWVrUi7UqkxU7wBjNTMgMPG0brGMJYbMPcKTcffiRibTDumfFhp6eOAECuhJHSYe MQaW4UU3Xw52nPq2sTtjVX2xxPAuJSOGRL/a5mmfwSmVjeWxvem7cv38qUXqkg0tQ9K+ 8f1e++pGnrJZq9MRKfPI875WumRjSEpOkZgVZ3BlxKJzFSKhgf1/gt3/578Bh7ZCHSqY 5OEOnqT+rErB2c16Vaqlm/5ZAbEL9TAVxpuW6TDtTTPn8EVd/ZWW7GXBuG964KiOlBdV dK3Q== X-Gm-Message-State: AOAM532KKMya/ezcj2oNS5rKfXDk71xx3rbncLw2oustVVC04cTSWSwA k+t9XsNRfnrFCe/cGxDXtNEWn/m/GGRjscBjd6FfUfCgqioj6LUBQqm391tWEkPmEKspR7Ieqg8 chCxxHp/E/UZu8VY= X-Received: by 2002:adf:e74e:: with SMTP id c14mr43648131wrn.143.1593877190109; Sat, 04 Jul 2020 08:39:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjnfcSH3EG5UKTwABJ/4LKUdBUBcDeNizmIjl25mkK7GKnfOC2qP/XZGKJMftsfGb2dy4yLA== X-Received: by 2002:adf:e74e:: with SMTP id c14mr43648104wrn.143.1593877189914; Sat, 04 Jul 2020 08:39:49 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id f16sm16575426wmf.17.2020.07.04.08.39.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 08:39:49 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 07/23] hw/display/blizzard: Emit warning when old code is used Date: Sat, 4 Jul 2020 17:38:52 +0200 Message-Id: <20200704153908.12118-8-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704153908.12118-1-philmd@redhat.com> References: <20200704153908.12118-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 11:39:15 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@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" , Max Filippov , Alistair Francis , Gerd Hoffmann , "Edgar E. Iglesias" , Yoshinori Sato , Magnus Damm , Palmer Dabbelt , Eduardo Habkost , Alistair Francis , qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Stafford Horne , David Gibson , qemu-riscv@nongnu.org, Thomas Huth , Bastian Koppelmann , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/blizzard.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/display/blizzard.c b/hw/display/blizzard.c index 105241577d..74557b152b 100644 --- a/hw/display/blizzard.c +++ b/hw/display/blizzard.c @@ -23,6 +23,7 @@ #include "ui/console.h" #include "hw/display/blizzard.h" #include "ui/pixel_ops.h" +#include "hw/qdev-deprecated.h" typedef void (*blizzard_fn_t)(uint8_t *, const uint8_t *, unsigned int); @@ -1010,6 +1011,8 @@ void *s1d13745_init(qemu_irq gpio_int) BlizzardState *s = (BlizzardState *) g_malloc0(sizeof(*s)); DisplaySurface *surface; + qdev_warn_deprecated_function_used(); + s->fb = g_malloc(0x180000); s->con = graphic_console_init(NULL, 0, &blizzard_ops, s); From patchwork Sat Jul 4 15:38:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 278581 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B905C433E0 for ; Sat, 4 Jul 2020 15:47:39 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 22DAD207D4 for ; Sat, 4 Jul 2020 15:47:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QTvGTbU0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 22DAD207D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrkOA-0006hh-Al for qemu-devel@archiver.kernel.org; Sat, 04 Jul 2020 11:47:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrkGx-0001xX-P9 for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:40:11 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:21220 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jrkGv-0007j6-C4 for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:40:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593877208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=faJPKsgnKj1MSj1B3bxzpLa01+W3HhU/7Hynie77jqI=; b=QTvGTbU0FsA594nbpizQXCxVMsQeofTLwepRpExoxQp+2hOdJNxMbsl5+Pbnzo1hhKbvei Yu1EAO+1isTSs0V/IjI9WJ2Pedg/K0nuNny9adg1fWWrvxSkw20QAUYKzAiMtFttXk8RFB DtCUNIiOIGkqAayZJyKsSoZLx363CoQ= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-227-H-bzotlxMsKaQ64L0sXSHw-1; Sat, 04 Jul 2020 11:40:07 -0400 X-MC-Unique: H-bzotlxMsKaQ64L0sXSHw-1 Received: by mail-wr1-f69.google.com with SMTP id j5so35937404wro.6 for ; Sat, 04 Jul 2020 08:40:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=faJPKsgnKj1MSj1B3bxzpLa01+W3HhU/7Hynie77jqI=; b=DStzH4UrU8FaLtHWkOulGZcdgwxEYtfdMahSo5h59TTOD0R0zaIUCnin6wn3cs/Y4m eoGXUR+bBexWK39LXmhMTMEoPfSibCxjDI71EpHoPHpRfexWcTnnu779H7awoS0aIQbi 2fH6y8YEqDOqn6N7FUC2eve6fv7Z7ZJgtC7C4iS7K5PvRL1CmOj/HMACNzzuRqH+6mJJ yxQVua/EQg/SqA9WAG1uW3kpI15WcbJk61/RC+f8bOKCjyp7R8njSbtqZ+xonSNz7FvB qLEVKkMor+yF3rUPPZqvCDYVRThCmMNX4rVRz7POwTGV5AJRpkv5Tmrhfru10xMOKCz6 O0eQ== X-Gm-Message-State: AOAM530S2QC6V97YR3d/0gvr0q6vxKcxhY7LvosYLvmyj5lDExqyQSgc GWoHswPZQBY0K/JJkD08N+Kr9TQyz4/ApKuSQoBXeeinOjcphNd6vda7U+QTyPwTw/6Egf2aYo3 I72+pG3ZWDom+09Q= X-Received: by 2002:adf:e44c:: with SMTP id t12mr13768479wrm.103.1593877205945; Sat, 04 Jul 2020 08:40:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy098jPxb/frQeho469Gp43aPTWxVhQy55qlR1MGFXuliyYTgtCF30tAWMv6lLp78b+1yIBsQ== X-Received: by 2002:adf:e44c:: with SMTP id t12mr13768451wrm.103.1593877205790; Sat, 04 Jul 2020 08:40:05 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id f186sm16650455wmf.29.2020.07.04.08.40.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 08:40:05 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 10/23] hw/display/vga-isa-mm: Emit warning when old code is used Date: Sat, 4 Jul 2020 17:38:55 +0200 Message-Id: <20200704153908.12118-11-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704153908.12118-1-philmd@redhat.com> References: <20200704153908.12118-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 11:39:14 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@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" , Max Filippov , Alistair Francis , Gerd Hoffmann , "Edgar E. Iglesias" , Yoshinori Sato , Magnus Damm , Palmer Dabbelt , Eduardo Habkost , Alistair Francis , qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Stafford Horne , David Gibson , qemu-riscv@nongnu.org, Thomas Huth , Bastian Koppelmann , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/vga-isa-mm.c | 5 +++++ hw/display/vga.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/hw/display/vga-isa-mm.c b/hw/display/vga-isa-mm.c index 7321b7a06d..3e62389b63 100644 --- a/hw/display/vga-isa-mm.c +++ b/hw/display/vga-isa-mm.c @@ -29,6 +29,7 @@ #include "hw/display/vga.h" #include "vga_int.h" #include "ui/pixel_ops.h" +#include "hw/qdev-deprecated.h" #define VGA_RAM_SIZE (8 * MiB) @@ -71,6 +72,8 @@ static void vga_mm_init(ISAVGAMMState *s, hwaddr vram_base, { MemoryRegion *s_ioport_ctrl, *vga_io_memory; + qdev_warn_deprecated_function_used(); + s->it_shift = it_shift; s_ioport_ctrl = g_malloc(sizeof(*s_ioport_ctrl)); memory_region_init_io(s_ioport_ctrl, NULL, &vga_mm_ctrl_ops, s, @@ -99,6 +102,8 @@ int isa_vga_mm_init(hwaddr vram_base, s = g_malloc0(sizeof(*s)); + qdev_warn_deprecated_function_used(); + s->vga.vram_size_mb = VGA_RAM_SIZE / MiB; s->vga.global_vmstate = true; vga_common_init(&s->vga, NULL); diff --git a/hw/display/vga.c b/hw/display/vga.c index 061fd9ab8f..d59a9c896b 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -35,6 +35,7 @@ #include "hw/xen/xen.h" #include "migration/vmstate.h" #include "trace.h" +#include "hw/qdev-deprecated.h" //#define DEBUG_VGA_MEM //#define DEBUG_VGA_REG @@ -2262,6 +2263,8 @@ MemoryRegion *vga_init_io(VGACommonState *s, Object *obj, { MemoryRegion *vga_mem; + qdev_warn_deprecated_function_used(); + *vga_ports = vga_portio_list; *vbe_ports = vbe_portio_list; From patchwork Sat Jul 4 15:38:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 278580 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C001C433DF for ; Sat, 4 Jul 2020 15:48:32 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 554BD207D4 for ; Sat, 4 Jul 2020 15:48:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="C2Ojca4o" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 554BD207D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrkP1-0000Pe-H9 for qemu-devel@archiver.kernel.org; Sat, 04 Jul 2020 11:48:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrkHG-0002TW-Dc for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:40:30 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:28384) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jrkHC-0007wd-2X for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:40:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593877225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g5ly0fcUXOf9qpye/9fR2nyQtN4aqsUxjucs8EhlOCo=; b=C2Ojca4ort7pUqR/4cjTbJbK2RSuArXbVzAQVqzvtw3ztSZ/NUFmxjYQxPyIOQZHjEUVDM M5gfflAiMn+e4ixdZKPomNsWo9aQg6UbX4XgF6oejERyXUdWShHkyKdmKGEXHNJnwwowob 0ZbPDdPJ+AAMxChLdSqwHtj7ogCtUkQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-19-RP2wodYJM5q55X3yH3biqQ-1; Sat, 04 Jul 2020 11:40:23 -0400 X-MC-Unique: RP2wodYJM5q55X3yH3biqQ-1 Received: by mail-wm1-f71.google.com with SMTP id h6so39690945wmb.7 for ; Sat, 04 Jul 2020 08:40:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=g5ly0fcUXOf9qpye/9fR2nyQtN4aqsUxjucs8EhlOCo=; b=OlJ1T5+OGHZJMsCWadr1ap9BN2o1N/pjw89zK9deUPkhKLMXRVzuOufgBgBA0ReMmX atvso73e6BRKaWkW1mNvpOo8QrlFZKwFRk8stdL/9gdVT23NRPrFiA5HEUsm4l+Eutrr 9XuX5r3jZEk6ad8kJ/9ynUYTZxWTLU3grROSZIPWwkyHqRJ6ezEtwqqQ0hfkJAVnbMye qwW23eJr3yo5TYtziqF2QCcx0nYykZ60ag6U6Fc8grGBPWi4yKKtdJyhmU25JOqsKMKw J0hRQMH8N4Jk4qB/HF1z7OSKpgeIEiakRRtIvdzmQeWPOLkL/EsI/OUR6/6feBgEEKj2 JXCA== X-Gm-Message-State: AOAM531upH+UrdcZTgb3DQ3hSj5+WYCb5IoZRDSWbhS9hyZTBd6BVcjz C5jfsDWkfR0uqjwS54FWSAUpDsQR+plqCP4G+GoicGL3trwSVCRJ+9d5aSBJQJimBJc+BYr7xL0 0trUzNuW+Pv3COk8= X-Received: by 2002:a5d:658a:: with SMTP id q10mr38375941wru.220.1593877221943; Sat, 04 Jul 2020 08:40:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyMKgD3/a3jy6iGiInZDbrcH8w26uYQl56sAGdQc8KZPWj5YW69Fw4oOJxni+dn0nj12wpKw== X-Received: by 2002:a5d:658a:: with SMTP id q10mr38375922wru.220.1593877221764; Sat, 04 Jul 2020 08:40:21 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id v7sm18015001wrp.45.2020.07.04.08.40.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 08:40:21 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 13/23] hw/input/lasips2: Emit warning when old code is used Date: Sat, 4 Jul 2020 17:38:58 +0200 Message-Id: <20200704153908.12118-14-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704153908.12118-1-philmd@redhat.com> References: <20200704153908.12118-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 08:57:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@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" , Max Filippov , Alistair Francis , Gerd Hoffmann , "Edgar E. Iglesias" , Yoshinori Sato , Magnus Damm , Palmer Dabbelt , Eduardo Habkost , Alistair Francis , qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Stafford Horne , David Gibson , qemu-riscv@nongnu.org, Thomas Huth , Bastian Koppelmann , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/input/lasips2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c index 0786e57338..452244f037 100644 --- a/hw/input/lasips2.c +++ b/hw/input/lasips2.c @@ -34,7 +34,7 @@ #include "exec/address-spaces.h" #include "migration/vmstate.h" #include "hw/irq.h" - +#include "hw/qdev-deprecated.h" struct LASIPS2State; typedef struct LASIPS2Port { @@ -269,6 +269,8 @@ void lasips2_init(MemoryRegion *address_space, { LASIPS2State *s; + qdev_warn_deprecated_function_used(); + s = g_malloc0(sizeof(LASIPS2State)); s->irq = irq; From patchwork Sat Jul 4 15:39:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 278577 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FF38C433E0 for ; Sat, 4 Jul 2020 15:52:28 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BFBF12084C for ; Sat, 4 Jul 2020 15:52:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="as7CJOD2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFBF12084C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrkSo-0000Vw-Qn for qemu-devel@archiver.kernel.org; Sat, 04 Jul 2020 11:52:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrkHP-0002dV-9O for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:40:39 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:44589 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jrkHM-00082l-Pl for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:40:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593877235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ApDhe32brtQ+Y5RdcPhQgtj2PJElzW6fZw0WZlKaDdE=; b=as7CJOD20YxTc+nDPRBn/YnLnAfzGa/ErN08t4H7js1TqfDwrJW9dnh9HPtWX+MTf9QMvG krP2k0eNVyLn4wJIedVVnIZUEZy38x+2QOovieZUfcuHWbI5ICzQtwqroVE4gf2NfFUiIB K4c+DXpsgl0jseYEMOxBtz5HPu32k18= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-87-DxR0g9FaM-KbeyOTAb98KA-1; Sat, 04 Jul 2020 11:40:33 -0400 X-MC-Unique: DxR0g9FaM-KbeyOTAb98KA-1 Received: by mail-wr1-f69.google.com with SMTP id e11so36043883wrs.2 for ; Sat, 04 Jul 2020 08:40:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ApDhe32brtQ+Y5RdcPhQgtj2PJElzW6fZw0WZlKaDdE=; b=iz+AwaM3VG4VKuiYW+/Ikv3V9CZDf94cmDGFjs7xCsGfKwzo8d7LqZeCAXy+QdY7NF ApNZS14Zy2vZDbfEMYKNZHDWAoG6h0A+tOdcQ4iqi2K7dpCwNfCXuQ5j5XNl4JTv5f/3 TVhz+DR7k9j2i33s1Xtz3d2ll8V0qOPj/8gPmL7vU42XgX51ZKfsfQoeBZZdJJ7lA68F JxZVTmTltWOQ9JZSl+UKfpnrZkfhlX3Zgo3Upj7ZHBxKgHf7MvjDQm1fU2mI6iIB+ro4 zF1+XsZrw2R/ViV6qUgAN/Nge6qq2aStuN/GwjJMLQ7GnHp8yItmLciTW8UUPkX/5SIQ L2zQ== X-Gm-Message-State: AOAM531lzyAodADY7qp+7sL8S+L9NRYa5bUKEUB2EpThDzWopCauvY05 FbuAT61VQx5FrPoJEn55LEaDY9h++PWL3DlGHNkFJqFdi1rSqn3Bp6jvKpd6d9aVNj1v7dDLK3H hGCjrDAYgOPOA1k4= X-Received: by 2002:a5d:65cd:: with SMTP id e13mr45174011wrw.213.1593877232724; Sat, 04 Jul 2020 08:40:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwc1L/DE70twI/1xOz2kmJOPcOy9N+cy+lOq57wiKPckMzozaMZqMcAsAVBd12z6yKwinCnag== X-Received: by 2002:a5d:65cd:: with SMTP id e13mr45173991wrw.213.1593877232580; Sat, 04 Jul 2020 08:40:32 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id m16sm12754853wro.0.2020.07.04.08.40.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 08:40:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 15/23] hw/m68k/mcf520x: Emit warning when old code is used Date: Sat, 4 Jul 2020 17:39:00 +0200 Message-Id: <20200704153908.12118-16-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704153908.12118-1-philmd@redhat.com> References: <20200704153908.12118-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 08:57:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@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" , Max Filippov , Alistair Francis , Gerd Hoffmann , "Edgar E. Iglesias" , Yoshinori Sato , Magnus Damm , Palmer Dabbelt , Eduardo Habkost , Alistair Francis , qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Stafford Horne , David Gibson , qemu-riscv@nongnu.org, Thomas Huth , Bastian Koppelmann , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- v2: Add comment (thuth) --- 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); memory_region_init_io(&s->iomem, NULL, &m5206_mbar_ops, s, diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c index d310a98e7b..0bfcbb6332 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 @@ -194,7 +195,9 @@ static void mcf5208_sys_init(MemoryRegion *address_space, qemu_irq *pic) /* SDRAMC. */ memory_region_init_io(iomem, NULL, &m5208_sys_ops, NULL, "m5208-sys", 0x00004000); memory_region_add_subregion(address_space, 0xfc0a8000, iomem); + /* Timers. */ + qdev_warn_deprecated_function_used(); /* m5208_timer_state is not QOM */ for (i = 0; i < 2; i++) { s = g_new0(m5208_timer_state, 1); s->timer = ptimer_init(m5208_timer_trigger, s, PTIMER_POLICY_DEFAULT); From patchwork Sat Jul 4 15:39:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 278576 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48070C433DF for ; Sat, 4 Jul 2020 15:55:34 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 12081206DF for ; Sat, 4 Jul 2020 15:55:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FFHbBX1c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12081206DF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrkVp-0004hv-Bz for qemu-devel@archiver.kernel.org; Sat, 04 Jul 2020 11:55:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrkHh-0002zQ-Sm for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:40:59 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:29307 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jrkHd-0008Ly-T9 for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:40:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593877253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=J738BQqBvhpMt3eJFPP/lmrii93ELO7mMMfmrV28FMw=; b=FFHbBX1c6DXN6HOFZEJ5IPI1/39q61ylORY+wzlWdfoZUS2PtVonuffnpuLbV2GmjFsYAo ifd8Dip1bWMMIIJNSJ3R5JRxXHnzcdOiS52v+jTaT5r3bwrhIYkP/rA8TVYovstUiA6fux eikVHL3DEHz3UXwRFGf/tWJcnl5Lb7o= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-121-otHDLL7UP6KAEaQEqPEA5w-1; Sat, 04 Jul 2020 11:40:51 -0400 X-MC-Unique: otHDLL7UP6KAEaQEqPEA5w-1 Received: by mail-wr1-f69.google.com with SMTP id e11so36044843wrs.2 for ; Sat, 04 Jul 2020 08:40:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J738BQqBvhpMt3eJFPP/lmrii93ELO7mMMfmrV28FMw=; b=mAt5g48PC90C8QjUMZNhqZVIECerA07zOEvuURac/A67tiBbgIXa/25SwDDY0+ow0R kaL0ZrWLNC5vDHcdyDcDHmiJIMHXN5Nn4e+ON6huo0VTLt6hGHo1MfIDQGtz3wGxNXuR bSmHg13lE5ICB1SdGpPJa+3uhAhsZIC0PpjDrXSjyOybGuTFMT8RHrseHbtU5fkZ4F+e J8SvdPOzNTMsfeQK5qJn2pTeReJkYpfU7YKfIaFh+d9hzb1QxEZoCeqjc8X5ZJg/8USV 8VoAe1xrBmKG5+20jnyaSBbuLTVhtE1IJ6WKUcMtAfDZfDd1zTSRdAEo0J9UMvxgwcZE j3fQ== X-Gm-Message-State: AOAM530H+mCventtnx5//AVZkw3dniEl9P35GVoPfv6oSADGfWDiv1X8 6M4R24Dr89U4S60eMoj3Xnky71+ambgUyCxb5sTTV72mviDsnsPrKCyM5XBxOS/aQF+OSql0lNE Uq8MBosFPhbe6IHw= X-Received: by 2002:a1c:9e4c:: with SMTP id h73mr33895142wme.177.1593877248835; Sat, 04 Jul 2020 08:40:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy89N5TpEiyPKwLtUEcDXIcvq4MVNBDKbqzh2H2kJGTopV9XvgksQGJaWu/AQIgivBZ+270XA== X-Received: by 2002:a1c:9e4c:: with SMTP id h73mr33895118wme.177.1593877248705; Sat, 04 Jul 2020 08:40:48 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id v3sm17434678wrq.57.2020.07.04.08.40.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 08:40:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 18/23] hw/openrisc/cputimer: Emit warning when old code is used Date: Sat, 4 Jul 2020 17:39:03 +0200 Message-Id: <20200704153908.12118-19-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704153908.12118-1-philmd@redhat.com> References: <20200704153908.12118-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 08:57:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@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" , Max Filippov , Alistair Francis , Gerd Hoffmann , "Edgar E. Iglesias" , Yoshinori Sato , Magnus Damm , Palmer Dabbelt , Eduardo Habkost , Alistair Francis , qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Stafford Horne , David Gibson , qemu-riscv@nongnu.org, Thomas Huth , Bastian Koppelmann , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/openrisc/cputimer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/openrisc/cputimer.c b/hw/openrisc/cputimer.c index 93268815d8..60f2c9667f 100644 --- a/hw/openrisc/cputimer.c +++ b/hw/openrisc/cputimer.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "migration/vmstate.h" #include "qemu/timer.h" +#include "hw/qdev-deprecated.h" #define TIMER_PERIOD 50 /* 50 ns period for 20 MHz timer */ @@ -135,6 +136,8 @@ static const VMStateDescription vmstate_or1k_timer = { void cpu_openrisc_clock_init(OpenRISCCPU *cpu) { + qdev_warn_deprecated_function_used(); + cpu->env.timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, &openrisc_timer_cb, cpu); cpu->env.ttmr = 0x00000000; From patchwork Sat Jul 4 15:39:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 278579 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83BB6C433DF for ; Sat, 4 Jul 2020 15:49:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4F0DF207D4 for ; Sat, 4 Jul 2020 15:49:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Cz3QznPH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F0DF207D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:55256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrkQC-0002u1-GW for qemu-devel@archiver.kernel.org; Sat, 04 Jul 2020 11:49:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrkHv-0003RR-V2 for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:41:11 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:46950 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jrkHu-0008OE-2K for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:41:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593877269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EtUEaayxY7dmCSI9Atr+yr9J3sNs3cVN+JMD3iSh+ak=; b=Cz3QznPH+UCqtY8etVwDAmgLQz1v668jVw4Fs7BEaTXP5PA3W7+pgMAysVefzl9HGYz9oK HzrI47kLHPmaa7ErLJ2DYUsHPNXl3J+PwjxuWT8AIuQTSotDbTVhoIs0vdIQ+DPeEpxO1k UM4dNj1fJmitbJe4Wu+ayxzL3MZ2nps= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-488-R1PGXlkwP3S8JUJaEBuT4w-1; Sat, 04 Jul 2020 11:41:07 -0400 X-MC-Unique: R1PGXlkwP3S8JUJaEBuT4w-1 Received: by mail-wm1-f70.google.com with SMTP id t18so39730956wmj.5 for ; Sat, 04 Jul 2020 08:41:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EtUEaayxY7dmCSI9Atr+yr9J3sNs3cVN+JMD3iSh+ak=; b=bf/ZyMrDM2qjSBcGmMOG88YaZtHEkCw5vm+L0S8OAqHr+CUBGURgspc2QgIRCSzoAJ spryzWAsICujChVUZnlRO3wqVRAKIBw0i3RK9pMJ0QYeAgHxh6fcmgQATz2Alje2CFLD Ew5n3wEL9sjHG0SKN5J2U/gt87/R8CZZtlt4TAuzv8tVdnqPVtOozsY7++y2iB7sqsWT 9xx541qP52p5Tkn1F81eH/bLfjm1BTWy1GU8//G8HsSy3y+EwfBcxYIxHVtUTDWDI6EK w01gXFFFmNHRc36yw2gpHSBWmvFmee/QzA1JkxCDGvoVDrzZRrzxgsr0QDDHuvxuhRCF LEqw== X-Gm-Message-State: AOAM530ZgVz/Y+3A3XiTtyHsRHo6thkyl9AX+5LRHQQl3JTdE9HlXgWx U7wm8F8szqcqgyXzjwZkcl84RP/oQsiSWoTkCJIYgDyNUNMXabLyMBgTEhQf94oAJ4ctAhXa13G RUkYqFIUC93K3LnM= X-Received: by 2002:a7b:c84d:: with SMTP id c13mr41373485wml.170.1593877265247; Sat, 04 Jul 2020 08:41:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBQ+oFQ07HIPe/VONHqPVER0qLoAra3sFJaOR728rzbo9eCzhVkGvzuwBIXrIuo+Dcy5zd6g== X-Received: by 2002:a7b:c84d:: with SMTP id c13mr41373449wml.170.1593877265082; Sat, 04 Jul 2020 08:41:05 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id v6sm4904514wrr.85.2020.07.04.08.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 08:41:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 21/23] hw/riscv: Emit warning when old code is used Date: Sat, 4 Jul 2020 17:39:06 +0200 Message-Id: <20200704153908.12118-22-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704153908.12118-1-philmd@redhat.com> References: <20200704153908.12118-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 11:39:15 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@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" , Max Filippov , Alistair Francis , Gerd Hoffmann , "Edgar E. Iglesias" , Yoshinori Sato , Magnus Damm , Palmer Dabbelt , Eduardo Habkost , Alistair Francis , qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Stafford Horne , David Gibson , qemu-riscv@nongnu.org, Thomas Huth , Bastian Koppelmann , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This code hasn't been QOM'ified yet. Warn the user. Reviewed-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- hw/riscv/riscv_htif.c | 4 ++++ hw/riscv/sifive_uart.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/hw/riscv/riscv_htif.c b/hw/riscv/riscv_htif.c index ca87a5cf9f..bd080dbefb 100644 --- a/hw/riscv/riscv_htif.c +++ b/hw/riscv/riscv_htif.c @@ -30,6 +30,7 @@ #include "hw/riscv/riscv_htif.h" #include "qemu/timer.h" #include "qemu/error-report.h" +#include "hw/qdev-deprecated.h" #define RISCV_DEBUG_HTIF 0 #define HTIF_DEBUG(fmt, ...) \ @@ -238,6 +239,9 @@ HTIFState *htif_mm_init(MemoryRegion *address_space, MemoryRegion *main_mem, uint64_t fromhost_offset = fromhost_addr - base; HTIFState *s = g_malloc0(sizeof(HTIFState)); + + qdev_warn_deprecated_function_used(); + s->address_space = address_space; s->main_mem = main_mem; s->main_mem_ram_ptr = memory_region_get_ram_ptr(main_mem); diff --git a/hw/riscv/sifive_uart.c b/hw/riscv/sifive_uart.c index 9350482662..1a5890d5f7 100644 --- a/hw/riscv/sifive_uart.c +++ b/hw/riscv/sifive_uart.c @@ -25,6 +25,7 @@ #include "hw/hw.h" #include "hw/irq.h" #include "hw/riscv/sifive_uart.h" +#include "hw/qdev-deprecated.h" /* * Not yet implemented: @@ -183,6 +184,9 @@ SiFiveUARTState *sifive_uart_create(MemoryRegion *address_space, hwaddr base, Chardev *chr, qemu_irq irq) { SiFiveUARTState *s = g_malloc0(sizeof(SiFiveUARTState)); + + qdev_warn_deprecated_function_used(); + s->irq = irq; qemu_chr_fe_init(&s->chr, chr, &error_abort); qemu_chr_fe_set_handlers(&s->chr, uart_can_rx, uart_rx, uart_event, From patchwork Sat Jul 4 15:39:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 278578 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE500C433DF for ; Sat, 4 Jul 2020 15:50:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 975772084C for ; Sat, 4 Jul 2020 15:50:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fqFPwnI/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 975772084C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrkRA-0005q9-OL for qemu-devel@archiver.kernel.org; Sat, 04 Jul 2020 11:50:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrkI0-0003bH-HZ for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:41:16 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:39143 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jrkHx-0008PC-S1 for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:41:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593877273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T05aSWsXj6XqlyyRKFN7AiT8E00rxZAH7ivGzBAXguo=; b=fqFPwnI/niaIUFNl6cM1EH1O1EbAL0c0TEvzZDpkXQlwOm1h0pQPRSi/WHVADh6Tpb7PD5 elV8EQyej2KALpvPXr/LlhtBJOEZG2JiEv050fUb5uJz7UaX7sdYwBSeXcOy3glq2ch0iV NX0Y9+mSpPpiMgEGc7daYhE7tMSAxo4= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-468-UZlcotD5MMCXHybsVLeXPw-1; Sat, 04 Jul 2020 11:41:12 -0400 X-MC-Unique: UZlcotD5MMCXHybsVLeXPw-1 Received: by mail-wr1-f70.google.com with SMTP id i14so35800796wru.17 for ; Sat, 04 Jul 2020 08:41:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=T05aSWsXj6XqlyyRKFN7AiT8E00rxZAH7ivGzBAXguo=; b=jw4JM53EmStNhWZfs6SylleZXwZBDzHGvLhUYn++DAtlkn3F2ulMkO0cb1CEVGQXsa ki6X99gOd5+z6HHB79vDV3rJ1EIknhyDkkNdCTie9fqi+D4z/6PLSqY5vKw/yOKbvtAa ObakxMcEjUYefsO3nqGQVG12d0PH2IHUU+vXw79lYNig7p5lepgI+jvVntbyn1cOajvR bO2D0Yi/qUu/6BgIfDm0mydtmkKbOk22qhESpOqlrRiMrJxnPT+Z2MZtZjLCJXsnWNeE OMh8fqT2P42vzBJpNHbIP13XnveMDed1jdvALdkXmteXLeRaza3j02laL7ghh+9ItjFb N1jQ== X-Gm-Message-State: AOAM531fgG7N1GFArCr6nQ/aes4dpj3cEs4OHDzJwxBqGHsFQM7ZByMR solG2663XBtHAlRkgXx1i2/gy6scdV5U+do2DxBNLUkznRj1nGGQqqvuDnuR5ZP6PFJ2k+YVJ3h 2xNNNLT5eX2tZxXM= X-Received: by 2002:a1c:398b:: with SMTP id g133mr40165702wma.76.1593877270491; Sat, 04 Jul 2020 08:41:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyY6jjMSQWiKHCzETU0E+/X0LPKuPCnnd4xVQP5+FKyucBMWp08OCApfnD7RL8JFbFT8AYF3A== X-Received: by 2002:a1c:398b:: with SMTP id g133mr40165682wma.76.1593877270343; Sat, 04 Jul 2020 08:41:10 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id h2sm17134778wrw.62.2020.07.04.08.41.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 08:41:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 22/23] hw/usb/hcd-musb: Emit warning when old code is used Date: Sat, 4 Jul 2020 17:39:07 +0200 Message-Id: <20200704153908.12118-23-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704153908.12118-1-philmd@redhat.com> References: <20200704153908.12118-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 11:39:15 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@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" , Max Filippov , Alistair Francis , Gerd Hoffmann , "Edgar E. Iglesias" , Yoshinori Sato , Magnus Damm , Palmer Dabbelt , Eduardo Habkost , Alistair Francis , qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Stafford Horne , David Gibson , qemu-riscv@nongnu.org, Thomas Huth , Bastian Koppelmann , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-musb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/usb/hcd-musb.c b/hw/usb/hcd-musb.c index 85f5ff5bd4..f09464ed5e 100644 --- a/hw/usb/hcd-musb.c +++ b/hw/usb/hcd-musb.c @@ -26,6 +26,7 @@ #include "hw/usb/hcd-musb.h" #include "hw/irq.h" #include "hw/hw.h" +#include "hw/qdev-deprecated.h" /* Common USB registers */ #define MUSB_HDRC_FADDR 0x00 /* 8-bit */ @@ -378,6 +379,8 @@ struct MUSBState *musb_init(DeviceState *parent_device, int gpio_base) MUSBState *s = g_malloc0(sizeof(*s)); int i; + qdev_warn_deprecated_function_used(); + for (i = 0; i < musb_irq_max; i++) { s->irqs[i] = qdev_get_gpio_in(parent_device, gpio_base + i); } From patchwork Sat Jul 4 15:39:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 278575 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 326F4C433DF for ; Sat, 4 Jul 2020 16:01:00 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EB79920723 for ; Sat, 4 Jul 2020 16:00:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="K0piscV5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB79920723 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrkb5-0001n8-1c for qemu-devel@archiver.kernel.org; Sat, 04 Jul 2020 12:00:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrkI5-0003kl-JN for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:41:21 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:37395 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jrkI3-0008QH-Da for qemu-devel@nongnu.org; Sat, 04 Jul 2020 11:41:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593877278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zGhDjSAMTvyc0GtSLCXSdOThvesECzDKYGUhUFBvKxM=; b=K0piscV5xQirRkf1GoFlPaLx9r5CJtcRIhCXVBoUlQJVOp0VsNai+2jscuNrxwouR+iMpg yX70bGM3cnuoXij52Q///XDic0SKzYpS5izPqsh/HtaQYE4lKET0UxbKk9TsA1e598bUff /btGFIHkyjLDSEXkqkldd8WcBzVCYKM= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-204-liHf7rlpMCu57zK2shOMPg-1; Sat, 04 Jul 2020 11:41:17 -0400 X-MC-Unique: liHf7rlpMCu57zK2shOMPg-1 Received: by mail-wm1-f69.google.com with SMTP id v24so39802706wmh.3 for ; Sat, 04 Jul 2020 08:41:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zGhDjSAMTvyc0GtSLCXSdOThvesECzDKYGUhUFBvKxM=; b=I5yx0x8DLpcyafgjQzK7gLCY7GLibfqaGcDhAByXYd+XFn8vOj0Dv7gztg9tbeKIMZ mAbO6eu+kbK9svFl6zbo4w0srNDnDokhpqQqtISZxN7w/FbFluNI2+Dqa3mt+iuXWfRA jK4Ldthw3zV8Q4EUecn/y0C0J5Ve6WnPx3VpUQzviSA2unpPqz0i6O9htv/jvHfTnNxP 2TU/b4msby1ev6aP5vw61pKy13T3Iwav8VbHj44vkLdK0Gq7mIY2hxdmFK61quOV+A9V 7pM8hw9B+esPEMN25oI4U42adcFT1MYba3TrIJ0f/nJRQ+S6I7CNLdLKj3ecOcScmk7z oKhw== X-Gm-Message-State: AOAM5315pMZmwlu8mTyVjA5nLnSdtY93v1MOUKC1i7LAZfkwYtaaZwFI soittICx8rYZn7loXJYGpw9uUNjBw62HCeAap3Iy7dm8e5R2Gk3DJM6qMbChds3yka47TWs3E+X 3covHrusgM61FU/0= X-Received: by 2002:adf:db42:: with SMTP id f2mr40958771wrj.298.1593877275712; Sat, 04 Jul 2020 08:41:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbE+aGDDMtvEhXpYLDyFkAKKq00ppivJij+CelWbeyfYysOcMWRUnfSqrisfL1wBnQD5WFVw== X-Received: by 2002:adf:db42:: with SMTP id f2mr40958741wrj.298.1593877275481; Sat, 04 Jul 2020 08:41:15 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id j6sm17363975wma.25.2020.07.04.08.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 08:41:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 23/23] hw/xtensa/xtfpga: Emit warning when old code is used Date: Sat, 4 Jul 2020 17:39:08 +0200 Message-Id: <20200704153908.12118-24-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704153908.12118-1-philmd@redhat.com> References: <20200704153908.12118-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 11:39:20 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@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" , Max Filippov , Alistair Francis , Gerd Hoffmann , "Edgar E. Iglesias" , Yoshinori Sato , Magnus Damm , Palmer Dabbelt , Eduardo Habkost , Alistair Francis , qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Stafford Horne , David Gibson , qemu-riscv@nongnu.org, Thomas Huth , Bastian Koppelmann , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/xtensa/xtfpga.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index 10de15855a..ddb843e6e8 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -50,6 +50,7 @@ #include "xtensa_memory.h" #include "hw/xtensa/mx_pic.h" #include "migration/vmstate.h" +#include "hw/qdev-deprecated.h" typedef struct XtfpgaFlashDesc { hwaddr base; @@ -129,6 +130,8 @@ static XtfpgaFpgaState *xtfpga_fpga_init(MemoryRegion *address_space, { XtfpgaFpgaState *s = g_malloc(sizeof(XtfpgaFpgaState)); + qdev_warn_deprecated_function_used(); + memory_region_init_io(&s->iomem, NULL, &xtfpga_fpga_ops, s, "xtfpga.fpga", 0x10000); memory_region_add_subregion(address_space, base, &s->iomem);