From nobody Tue Dec 24 13:13:27 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 1734622800525337.6559124145607; Thu, 19 Dec 2024 07:40:00 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 82817176D; Thu, 19 Dec 2024 10:39:59 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 25D8B16FD; Thu, 19 Dec 2024 10:39:26 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id B7D371705; Thu, 19 Dec 2024 10:39:21 -0500 (EST) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 BC2C51705 for ; Thu, 19 Dec 2024 10:39:13 -0500 (EST) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-434b3e32e9dso10587015e9.2 for ; Thu, 19 Dec 2024 07:39:13 -0800 (PST) Received: from localhost.localdomain ([78.196.4.158]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c6ad3e3sm1905007f8f.0.2024.12.19.07.39.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Dec 2024 07:39:12 -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=1734622752; x=1735227552; 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=9A6H1EuKRU8oSMUlfiyYQGgNe/t50Uq0zCTd6hbC9F8=; b=b+ZxRQhjTWe9guqinap7ZyJLRl6wOGoZYyXST1VXGjRlAhK1CakHtffM9GntAEpUCW R0CXc0We3sw94Vw2zQlDwlHGnkfre6KIx3sTti2h1IHUKYVjZM19so8koM+KYsdm9azf xqENcxyZXy++lnyw9aYj/0Mx/qA+APSKJkMfSEK4ZKzdRKbbDlEVc8QPJwQGYm42lj5c 2AKtQ5hr9vdWK6EBWdDNz4Oi4c4V0k6JTC1j4utUVFdPOUCH3hxCaAUSDp6Scd9SfuK8 LRi2plCHs14W530lxXe5YAJiEr1yua3SPuaYv5qxsioy0jxIf9xQQiWnsShQvxa2pp/a ImFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734622752; x=1735227552; 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=9A6H1EuKRU8oSMUlfiyYQGgNe/t50Uq0zCTd6hbC9F8=; b=KZCy1sM5/ptVhz9b1O15eAbN/R+dGhs+LDubaLJqODBiYNygwngnELE7GdGhs8Kxza NunjKh2CmwvCkDoQ+GuPIqc90TIXihVikKl/Gge3lTOC3i3/rwFtdmZ8zMWXymAwsX8N GVNacm7EL37u7QBrnU5ddtdZ0CJPSaQ4KIney5usLmCmfps+bPgZl/CcgRsP6hNDUp32 /yjCgtZNsvy90TIO8YJ9Nv+DglvKrUV3RJGIBKtHIv2suOaMFUrU6rYS4ZGnrGh2Kp6R MeuhACn7xJxU5kbkmBtxHEj2YDMGLgx4uNLTHrpiBDzNkz08hJQQk4UZaB3mwMwm6F8O QQMQ== X-Forwarded-Encrypted: i=1; AJvYcCUVxIg0eN2UtN07oEbjzb+teHKlfQ7DxGfQDWFhvEg+mD5gB9GzyWTCWYZHsOAWloXMN/vwPg==@lists.libvirt.org X-Gm-Message-State: AOJu0YwCa2L+GFIVRYSkXKP0h5nqGn39JztfzM1XKMiisTXLcMBa/9jo UgIKAXbCyrefe9V2f4wJ0zH/bq4KdpzmLWtB2g0UiXoezX5k5QN0zveHaD4YhYlSVMlLhnTmVZq 8 X-Gm-Gg: ASbGncvPYpBYpX0NBTC74rKQwx+DhNrU8eytnT4sAwKboVh5jnwqikWhzyRQze411GF jj6XJOnxWmb0Bev+XAt8S83YvQom/IeDSjKx1IRZq3IT3KXm5iuDnR/uwkPOA37ckID+C7IbxY4 xhUlp7boT4hJyUO8bzTl0327cjKGxGkvKJk0GLokz4eUddYhOXnsbgS+FDojUMwj1QPhKl++Ky7 tp1mxppPTO34ayhJnVUkfN4TUK0fMVkfo9IRzab/luIvLbb0y22THIib6+FzCCNFNB1BGzsPn/Y Pet3 X-Google-Smtp-Source: AGHT+IFzKBxvfmjWrlDelJBTG6nU9L+vDm54/jGMynxANDubLsuJTCkj8kZajXzdEoQ9aYX5XIGr1w== X-Received: by 2002:a05:6000:1faa:b0:385:f1bc:765c with SMTP id ffacd0b85a97d-388e4d2f7bbmr7033755f8f.6.1734622752611; Thu, 19 Dec 2024 07:39:12 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH 02/10] hw/misc/vmcoreinfo: Rename opaque pointer as 'opaque' Date: Thu, 19 Dec 2024 16:38:49 +0100 Message-ID: <20241219153857.57450-3-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: GJYB5EDNII7RM3GD3I6DTLQAIUVQ2TUJ X-Message-ID-Hash: GJYB5EDNII7RM3GD3I6DTLQAIUVQ2TUJ 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: 1734622801331116600 Content-Type: text/plain; charset="utf-8" Both QEMUResetHandler and FWCfgWriteCallback take an opaque pointer argument, no need to cast. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 --- hw/misc/vmcoreinfo.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/misc/vmcoreinfo.c b/hw/misc/vmcoreinfo.c index 84b211e9117..ad5a4dec596 100644 --- a/hw/misc/vmcoreinfo.c +++ b/hw/misc/vmcoreinfo.c @@ -18,17 +18,17 @@ #include "migration/vmstate.h" #include "hw/misc/vmcoreinfo.h" =20 -static void fw_cfg_vmci_write(void *dev, off_t offset, size_t len) +static void fw_cfg_vmci_write(void *opaque, off_t offset, size_t len) { - VMCoreInfoState *s =3D VMCOREINFO(dev); + VMCoreInfoState *s =3D opaque; =20 s->has_vmcoreinfo =3D offset =3D=3D 0 && len =3D=3D sizeof(s->vmcorein= fo) && s->vmcoreinfo.guest_format !=3D FW_CFG_VMCOREINFO_FORMAT_NONE; } =20 -static void vmcoreinfo_reset(void *dev) +static void vmcoreinfo_reset(void *opaque) { - VMCoreInfoState *s =3D VMCOREINFO(dev); + VMCoreInfoState *s =3D opaque; =20 s->has_vmcoreinfo =3D false; memset(&s->vmcoreinfo, 0, sizeof(s->vmcoreinfo)); @@ -65,7 +65,7 @@ static void vmcoreinfo_realize(DeviceState *dev, Error **= errp) * This device requires to register a global reset because it is * not plugged to a bus (which, as its QOM parent, would reset it). */ - qemu_register_reset(vmcoreinfo_reset, dev); + qemu_register_reset(vmcoreinfo_reset, s); vmcoreinfo_state =3D s; } =20 --=20 2.47.1