From patchwork Sat Oct 29 01:48:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 9403033 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3D3AA6022E for ; Sat, 29 Oct 2016 01:56:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 288A72A895 for ; Sat, 29 Oct 2016 01:56:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D3C42A89A; Sat, 29 Oct 2016 01:56:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9523E2A895 for ; Sat, 29 Oct 2016 01:55:59 +0000 (UTC) Received: from localhost ([::1]:52809 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0IsI-0005Gk-UH for patchwork-qemu-devel@patchwork.kernel.org; Fri, 28 Oct 2016 21:55:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0Il6-0007zr-Mc for qemu-devel@nongnu.org; Fri, 28 Oct 2016 21:48:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c0Il5-0007fg-Vp for qemu-devel@nongnu.org; Fri, 28 Oct 2016 21:48:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33750) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c0Il4-0007ek-1h; Fri, 28 Oct 2016 21:48:30 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 34BFE46D; Sat, 29 Oct 2016 01:48:29 +0000 (UTC) Received: from localhost (ovpn-116-56.phx2.redhat.com [10.3.116.56]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9T1mSw3009202; Fri, 28 Oct 2016 21:48:28 -0400 From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Fri, 28 Oct 2016 23:48:07 -0200 Message-Id: <1477705687-31175-9-git-send-email-ehabkost@redhat.com> In-Reply-To: <1477705687-31175-1-git-send-email-ehabkost@redhat.com> References: <1477705687-31175-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Sat, 29 Oct 2016 01:48:29 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v4 8/8] qdev: Warning about using qdev_property_add_static() in new code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Markus Armbruster , qemu-arm@nongnu.org, Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The only remaining user of qdev_property_add_static() is arm_cpu_post_init(), but removing it may take some work. While we don't change it, warn people to not use the function in new code. Cc: Peter Maydell Cc: qemu-arm@nongnu.org Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov --- Changes series v1 -> v3: * (none) Changes series v3 -> v4: * Rewrote commit message to refer to correct function name * s/qdev_class_set_props/device_class_set_props/ (function had been renamed in series v3) --- hw/core/qdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index e695fa8..ae772fc 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -812,6 +812,10 @@ static void qdev_property_set_to_default(DeviceState *dev, Property *prop, * Add a static QOM property to @dev for qdev property @prop. * On error, store error in @errp. Static properties access data in a struct. * The type of the QOM property is derived from prop->info. + * + * Do not use this in new code. Either use device_class_set_props(), + * or register regular QOM properties using object_property_add() or + * object_class_property_add(). */ void qdev_property_add_static(DeviceState *dev, Property *prop, Error **errp)