From nobody Fri Nov 14 19:45:29 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1761128106; cv=none; d=zohomail.com; s=zohoarc; b=B/KMcgFMYn8tsbeoyb6SwE/C5ahQF1xjqJc9GMCF56QG5ri8J3gf7VRT19h/8xeO56RmmsW3JLB9nvbwohZUIcgaYWlk4htFlR5WBupPwzeFuvpQPln7NbCpsYTQZOAkjjCpFJpwNR6yTTw7ILA5y5vvx42mZWj/3npsQ0OjCZk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761128106; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uhfG16hvXCbVCWGnPZmAYWx+63yuz7s4f2/aWRtWMNA=; b=JqfRiRIUFypcxfiiE6yByP89XtFu1ILYLzj/abrVZDlBt9HBjttQDs/bShbZFPNYGY4cb4XokVPRjR2ahacZ70qaLFPhV/QEMLHmvCsQoqSObj+G1rurOJoUh47wD0WUf7OvgcHuYTPuiRx2C3NIOypODpHHc8RglqAOtlI//Fo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761128106873415.0055801719368; Wed, 22 Oct 2025 03:15:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vBVrZ-0000TM-2i; Wed, 22 Oct 2025 06:14:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vBVrX-0000Sx-5E for qemu-devel@nongnu.org; Wed, 22 Oct 2025 06:14:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vBVrV-0000NW-Fe for qemu-devel@nongnu.org; Wed, 22 Oct 2025 06:14:34 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-201-MbEVyagxM1SYMn3btLKjrg-1; Wed, 22 Oct 2025 06:14:25 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D5477180AE12; Wed, 22 Oct 2025 10:14:23 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.19]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 57FC01800597; Wed, 22 Oct 2025 10:14:23 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7B4DA21E6935; Wed, 22 Oct 2025 12:14:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1761128072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uhfG16hvXCbVCWGnPZmAYWx+63yuz7s4f2/aWRtWMNA=; b=fI4wbQ7+FdYIGxzBU8+Gm7ODcnoxb10fHWlO5z8eAmdQ4jCrapc1pkC04SLqo7ovIjUS1H hOxcee467C0DR10Xm8d9uAWEcbihUto0Nhi3Cok6o7hY2knabm6zckCaqBqpfUMuFtN/NP iEVjmdfj2C7+uXiYFEGayGBjhm5FGH4= X-MC-Unique: MbEVyagxM1SYMn3btLKjrg-1 X-Mimecast-MFC-AGG-ID: MbEVyagxM1SYMn3btLKjrg_1761128064 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, pbonzini@redhat.com, berrange@redhat.com, eduardo@habkost.net, philmd@linaro.org Subject: [PATCH 3/3] qdev: Legacy properties are now unused, drop Date: Wed, 22 Oct 2025 12:14:20 +0200 Message-ID: <20251022101420.36059-4-armbru@redhat.com> In-Reply-To: <20251022101420.36059-1-armbru@redhat.com> References: <20251022101420.36059-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1761128110029154100 Content-Type: text/plain; charset="utf-8" Signed-off-by: Markus Armbruster Acked-by: Marc-Andr=C3=A9 Lureau --- hw/core/qdev-properties.c | 46 --------------------------------------- 1 file changed, 46 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 422a486969..46a12652f4 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -1108,51 +1108,6 @@ static void qdev_class_add_property(DeviceClass *kla= ss, const char *name, object_class_property_set_description(oc, name, prop->info->descriptio= n); } =20 -/** - * Legacy property handling - */ - -static void qdev_get_legacy_property(Object *obj, Visitor *v, - const char *name, void *opaque, - Error **errp) -{ - const Property *prop =3D opaque; - char *s; - - s =3D prop->info->print(obj, prop); - visit_type_str(v, name, &s, errp); - g_free(s); -} - -/** - * qdev_class_add_legacy_property: - * @dev: Device to add the property to. - * @prop: The qdev property definition. - * - * Add a legacy QOM property to @dev for qdev property @prop. - * - * Legacy properties are string versions of QOM properties. The format of - * the string depends on the property type. Legacy properties are only - * needed for "info qtree". - * - * Do not use this in new code! QOM Properties added through this interfa= ce - * will be given names in the "legacy" namespace. - */ -static void qdev_class_add_legacy_property(DeviceClass *dc, const Property= *prop) -{ - g_autofree char *name =3D NULL; - - /* Register pointer properties as legacy properties */ - if (!prop->info->print && prop->info->get) { - return; - } - - name =3D g_strdup_printf("legacy-%s", prop->name); - object_class_property_add(OBJECT_CLASS(dc), name, "str", - prop->info->print ? qdev_get_legacy_property : prop->info->get, - NULL, NULL, (Property *)prop); -} - void device_class_set_props_n(DeviceClass *dc, const Property *props, size= _t n) { /* We used a hole in DeviceClass because that's still a lot. */ @@ -1165,7 +1120,6 @@ void device_class_set_props_n(DeviceClass *dc, const = Property *props, size_t n) for (size_t i =3D 0; i < n; ++i) { const Property *prop =3D &props[i]; assert(prop->name); - qdev_class_add_legacy_property(dc, prop); qdev_class_add_property(dc, prop->name, prop); } } --=20 2.49.0