From patchwork Sun Jan 12 22:16:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 856787 Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:385:e875:8a9e with SMTP id k28csp1179211wrc; Sun, 12 Jan 2025 14:22:51 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXDYeIIISDoSQ2i+cEorNfHpWtwgaiUbn9XMmuUDR2h3j2uppUhGR6YEKiVBtFWNes6TFFz1w==@linaro.org X-Google-Smtp-Source: AGHT+IFd64upQcH80HZdFLEg4LzOJMnZd/V2vkbrTqJNjFiUc3ye0PrP+62heIWeaukZT5AVI+qj X-Received: by 2002:ac8:5f95:0:b0:467:6c5f:95c0 with SMTP id d75a77b69052e-46c70fd39e7mr227924721cf.7.1736720571407; Sun, 12 Jan 2025 14:22:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736720571; cv=none; d=google.com; s=arc-20240605; b=PjcaxFrTvJUFKY9VyEaFjLd57Y5788lfezT06Scg+S6qp7wobw73IqADUFwfEpiqsi uwS5S/dbEStnlo9L5TgEyt8M6eqmFsCouFCakgtfLglgjqp9oJtNHSSz0usZLEDrbSK4 4okGRQR8FsqSTGJBdnLeaL5o+4X7gYp3js4LUO+2IzBmo9uFGidCBRWzqf0hBJpNXtHK s3c+6knO84smccSaN9cTB9Dlc1iqWsiX4X8TbzmiuP8vDndeAySGzjrQs7DbxMqQJ964 DJ9E1/Gxv7r4tkjB/3G63ivq2JmgaqUGEB5dQq2iCKXqvTjY7WZF6879KG6Y5lZNBsrr l54Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kHYhV6C4zvi9bV3gw8In1CJAbx66/tuqvnD3Exk/IRE=; fh=3ZhHYSdHB65ls2ZcnTp+lX22kRJBIiwsLNglHqUd64c=; b=SX2UTKo6QAQrofsWsnLVddGG0F+h3Rfjwo5D8OWYlXT6KPaiX49ZwBIaSwj7IKI5Er JXK8xnpkHPR77ZwPGct+nYvd0jRJvEPDC4I6dajWNWe2pUni20fcvqdPLsr/PHRNXPM9 VFHDt9dewiJEVYN5kR+2oFwTZzE5h8ksY3kqvDhpwx3xC13dTOeEp/nTxQC+1jRw/F5k sjmfUEftG9NgAeFpB7bHK3DDiL8RavGCrdNuuqKvyQOCSQSsZF579AeRndvWVd5lX8S9 zWBAUg5Ze7zM44EGcBIrtJ1fV1w+MXNSVN+jkO7maZ2JeDhEZqJhIgYJdzuIIDg7azOT RBjw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BTkSB3yD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46c8734effbsi74206591cf.181.2025.01.12.14.22.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Jan 2025 14:22:51 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BTkSB3yD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tX6JI-0002Tn-DT; Sun, 12 Jan 2025 17:19:57 -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 1tX6In-0001Pk-Mt for qemu-devel@nongnu.org; Sun, 12 Jan 2025 17:19:28 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tX6Ii-0006Ws-8c for qemu-devel@nongnu.org; Sun, 12 Jan 2025 17:19:22 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-385e3621518so1913029f8f.1 for ; Sun, 12 Jan 2025 14:19:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736720358; x=1737325158; darn=nongnu.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=kHYhV6C4zvi9bV3gw8In1CJAbx66/tuqvnD3Exk/IRE=; b=BTkSB3yDGhN02LKeVGCMq17rJaV61mtjQvr9mnCntm50X1K5t3Y/eiDgualPRAPSqW L43ipEpxyRFw2nY0M8PKEe2Z57DfiCDBdRHH9GLiUKaTqWz3TkhbAZct4sy3sZTrzsK8 5ptygU1YAKuOFTpDwmfWhozhEXln19uvojO2xSO1lB4uRUjmpxlqBa9UYJezZZUBCtbo 1EiLnvVf9ViySqi3hBOw72apewD9NdFW/B8n6E0usZDs4ZU2+eWNteDHEwtLc0LmoU7f b1yuSl3XAvYJ8XWzcGJGYMiWIhae+3HmhlFPcy6kb30PPQvO1FK9AmPlO6AQPAZ3fKOg x20A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736720358; x=1737325158; 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=kHYhV6C4zvi9bV3gw8In1CJAbx66/tuqvnD3Exk/IRE=; b=oWOuWpHtJwlojgs2ZS49oAUPxDiOEArAPIcE6KfSv3PhwbDmlm9If2tZOjZDdH30UC dZlaCvcURLmkn2zsf4HgQLWc60m6RBLDZXlPvckNR6CRhTXfwlhxylDU6v57vOJXLtGW 2QRbOLq/gP9TB/CJO77inlwp+IOQKHvJyQeZ+9O58GGY1ofnpresGCvTgwOTI6iXlyQm EHOhprcSu0VO3gbUojVW8qLQ7pERQ/1UDLMF/eRMULuWNWDmDwcJc71SGNmgYcjBQTWG 3zJBaBr2lMJQYyT41EICsxlPgde8hAjaq79XlEOzMECjpleHrGxpxPIMfw6h/6bFSSag L9mQ== X-Gm-Message-State: AOJu0YzPPWR+ZSXEvl5qQkeclPlodfRd/fKWBpPlKfO7FgSjD5umX3lc hnGylFHenV395tNtQ3QUmjfg3v34ZCRbgRaftlm8PKaIvz1iOawI+2uVmsmUDIQxVo01MJb5lC+ Fyks= X-Gm-Gg: ASbGncsrpunMQZpqzh0AfNDGANbXV6Q+rK9aKAdlS8KaCPs0x6BWiuSeVKEeMWgdNCc FoltQbMVQvp5vIPC/KLqFi05MM5P2px0JvY2HYCh6lFDE7Q9F7lMccFpxZ+AuhITUEsiRK0sDZ1 haVwXQz4qVOxiLunwyThSjrLCYzTIgCfT4pO1ndi+m+aqmAgN7UCeUrPLE5PsmKFktoaDCdPBod Lhcq5sVSyNYmvhUZICu4Xq+Mts7uNK2BOi6YmUhEqIIvIKFthcH98q/rD6zae62HxGXYeCPBFGD 0XUgrOizdg5u8Rx0n5WRV7aac+o1X6I= X-Received: by 2002:a05:6000:2a3:b0:386:4a0d:bb21 with SMTP id ffacd0b85a97d-38a8730a11emr16529015f8f.22.1736720358331; Sun, 12 Jan 2025 14:19:18 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e38428bsm10610306f8f.37.2025.01.12.14.19.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 12 Jan 2025 14:19:17 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?M?= =?utf-8?q?arc-Andr=C3=A9_Lureau?= Subject: [PULL 22/49] hw/misc/vmcoreinfo: Rename VMCOREINFO_DEVICE -> TYPE_VMCOREINFO Date: Sun, 12 Jan 2025 23:16:58 +0100 Message-ID: <20250112221726.30206-23-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250112221726.30206-1-philmd@linaro.org> References: <20250112221726.30206-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Reviewed-by: Marc-André Lureau Message-Id: <20250102132624.53443-1-philmd@linaro.org> --- 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" -#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) typedef struct fw_cfg_vmcoreinfo FWCfgVMCoreInfo; @@ -33,7 +32,7 @@ struct VMCoreInfoState { /* returns NULL unless there is exactly one device */ static inline VMCoreInfoState *vmcoreinfo_find(void) { - Object *o = object_resolve_path_type("", VMCOREINFO_DEVICE, NULL); + Object *o = object_resolve_path_type("", TYPE_VMCOREINFO, NULL); 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; } if (!fw_cfg || !fw_cfg->dma_enabled) { error_setg(errp, "%s device requires fw_cfg with DMA", - VMCOREINFO_DEVICE); + TYPE_VMCOREINFO); return; } @@ -95,7 +95,7 @@ static void vmcoreinfo_device_class_init(ObjectClass *klass, void *data) static const TypeInfo vmcoreinfo_types[] = { { - .name = VMCOREINFO_DEVICE, + .name = TYPE_VMCOREINFO, .parent = TYPE_DEVICE, .instance_size = sizeof(VMCoreInfoState), .class_init = vmcoreinfo_device_class_init,