From nobody Tue Feb 10 19:23:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; 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=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1770692342; cv=none; d=zohomail.com; s=zohoarc; b=l1r+ZRveQiSbatGOAVmBMO/ceywgKcTSTwC6TLtCrPWAKJQbONVcmGZ/sm6lRdii5xa2SesCiSUq75xs0s1t8UOZBYmdmdz26wcVHhODiwk6VIjWmBXtyk6pCI4xJsdGRSeFcaOWgtsGu//x/CvW0xWKURaKFctFBM0TdnAsH9w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770692342; 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=z2ij8nYB3Lc3oXkc9nU7LF2B7I6D4dQ3LjS+/9ZhI2Q=; b=DFX9ai2sv4nLWqG1hruxtpX9uha03F3J9qLGGZH9usEJuW28OvwFeN265m2gmj6ZBT+J8PjgfQ1iu6cXfgyWMkraUl69yjkH5Emr9Hl7/7AMrHAp69KZVH9F1Oq3gSpdDLIK0aJmt2W1tc9Q+cz8BLGkqWve1zY09LpHW6nRnaU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770692342105240.09071330511654; Mon, 9 Feb 2026 18:59:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vpdxb-0006Nw-C8; Mon, 09 Feb 2026 21:58:43 -0500 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 1vpdxa-0006JK-4s for qemu-devel@nongnu.org; Mon, 09 Feb 2026 21:58:42 -0500 Received: from mgamail.intel.com ([198.175.65.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vpdxX-00046a-Mo for qemu-devel@nongnu.org; Mon, 09 Feb 2026 21:58:41 -0500 Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2026 18:58:38 -0800 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by orviesa008.jf.intel.com with ESMTP; 09 Feb 2026 18:58:34 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1770692320; x=1802228320; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=w3wF2PJ2NmfCFav9tehjq5GSJZrLiro42nNm6SLBWjc=; b=WP6ieVZTcBi+ZhccvDbLLThyjBqacuVkjWxZmis+VmJ/iG4AB2Zsx58F +KnzrqN8xnQm/JYg100hLs9XkvEud51SxCT0h3Z9zx9EkT4xqI7hV16gL zm40qE9vH6LW7bI1KPlhGMP5XAqNcFKfZiCCtyDHsEcS7cV2OWeY9+sXO nQdKdiZhQEYNStCtDEQ+Ri4tJBRBVL5NUcWFypsngDXD1nVIXt+RqOeTK SU9NLIYCnFNDdGK/QvB3QqMxXXTzedp5c/x5lXJF+WZL0WwUEwFnl65ay 1Q+z6BvXjAd73Uxzhm720PahisVlIVBMRzNI8FAML3CPOBk/LCOeNmFy5 A==; X-CSE-ConnectionGUID: hg/zOwx0RhORvWnPNr/+yA== X-CSE-MsgGUID: zE8iLhVPQYOmChsqCFdw3g== X-IronPort-AV: E=McAfee;i="6800,10657,11696"; a="71854274" X-IronPort-AV: E=Sophos;i="6.21,283,1763452800"; d="scan'208";a="71854274" X-CSE-ConnectionGUID: A2FODYfKTBuQIL6DWiuJ1Q== X-CSE-MsgGUID: 3/j2jgLfR66TOH3rhBEdYw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,283,1763452800"; d="scan'208";a="211800508" From: Zhao Liu To: Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Eduardo Habkost , Markus Armbruster , Thomas Huth , Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Cc: Richard Henderson , Peter Maydell , "Michael S . Tsirkin" , BALATON Zoltan , Mark Cave-Ayland , Pierrick Bouvier , Zide Chen , Dapeng Mi , Zhao Liu , qemu-devel@nongnu.org, devel@lists.libvirt.org Subject: [PATCH v2 05/21] qom/object: rename object_{class_}property_try_add() to object_{class_}property_add_full() Date: Tue, 10 Feb 2026 11:23:32 +0800 Message-Id: <20260210032348.987549-6-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260210032348.987549-1-zhao1.liu@intel.com> References: <20260210032348.987549-1-zhao1.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=198.175.65.18; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=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: qemu development 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 @intel.com) X-ZM-MESSAGEID: 1770692345567154100 Content-Type: text/plain; charset="utf-8" The suffixes "_try_add" and "_add" typically distinguish functions based solely on their error-handling behavior. However, the object_{class_}property_try_add() variants now support the additional 'flags' argument. Consequently, naming them based only on error handling no longer accurately reflects the distinction between the two interface variants. Rename object_{class_}property_try_add() to object_{class_}property_add_full() to indicate that these interfaces offer comprehensive argument support, including the new flags. Signed-off-by: Zhao Liu --- include/qom/object.h | 38 ++++++++++++++++++------------------ qom/object.c | 46 ++++++++++++++++++++++---------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index 7d8a7be1bad3..30c9f20b1d18 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -1087,7 +1087,7 @@ Object *object_ref(void *obj); void object_unref(void *obj); =20 /** - * object_property_try_add: + * object_property_add_full: * @obj: the object to add a property to * @name: the name of the property. This can contain any character except= for * a forward slash. In general, you should use hyphens '-' instead of @@ -1114,17 +1114,17 @@ void object_unref(void *obj); * Returns: The #ObjectProperty; this can be used to set the @resolve * callback for child and link properties. */ -ObjectProperty *object_property_try_add(Object *obj, const char *name, - const char *type, - ObjectPropertyAccessor *get, - ObjectPropertyAccessor *set, - ObjectPropertyRelease *release, - ObjectPropertyFlags flags, - void *opaque, Error **errp); +ObjectProperty *object_property_add_full(Object *obj, const char *name, + const char *type, + ObjectPropertyAccessor *get, + ObjectPropertyAccessor *set, + ObjectPropertyRelease *release, + ObjectPropertyFlags flags, + void *opaque, Error **errp); =20 /** * object_property_add: - * Same as object_property_try_add() with @flags hardcoded to 0 and @errp + * Same as object_property_add_full() with @flags hardcoded to 0 and @errp * hardcoded to &error_abort. * * @obj: the object to add a property to @@ -1154,7 +1154,7 @@ ObjectProperty *object_property_add(Object *obj, cons= t char *name, void object_property_del(Object *obj, const char *name); =20 /** - * object_class_property_try_add: + * object_class_property_add_full: * @klass: the object class to add a property to * @name: the name of the property. This can contain any character except= for * a forward slash. In general, you should use hyphens '-' instead of @@ -1181,18 +1181,18 @@ void object_property_del(Object *obj, const char *n= ame); * Returns: The #ObjectProperty; this can be used to set the @resolve * callback for child and link properties. */ -ObjectProperty *object_class_property_try_add(ObjectClass *klass, const ch= ar *name, - const char *type, - ObjectPropertyAccessor *get, - ObjectPropertyAccessor *set, - ObjectPropertyRelease *relea= se, - ObjectPropertyFlags flags, - void *opaque, Error **errp); +ObjectProperty *object_class_property_add_full(ObjectClass *klass, const c= har *name, + const char *type, + ObjectPropertyAccessor *get, + ObjectPropertyAccessor *set, + ObjectPropertyRelease *rele= ase, + ObjectPropertyFlags flags, + void *opaque, Error **errp); =20 /** * object_class_property_add: - * Same as object_class_property_try_add() with @flags hardcoded to 0 and = @errp - * hardcoded to &error_abort. + * Same as object_class_property_add_full() with @flags hardcoded to 0 and + * @errp hardcoded to &error_abort. * * @klass: the object class to add a property to * @name: the name of the property. This can contain any character except= for diff --git a/qom/object.c b/qom/object.c index 543e42cd6f16..c1a1e5ff3fbe 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1246,12 +1246,12 @@ static inline void object_property_flags_init(Objec= tProperty *prop, } =20 ObjectProperty * -object_property_try_add(Object *obj, const char *name, const char *type, - ObjectPropertyAccessor *get, - ObjectPropertyAccessor *set, - ObjectPropertyRelease *release, - ObjectPropertyFlags flags, - void *opaque, Error **errp) +object_property_add_full(Object *obj, const char *name, const char *type, + ObjectPropertyAccessor *get, + ObjectPropertyAccessor *set, + ObjectPropertyRelease *release, + ObjectPropertyFlags flags, + void *opaque, Error **errp) { ObjectProperty *prop; size_t name_len =3D strlen(name); @@ -1265,8 +1265,8 @@ object_property_try_add(Object *obj, const char *name= , const char *type, for (i =3D 0; i < INT16_MAX; ++i) { char *full_name =3D g_strdup_printf("%s[%d]", name_no_array, i= ); =20 - ret =3D object_property_try_add(obj, full_name, type, get, set, - release, flags, opaque, NULL); + ret =3D object_property_add_full(obj, full_name, type, get, se= t, + release, flags, opaque, NULL); g_free(full_name); if (ret) { break; @@ -1305,19 +1305,19 @@ object_property_add(Object *obj, const char *name, = const char *type, ObjectPropertyRelease *release, void *opaque) { - return object_property_try_add(obj, name, type, get, set, release, - 0, opaque, &error_abort); + return object_property_add_full(obj, name, type, get, set, release, + 0, opaque, &error_abort); } =20 ObjectProperty * -object_class_property_try_add(ObjectClass *klass, - const char *name, - const char *type, - ObjectPropertyAccessor *get, - ObjectPropertyAccessor *set, - ObjectPropertyRelease *release, - ObjectPropertyFlags flags, - void *opaque, Error **errp) +object_class_property_add_full(ObjectClass *klass, + const char *name, + const char *type, + ObjectPropertyAccessor *get, + ObjectPropertyAccessor *set, + ObjectPropertyRelease *release, + ObjectPropertyFlags flags, + void *opaque, Error **errp) { ObjectProperty *prop; =20 @@ -1352,8 +1352,8 @@ object_class_property_add(ObjectClass *klass, ObjectPropertyRelease *release, void *opaque) { - return object_class_property_try_add(klass, name, type, get, set, rele= ase, - 0, opaque, &error_abort); + return object_class_property_add_full(klass, name, type, get, set, rel= ease, + 0, opaque, &error_abort); } =20 ObjectProperty *object_property_find(Object *obj, const char *name) @@ -1863,9 +1863,9 @@ object_property_try_add_child(Object *obj, const char= *name, =20 type =3D g_strdup_printf("child<%s>", object_get_typename(child)); =20 - op =3D object_property_try_add(obj, name, type, object_get_child_prope= rty, - NULL, object_finalize_child_property, 0, - child, errp); + op =3D object_property_add_full(obj, name, type, object_get_child_prop= erty, + NULL, object_finalize_child_property, 0, + child, errp); if (!op) { return NULL; } --=20 2.34.1