From nobody Sun Dec 22 06:44:08 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 1734622850300886.8910939091538; Thu, 19 Dec 2024 07:40:50 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 4733417BD; Thu, 19 Dec 2024 10:40:49 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 352D21502; Thu, 19 Dec 2024 10:39:41 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 284B716F2; Thu, 19 Dec 2024 10:39:36 -0500 (EST) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 D891216F2 for ; Thu, 19 Dec 2024 10:39:24 -0500 (EST) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-43625c4a50dso6878925e9.0 for ; Thu, 19 Dec 2024 07:39:24 -0800 (PST) Received: from localhost.localdomain ([78.196.4.158]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436604e9c2csm22880975e9.43.2024.12.19.07.39.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Dec 2024 07:39:23 -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=1734622764; x=1735227564; 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=ltkM6wv4nnewbtt7Wl7DzeFeRkwimvs0bnn2crm+6CQ=; b=G7M4l7jNcbqXbVd8DfuDmVfrLbjBYbvvU0aTBsDVTwbnSBAR8wzJh2/+QBgVFC9d5P GU+elF9G2Hl0k9r2raCBg+Q7r9UisdWuQQ8SOfEMpvTKvT/lc8Cb0Hsu47LBYuamlsjL XIqCvKUrvumH9tOTatwFSvkTQASDYY0kMKqCNWU26CnDK/M8kq9HF0IgO/hxOrvKE0Za 9sDTnyZhAr75jhngLiAgA9q2/1zwkwoxeKCCxTf0uKBmTPGA2FuxGbqziuXeqPwqNxKF PqdF4wUH79g9Pmfp+7lavNvIuoRp8dB0UrO/u7QAJ7J+BAXMQG9pzWGUZfJX75AqwH/4 tUyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734622764; x=1735227564; 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=ltkM6wv4nnewbtt7Wl7DzeFeRkwimvs0bnn2crm+6CQ=; b=e59v4Bo9I+4q1ROQ8RBNua8Exj+aca3eqg0fgGeaJwTV8gB/0zYMbcxOxJ/p3ql/hL jnxvEXZbsFk/FW/2Erd0gPL5hpK4+8N24UaiWaWF0Scu++7ExGk45VKeUEyihuiIA9HT gO+vmI2qtBV8KTdmF3ZivN4+W52tLPSBtXdfEZ/IA94lpeoP6xYIZqReIrzLBPGKNRh3 1v8b/qOwPRNa4Yjv2XAa8UG98QxlLkB/6XoHBtF0DKmXsYLS0hOLrLYApgbYg8kVRTd1 /nP/DBL5+/68NU3U1NwUDmloCMe2hJ2UY1DPFaHFmzBrys6gOHOtfrfY08gBgGpPOldH R69w== X-Forwarded-Encrypted: i=1; AJvYcCX4/Kl0+ZMtbzNXMJ21l4W7rq8138HL37fTti0mkEz0oF5Mp2zHZIhnZER4mpV72JfQzFLhnw==@lists.libvirt.org X-Gm-Message-State: AOJu0YwPRi1rEgKvBG2zk0zhPcgDwesZkCknbC8B5rsiC22hqXq4cu2p 2cbpPW3yoCecxAxIbCbqtQR5l/BLVp0C4GIWC2NedyUhxjFrtz9lvDYOpg85pF0= X-Gm-Gg: ASbGncviKllbJTaRuh9lvvthGV1v7wzfDnWVbGglW+Khxp1ZK2pNMOH5hrw8UcTU9y3 7y84NrY4Zu7Hb06uWkcZ3KW0pFpPV67krVIzcJtyMhtwnbJSbjLvLDzJ4X8Bv1UTR3mz6hKHsHn 7VHlK6Ppb4+QZsWVXD2W7pXmNi+CNyfW0OOxu1hGztoIxhUb9/OnSRKsVb4Z/RNHnlupPoY7h1x zU7vW9ZOqxJUafuyYJTtWxNa+3gwCUbYc2jJ11FdtpVFv/07mtnVrQWgi7woZGBByNqgt6/hHAT SRtK X-Google-Smtp-Source: AGHT+IHqT2aqNU6znhJmAnu6BPD6sDUBEfCZ/4rUkgoJAGrbRO4KYM8P8HUa1iOsstTrLxK5eACAcw== X-Received: by 2002:a05:600c:4586:b0:436:1c04:aa9a with SMTP id 5b1f17b1804b1-43655370395mr72815995e9.14.1734622763724; Thu, 19 Dec 2024 07:39:23 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH 04/10] hw/misc/vmcoreinfo: Rename VMCOREINFO_DEVICE -> TYPE_VMCOREINFO_DEVICE Date: Thu, 19 Dec 2024 16:38:51 +0100 Message-ID: <20241219153857.57450-5-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: ELOD2PKGCCSI5VQHRAMKS2CHID3CYDV3 X-Message-ID-Hash: ELOD2PKGCCSI5VQHRAMKS2CHID3CYDV3 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: 1734622851644116600 Content-Type: text/plain; charset="utf-8" Follow the assumed QOM type definition style, prefixing with 'TYPE_'. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/misc/vmcoreinfo.h | 6 +++--- hw/misc/vmcoreinfo.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/hw/misc/vmcoreinfo.h b/include/hw/misc/vmcoreinfo.h index da1066d540c..122c69686b0 100644 --- a/include/hw/misc/vmcoreinfo.h +++ b/include/hw/misc/vmcoreinfo.h @@ -16,10 +16,10 @@ #include "standard-headers/linux/qemu_fw_cfg.h" #include "qom/object.h" =20 -#define VMCOREINFO_DEVICE "vmcoreinfo" +#define TYPE_VMCOREINFO_DEVICE "vmcoreinfo" typedef struct VMCoreInfoState VMCoreInfoState; -DECLARE_INSTANCE_CHECKER(VMCoreInfoState, VMCOREINFO, - VMCOREINFO_DEVICE) +DECLARE_INSTANCE_CHECKER(VMCoreInfoState, VMCOREINFO_DEVICE, + TYPE_VMCOREINFO_DEVICE) =20 typedef struct fw_cfg_vmcoreinfo FWCfgVMCoreInfo; =20 diff --git a/hw/misc/vmcoreinfo.c b/hw/misc/vmcoreinfo.c index c5bb5c9fa52..9822615cfed 100644 --- a/hw/misc/vmcoreinfo.c +++ b/hw/misc/vmcoreinfo.c @@ -37,7 +37,7 @@ static void vmcoreinfo_reset(void *opaque) =20 static void vmcoreinfo_realize(DeviceState *dev, Error **errp) { - VMCoreInfoState *s =3D VMCOREINFO(dev); + VMCoreInfoState *s =3D VMCOREINFO_DEVICE(dev); FWCfgState *fw_cfg =3D fw_cfg_find(); /* for gdb script dump-guest-memory.py */ static VMCoreInfoState * volatile vmcoreinfo_state G_GNUC_UNUSED; @@ -48,13 +48,13 @@ static void vmcoreinfo_realize(DeviceState *dev, Error = **errp) */ if (!vmcoreinfo_find()) { error_setg(errp, "at most one %s instance is permitted", - VMCOREINFO_DEVICE); + TYPE_VMCOREINFO_DEVICE); return; } =20 if (!fw_cfg || !fw_cfg->dma_enabled) { error_setg(errp, "%s device requires fw_cfg with DMA", - VMCOREINFO_DEVICE); + TYPE_VMCOREINFO_DEVICE); return; } =20 @@ -96,7 +96,7 @@ static void vmcoreinfo_device_class_init(ObjectClass *kla= ss, void *data) =20 static const TypeInfo vmcoreinfo_types[] =3D { { - .name =3D VMCOREINFO_DEVICE, + .name =3D TYPE_VMCOREINFO_DEVICE, .parent =3D TYPE_DEVICE, .instance_size =3D sizeof(VMCoreInfoState), .class_init =3D vmcoreinfo_device_class_init, --=20 2.47.1