From nobody Sat Nov 15 22:25:03 2025 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=1747211388; cv=none; d=zohomail.com; s=zohoarc; b=J3jBC3tp6M9GUKW5rlnZMLQ4/mqfRbs5P70r/Ddqhc42NZsw7W9D4EsU8Mq4HlJsBk4T7GOdhbuQZILiicOa7ahnVSe43X3IZBnfT6O+/4NKjMHDTvltKx82Nf1QZkv3NRPwPDEaVEFQYP5DSyWO5WalXuNb9IhqsfXNHE9E59w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747211388; h=Content-Type: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=Tq1no4zLUXdoN946mvZQOg7mW5BofsuZu3/728V7b3Q=; b=E8nezZIQG62NJqDRfB1akMEbYqDrCTFGBbhbQikvDzV+ZSMds/RN88iH/YLlLUr8WKJQNptVc43yaEbQ7/d33UtpGR2fnYcfasB9f1BwSchS2WqUylURQjPpqs9dXTf0QZFGNH7P9c7sjnG7oC9ao1BWrG+Afnos2dPEQQThrkI= 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 1747211387979456.4331167413585; Wed, 14 May 2025 01:29:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uF7U9-0006f4-Gy; Wed, 14 May 2025 04:29:05 -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 1uF7U6-0006XB-5d; Wed, 14 May 2025 04:29:02 -0400 Received: from mgamail.intel.com ([198.175.65.10]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uF7U4-0006Fs-9b; Wed, 14 May 2025 04:29:01 -0400 Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2025 01:28:57 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by fmviesa001.fm.intel.com with ESMTP; 14 May 2025 01:28:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747211340; x=1778747340; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FdOAj36KJleXLSX45p4llvGBDxu8kaQ/Flsl3wc8shs=; b=iLrHonJUpnw3kw7EY9b7kSHsgLmcRwFMdkFRWeFLWn6UzwtBwXuwUvJz mLp8hFYmyDkuEYeWEoqJGgdoPKNuEewBiHgYJC/5x+LJPYOxr68zlPlTI QlAEQP7GBrPBnUFNCOmX180PjvJVY98o/iSsfQryZfqjWxrWk7S3dxB0W /d/KDsoN9dEryNA9wvQUTMwGGGC10PqYsY/rJbWV9Pn7RQGgNueN7I7MZ V4c60IM5JUnrgXAGJINr1HG626tFGM4Fqc79Qs3PeUhtP9gyyd4aCHqP+ riZBxRjAqguYhC62op8XmgJSBZ0HbQGkJpgE8LIsGpV33D/0s2w9RPHC7 Q==; X-CSE-ConnectionGUID: +6YZbp5OTtqtf39B9lBKqw== X-CSE-MsgGUID: QJEqJfR3T1Wl/Lc/6TcA/Q== X-IronPort-AV: E=McAfee;i="6700,10204,11432"; a="66505568" X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="66505568" X-CSE-ConnectionGUID: hYjjzZBxQmu2mNLdCbMYEw== X-CSE-MsgGUID: sqcoE+Y6RqGv6+Je+l2zPA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="169065806" From: Zhao Liu To: Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Zhao Liu Subject: [PATCH 1/9] qom/object: Improve the doc of macros related with simple type Date: Wed, 14 May 2025 16:49:49 +0800 Message-Id: <20250514084957.2221975-2-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250514084957.2221975-1-zhao1.liu@intel.com> References: <20250514084957.2221975-1-zhao1.liu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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.10; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -58 X-Spam_score: -5.9 X-Spam_bar: ----- X-Spam_report: (-5.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.549, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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: 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: 1747211390010019000 There're 2 changes: - For OBJECT_DECLARE_SIMPLE_TYPE: Since a clase may not only has virtual method, but also field, thus mention when class is not needed for either, then there is no need to have the class. - For OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES: And the words like OBJECT_DEFINE_SIMPLE_TYPE about when the type is declared by OBJECT_DECLARE_SIMPLE_TYPE, then user should consider to define the type via OBJECT_DEFINE_SIMPLE_TYPE or OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES. Cc: Paolo Bonzini Cc: "Daniel P. Berrang=C3=A9" Cc: Eduardo Habkost Signed-off-by: Zhao Liu --- include/qom/object.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index 1d5b03372429..14f84ae454d3 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -249,7 +249,7 @@ struct Object * declared. * * This macro should be used unless the class struct needs to have - * virtual methods declared. + * virtual methods or fields declared. */ #define OBJECT_DECLARE_SIMPLE_TYPE(InstanceType, MODULE_OBJ_NAME) \ typedef struct InstanceType InstanceType; \ @@ -402,7 +402,8 @@ struct Object * * This is a variant of OBJECT_DEFINE_TYPE_EXTENDED, which is suitable for * the case of a non-abstract type, with interfaces, and with no requireme= nt - * for a class struct. + * for a class struct. If you declared your type with OBJECT_DECLARE_SIMPL= E_TYPE + * then this is probably the right choice for defining it. */ #define OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES(ModuleObjName, \ module_obj_name, \ --=20 2.34.1