From nobody Tue Dec 24 14:11:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1734622780377472.4566447306787; Thu, 19 Dec 2024 07:39:40 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 48758176E; Thu, 19 Dec 2024 10:39:39 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 64F0316DE; Thu, 19 Dec 2024 10:39:21 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 6CA97169C; Thu, 19 Dec 2024 10:39:17 -0500 (EST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 5685C1758 for ; Thu, 19 Dec 2024 10:39:08 -0500 (EST) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4361f65ca01so9381715e9.1 for ; Thu, 19 Dec 2024 07:39:08 -0800 (PST) Received: from localhost.localdomain ([78.196.4.158]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b4471bsm55020455e9.44.2024.12.19.07.39.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Dec 2024 07:39:06 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734622747; x=1735227547; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fVQZDG1ZHCW9mRIskC0RqnL4zCyCfhO/N0NweSAMjGE=; b=f3fdrFlzpXEdPc0URaFmQOrEUF+QKsu6NPB92GwObgtciKorwNwsKpXLc8xg2PlGqR RCqBhxjcKme6rqiu1d/P0SS+D4qlq8kCW3zSc0O/ZS6Swb0G4IYUDnq9kRqKvAP3jICO zskhlt/HznJHlSXLlBrj0kRcaJnVxZfnNWpn57gtjW4oegj0tts3Sq/hEQgMg8yJdxZQ EjCCkyUvCw42oOmyh2WTtccmdJvSaUrUbNv5wrYimFJ4k2OFY9yzpgvokoszj2GINI3Y 6vprEupO1RYxcbdi1OeV1jDNzm/wVb7xUmhkBGIFkO+IMjK94FagJpQz379KINM8DiTO ESOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734622747; x=1735227547; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fVQZDG1ZHCW9mRIskC0RqnL4zCyCfhO/N0NweSAMjGE=; b=WSuCCvXG6gAo38889asnkWkVKiuG9HmZnfx9zJJkqWRq3uYdFqMdoNZA8/SCCaiE7h wHgLa2EBJFWBqyqBvxmWqr0W2OsQQ4KYLeGzjDT8DYuoohNisXMTQxlJ9Pyn3TygumoM oYAk/RiXcDqTnPpd3TPfEiyXids5FYgM95FKyJzfIa9lUkiH6ymYMylTFympMTXpe9vg cfCbxsnWkfle9if94YexS8wLtFTAiztZfzVUNAmYr0Drz3M7++Eqze7JFq+Ce8Z6/q08 UHaZlE4LJuErvXZv9byVHBvlqTqjmXZeVqMVwPXKUOek90UihTaOZnGOfLolCISe/kJw L++g== X-Forwarded-Encrypted: i=1; AJvYcCXH5Ww6UPXR1nh0Dq8c3z48IojVT82dciV8TmLCpGwFg2+q94Hi8eaizRtcwmICxkj2vD6shg==@lists.libvirt.org X-Gm-Message-State: AOJu0Yw9aQsTljODrJQw6Z1HQjlRmMPfVDsOjcFqLsXDa5EBYpwTijiw LfeQ1XGOjxYYchnWSxPaw8xMUeETmC9nwXN1YxpXQf4rHhplp+kZkAq9IcAg6JI= X-Gm-Gg: ASbGncuGbrjpSVqZdPiYGijRE1oq4dZeM0F+ulZ3oMeHCbpsDSd+o5aYiAULBkVGxP6 ksEJa5GSB4/rl+1fkhDJAqQeR8IiaNONx6vk3mVzf3Lv8IjX3In+68xKTBs2dn1H7rzgnsUy+AH hgV4wpxfoeGp89w2kGZs9XMPRu/x7xFNlob5v/YVpG0JCVTSKK0b28hDos/6bcllBEAjyFdWwvt Fcxev+KuzQ3sLBL36N0hzdrSnOw4SjW2Ck69YcnK9sYMMWHElUjfGujkTOcD4DbQssGDE3mu6a/ uD/r X-Google-Smtp-Source: AGHT+IE0ik88WSPrybKNxmPFssnUymLVzqFaMef4QHNfzZMSCJWXCCcqZjlj8Xe8OiJCq3TvE9ux7Q== X-Received: by 2002:a05:600c:4587:b0:435:fa90:f19f with SMTP id 5b1f17b1804b1-4365535b6eemr72094315e9.12.1734622747207; Thu, 19 Dec 2024 07:39:07 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH 01/10] hw/misc/vmcoreinfo: Declare QOM type using DEFINE_TYPES macro Date: Thu, 19 Dec 2024 16:38:48 +0100 Message-ID: <20241219153857.57450-2-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219153857.57450-1-philmd@linaro.org> References: <20241219153857.57450-1-philmd@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: TCBVLEP5STHYEVFNIMXKIULNQBTR52XV X-Message-ID-Hash: TCBVLEP5STHYEVFNIMXKIULNQBTR52XV X-MailFrom: philmd@linaro.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: Ani Sinha , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , devel@lists.libvirt.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1734622781294116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 --- hw/misc/vmcoreinfo.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/hw/misc/vmcoreinfo.c b/hw/misc/vmcoreinfo.c index 833773ade52..84b211e9117 100644 --- a/hw/misc/vmcoreinfo.c +++ b/hw/misc/vmcoreinfo.c @@ -93,16 +93,13 @@ static void vmcoreinfo_device_class_init(ObjectClass *k= lass, void *data) set_bit(DEVICE_CATEGORY_MISC, dc->categories); } =20 -static const TypeInfo vmcoreinfo_device_info =3D { - .name =3D VMCOREINFO_DEVICE, - .parent =3D TYPE_DEVICE, - .instance_size =3D sizeof(VMCoreInfoState), - .class_init =3D vmcoreinfo_device_class_init, +static const TypeInfo vmcoreinfo_types[] =3D { + { + .name =3D VMCOREINFO_DEVICE, + .parent =3D TYPE_DEVICE, + .instance_size =3D sizeof(VMCoreInfoState), + .class_init =3D vmcoreinfo_device_class_init, + } }; =20 -static void vmcoreinfo_register_types(void) -{ - type_register_static(&vmcoreinfo_device_info); -} - -type_init(vmcoreinfo_register_types) +DEFINE_TYPES(vmcoreinfo_types) --=20 2.47.1