From nobody Sun Apr 6 22:11:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1735824440; cv=none; d=zohomail.com; s=zohoarc; b=P+g8hdzWO3KXdGWZ5G88zxfGdmtVq6WU4X2p+TyW4FBfFLuxzHVIuNrhI8p84EtvnIidY/SFoPSSQeftcsovw/OU4cPPMNpAxRxkbgqbufSnoVAhX+13CiygORUJ7pl8j05f9PAXRNWD8DDdasL8UNa5Yo2rVi3jrDsUI9GUVrE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1735824440; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=vgI9e/39bBslkdJehrraLuA5jXNi3WzK26wG2QPQYMo=; b=L7WyL8lua0BDlM9ZVEpNAXmRjRXdmyXMVtkF6sOpdEukGCmm5tzkVQ5AdrgpM3oYIXOvXDhbLzZMozibAYE/GuUy54XlISBGZ9eoUn084tuis2cnS/fzvgnA+KVG2HXlCwkmNVKjYHX5P/sG8dW2cSe6urzH8jcCYU9BcpEXUcw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1735824440856375.9780779509481; Thu, 2 Jan 2025 05:27:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTLDp-0006Km-Q0; Thu, 02 Jan 2025 08:26:46 -0500 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 1tTLDj-0006Jp-C7 for qemu-devel@nongnu.org; Thu, 02 Jan 2025 08:26:41 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTLDa-0005Yn-Rp for qemu-devel@nongnu.org; Thu, 02 Jan 2025 08:26:35 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3862b40a6e0so6269510f8f.0 for ; Thu, 02 Jan 2025 05:26:27 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b0145csm488181555e9.15.2025.01.02.05.26.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 02 Jan 2025 05:26:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735824386; x=1736429186; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=vgI9e/39bBslkdJehrraLuA5jXNi3WzK26wG2QPQYMo=; b=y6hbv13op4Pf9SZ9iJBKz7Y3/OD5WSqmmmu3OH65U1R+NmCclOdBgqHf00Lu/haSgQ ozAjVxcCPl47nOh5DO2PLfXtso7PeURZEq0eXLNe0ecCjBquv62HSPT6f+qBkQqQcZ7F 0SFk9b3yG8HsNj47Rf+El1/9glJgL/2AveQp2WeMeMMlGcVYz8CahJL45r/vJhouRdJf 08bpdlVVtDWLYVQwbVYYf2Zk+gJCteZ9dooh16mu+o8qNXbiWRFmfVw/eQyCPb5vCPK0 Lo5cf6hf8Ji5h4kG/cFKWPkZrmHHG1IwnaC3fsRFUg7vxUBkbX/YArG5P6gMVhfSQT7b ymKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735824386; x=1736429186; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vgI9e/39bBslkdJehrraLuA5jXNi3WzK26wG2QPQYMo=; b=eUiB/zVaT4Jmlwbqt10njkhcb63FdEtMoZRa4aGlNiFW5p1xLarRfgjjSZyljlTzGj oJn5P9XdDFgA7FvSfZoC7YP/fZjxAp9pdHwQyHHgO9fKvZDUTbYs4MD1gaOEUSUAhWWh xK9IB55G70OLbhQV61ZyBzZMQQBInKfajapCrRpKx/KUZIPwUHfuIQnV1vxGYXZxPdCz lL3zcHIBbK/xbbLhorobFQNp3dV3G/9JyjlNkIMY+dFnNtcVtqsgiNp5UQACgtx22TQA icU8kyKrFeY1w3lyDXGklPrtjJ9MNrAtTNMHv1EsmAbCfq5RiiAIUi5VjVstEUsAmO4i ozlQ== X-Gm-Message-State: AOJu0YyNdcZLTFgkO5XTYm5yzkFyiEQM8wZkxTy0ct+1druvZBsMkrFP Zo4CpFIm5tIe/ZcfWhPUcAgbW7oseRKHeCi50XWurLJ1/vVQ7iekIbTml5cOhcXNmqQ/J/HrmFT 54tBaXw== X-Gm-Gg: ASbGncv1HEjRJ2Zx+f9qyZRpMzAkvFORTEADmpzY1NKkxBtpxUM3zTwv7JjNFrCyv5S XpGgbJ1JwjtdY+FzbeoK0989QEoIiJft7e0/56X3LR5oduoolYHqenMtiF7LB4ocufW2yQYmQBZ aR4418y2qEgMDmSRQAfIub4gQuX+bviKmX5MF0otUEw4dS4LUTsGHA6GbGNSFWjYkgUydHiKg94 12KF87hcOwMjf7Ysfjyrf1bES7GvZKScDU5YEi9aJc9KmkO7D6HqB9zgtzI7/xJkTmYmc9hbHQh 82laWhbb/8NnYhsEaslO902oxtVT4Ik= X-Google-Smtp-Source: AGHT+IFFlHAAy48r7pdUk5SwGsHetX7vKOCnAuyWqjdP9Dinist6Yq2O+nabB/yaAkLImLCI520hGQ== X-Received: by 2002:a05:6000:1867:b0:385:e105:d884 with SMTP id ffacd0b85a97d-38a223f5be7mr37602432f8f.46.1735824386309; Thu, 02 Jan 2025 05:26:26 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2] hw/misc/vmcoreinfo: Rename VMCOREINFO_DEVICE -> TYPE_VMCOREINFO Date: Thu, 2 Jan 2025 14:26:24 +0100 Message-ID: <20250102132624.53443-1-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 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=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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 @linaro.org) X-ZM-MESSAGEID: 1735824442559019100 Follow the assumed QOM type definition style, prefixing with 'TYPE_', and dropping the '_DEVICE' suffix which doesn't add any value. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- Supersedes: <20241219153857.57450-5-philmd@linaro.org> Since v1: - Drop '_DEVICE' suffix (danpb) --- include/hw/misc/vmcoreinfo.h | 7 +++---- hw/misc/vmcoreinfo.c | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/hw/misc/vmcoreinfo.h b/include/hw/misc/vmcoreinfo.h index 0b7b55d400a..1aa44771632 100644 --- a/include/hw/misc/vmcoreinfo.h +++ b/include/hw/misc/vmcoreinfo.h @@ -16,10 +16,9 @@ #include "standard-headers/linux/qemu_fw_cfg.h" #include "qom/object.h" =20 -#define VMCOREINFO_DEVICE "vmcoreinfo" +#define TYPE_VMCOREINFO "vmcoreinfo" typedef struct VMCoreInfoState VMCoreInfoState; -DECLARE_INSTANCE_CHECKER(VMCoreInfoState, VMCOREINFO, - VMCOREINFO_DEVICE) +DECLARE_INSTANCE_CHECKER(VMCoreInfoState, VMCOREINFO, TYPE_VMCOREINFO) =20 typedef struct fw_cfg_vmcoreinfo FWCfgVMCoreInfo; =20 @@ -33,7 +32,7 @@ struct VMCoreInfoState { /* returns NULL unless there is exactly one device */ static inline VMCoreInfoState *vmcoreinfo_find(void) { - Object *o =3D object_resolve_path_type("", VMCOREINFO_DEVICE, NULL); + Object *o =3D object_resolve_path_type("", TYPE_VMCOREINFO, NULL); =20 return o ? VMCOREINFO(o) : NULL; } diff --git a/hw/misc/vmcoreinfo.c b/hw/misc/vmcoreinfo.c index b1fcc22e92b..145f13a65cf 100644 --- a/hw/misc/vmcoreinfo.c +++ b/hw/misc/vmcoreinfo.c @@ -47,13 +47,13 @@ static void vmcoreinfo_realize(DeviceState *dev, Error = **errp) */ if (!vmcoreinfo_find()) { error_setg(errp, "at most one %s device is permitted", - VMCOREINFO_DEVICE); + TYPE_VMCOREINFO); return; } =20 if (!fw_cfg || !fw_cfg->dma_enabled) { error_setg(errp, "%s device requires fw_cfg with DMA", - VMCOREINFO_DEVICE); + TYPE_VMCOREINFO); return; } =20 @@ -95,7 +95,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, .parent =3D TYPE_DEVICE, .instance_size =3D sizeof(VMCoreInfoState), .class_init =3D vmcoreinfo_device_class_init, --=20 2.47.1