From nobody Sat Nov 15 22:25:02 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=1747211449; cv=none; d=zohomail.com; s=zohoarc; b=Dt5j1syctRCEzY6StFYM1zSjOAWVxxWE6MpK24AV1ndn60p7Ix+85WzTsdanhyvcd10hkZnmTX/QGbUPPlXshJYVlCS09kHWUSFWZVBrneHEEdVjohvstq2nQl+TaiwttJdY3tu/UVabjLrCd9WXuQM+vQMqp9IwGQHrxMO40pc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747211449; 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=4Vw/divwfsJxAYLRuk86uiT+fLmiz943e0JU/gSz6fo=; b=HCOtPq9y7dfx4nI0QKiHNw3D/PA1dI7X4SfdZ3x4fNqcJXceQvEQWm0MEQGaOfawFZov2YU5/AckkdJ2MXvajvsXAUmW5Mhb3YC2DCw1l9kNeD18wQsMlXKefOdfHIYpMaMNJvHuFvHzUR9wt1gnzIP5m+ivJ3CP8nkaUmeHjHM= 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 1747211449486254.54385762355923; Wed, 14 May 2025 01:30:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uF7UE-0006nP-AP; Wed, 14 May 2025 04:29:10 -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 1uF7UA-0006gc-2W; Wed, 14 May 2025 04:29:06 -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 1uF7U7-0006Fs-OC; Wed, 14 May 2025 04:29:05 -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:29:03 -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:59 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747211344; x=1778747344; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1RQexxzH4YFkjxykLnQHXT3NcbCAnyHIN3979LqZumo=; b=Mo8erR1SrJnVLE3e+aK0/W8xcJ5ucWYF7nTquH97P0LzlT+0QP1JGtTh E7Uu3agpBqDuVvQD+8kLI+/I+ak7fU99r/WmOhzJWG5LXIuUjJXvoflv2 vKHkmYhacs5EGWhy8jy5qgHKKok1oiwtNHcOsiHynfPWnbPZKEjKV/H4U FZgMxc0IfDsga9CpOtu3lhWIl3Z30Z8hjA5DxHOTkpZyQ+QfEiaS3zDEJ yg4FqxA6Xd/4WAtIxGs7rWZemtO4w7NGwRKtEXRlovnx8DCULRGY5alnK WLe15hTRVhgF/bp8MHyz2qc10cmAfHPMwXurn7hExRn1Y4fZNy48lYP9J A==; X-CSE-ConnectionGUID: oZNOczmxQzm80Wlk2jVdlw== X-CSE-MsgGUID: QXuca8NnTSi04U0Io+ZI5g== X-IronPort-AV: E=McAfee;i="6700,10204,11432"; a="66505583" X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="66505583" X-CSE-ConnectionGUID: 7KGGgSw0QuG2Ewmiw+SMMg== X-CSE-MsgGUID: Q3ohJwzCRS6s+i2xXecPpg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,287,1739865600"; d="scan'208";a="169065821" 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 , Yoshinori Sato , Magnus Damm , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH 4/9] hw/char/sh_serial: Consolidate OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES Date: Wed, 14 May 2025 16:49:52 +0800 Message-Id: <20250514084957.2221975-5-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: 1747211453529116600 The QOM type of SHSerialState is declared by OBJECT_DECLARE_SIMPLE_TYPE, which means it doesn't need the class! Therefore, use OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES to implement the type, then there's no need for class definition. Cc: Yoshinori Sato Cc: Magnus Damm Cc: "Marc-Andr=C3=A9 Lureau" Cc: Paolo Bonzini Signed-off-by: Zhao Liu --- hw/char/sh_serial.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c index 6abd80386fb4..8ccc2234ba4d 100644 --- a/hw/char/sh_serial.c +++ b/hw/char/sh_serial.c @@ -78,9 +78,7 @@ struct SHSerialState { qemu_irq bri; }; =20 -typedef struct {} SHSerialStateClass; - -OBJECT_DEFINE_TYPE(SHSerialState, sh_serial, SH_SERIAL, SYS_BUS_DEVICE) +OBJECT_DEFINE_SIMPLE_TYPE(SHSerialState, sh_serial, SH_SERIAL, SYS_BUS_DEV= ICE) =20 static void sh_serial_clear_fifo(SHSerialState *s) { --=20 2.34.1