From nobody Wed Oct 23 01:30:38 2024 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1728157684; cv=none; d=zohomail.com; s=zohoarc; b=NTkhoBP+OYUxtpv7b9djbeSmV1CRKrKXH8ViVBluMxZiuI8vMKuv4GKtdEIc4KB025WpaZRKm2kj871cnyXLDBDnSVS7X/AA1G8uWckeN01DgBJHkELEF2kml88Y7Dq8IjD8CcZM3/K3AyzG/iVNJLYHMdaxkJ86G8446iMbroQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728157684; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=rIGcIV5oEe21ffMfXv8dxIlxwIuJMnLBjp2bLHMXYyE=; b=f/maiq2dkytNrAq1qrdIguXI6d9eTzpKwxSUveOTfePKY/7eN9pLW4ASPmGRb58SDc0WwQASjUsCZu+f/I0ApgQgKLanmrFwHDpTvpKsPOEzv8GQlZ7uYbsx5Wt99T6WXJyT3FwkoVCN9yjGbhH075e2myd/gypZ7oEyZHPtJIM= 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 1728157684732556.2330293450642; Sat, 5 Oct 2024 12:48:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sxAkU-0005Zz-0N; Sat, 05 Oct 2024 15:47:30 -0400 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 1sxAkG-0005Ol-Cs; Sat, 05 Oct 2024 15:47:18 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sxAkE-0007gs-Tj; Sat, 05 Oct 2024 15:47:16 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-42cb60aff1eso30988975e9.0; Sat, 05 Oct 2024 12:47:13 -0700 (PDT) Received: from archlinux.. (pd95ed790.dip0.t-ipconnect.de. [217.94.215.144]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42f86a0afc1sm47506775e9.1.2024.10.05.12.47.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2024 12:47:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728157632; x=1728762432; 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=rIGcIV5oEe21ffMfXv8dxIlxwIuJMnLBjp2bLHMXYyE=; b=NfA3ItMRdKacBQGo7lUp+OU1NoQkH4pWzoJa33yLMzTnh6ZsWqM3LEKTmFI7wG6zGm v0B16dkBgAU4jD0GD4MhKRLHVpIr987orQGgJ07yVDn93ZI9r1tKFzdlkHHO0brsFCHr AgVaMHwGdWBKQrKAwIuP5a21a5q6UtXLXASMwdCr3njhQprs0jcurMFpOd0QB12kNTRS iUNKG600V/U0hVyiYt9NqobwTQNRV9IdgTE197gi13ny+Vyt0FLyKQH4TrOZ2UCHQLn3 Uacn3oc/LD8i/G5440C3kf3g8TZEz04mw2ySMLCFt4dk5WrUzTCVgHufLMv0meXtWMNP 0KPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728157632; x=1728762432; 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=rIGcIV5oEe21ffMfXv8dxIlxwIuJMnLBjp2bLHMXYyE=; b=fAhdX6DkXvu64QPYsGj/WbwpOsNYWgCJ2O8lz0qgHArpj1I7khjFSGcDoYaoUF0H+o 6dBduQjopFhZnXLD5nvXHtlBcTN0K7cl3XaJvdWJqvD+AMA58zA+GTa9kEXHBRLFD4TA pN1+q3V4HiT9jZTxs1FqZPEsp5zTYhSqx3nYaWzPjif5AgkNrlRs3JrbpmBw2fTQp0AO HnTu3n2RiUDYgaBQsCn+VXpKg+JvAJKHfq+ZjCb8CRmBCRFrkJ3GKW783TMwEu2xaX2K sim2uiouv1xKo9gsaFsGqOJmIZrGtW5umnumJLetXjaxN9U9AGdfY1gQd2uoP5ULbNdH KVow== X-Forwarded-Encrypted: i=1; AJvYcCU693SOcoc2NcJ9NNqhjuu61eav68u52a/aZup9k7ewSQW9qElm8iEUn687z3GoAwBw5u+GGeJ1RdTy@nongnu.org, AJvYcCWRsxPK6fDuQuj4zDR3VtSzbhkClaIm6sq2LQQFz5cn34NNo2wqPYHbDLjEeHOlROaVrZi8cVQ0kQg=@nongnu.org X-Gm-Message-State: AOJu0YyZQ7h5ztpXuTXcjMfqQG6i8e3zxjPAFcpYVtNSGEyfuRedPbGS sj8HssjXiPVuuTBvfkRENBHE955hEEaVY7++1uyTCacjJB6U5HsR/rv5cw== X-Google-Smtp-Source: AGHT+IFBb4h3bokBRGeh62r3lJN2PulGsDWevBVTB/zYylw5emGjhGnCRMYB1CELyd6DR+2zRo5v5w== X-Received: by 2002:a05:600c:1906:b0:42c:c4c8:7090 with SMTP id 5b1f17b1804b1-42f85aa7b0emr56531595e9.9.1728157631770; Sat, 05 Oct 2024 12:47:11 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Daniel Henrique Barboza , Nicholas Piggin , Bin Meng , Corey Minyard , Bernhard Beschow , qemu-ppc@nongnu.org, Alex Williamson , Hanna Reitz , Jason Wang , qemu-block@nongnu.org, Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH v2 13/23] hw/pci-host/ppce500: Prefer DEFINE_TYPES() macro Date: Sat, 5 Oct 2024 21:45:53 +0200 Message-ID: <20241005194603.23139-14-shentey@gmail.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241005194603.23139-1-shentey@gmail.com> References: <20241005194603.23139-1-shentey@gmail.com> 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::32c; envelope-from=shentey@gmail.com; helo=mail-wm1-x32c.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, FREEMAIL_FROM=0.001, 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 @gmail.com) X-ZM-MESSAGEID: 1728157685062116600 Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Bernhard Beschow --- hw/pci-host/ppce500.c | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index d7ff2ba778..1ce79ea20c 100644 --- a/hw/pci-host/ppce500.c +++ b/hw/pci-host/ppce500.c @@ -21,7 +21,6 @@ #include "hw/pci/pci_device.h" #include "hw/pci/pci_host.h" #include "qemu/bswap.h" -#include "qemu/module.h" #include "hw/pci-host/ppce500.h" #include "qom/object.h" =20 @@ -508,17 +507,6 @@ static void e500_host_bridge_class_init(ObjectClass *k= lass, void *data) dc->user_creatable =3D false; } =20 -static const TypeInfo e500_host_bridge_info =3D { - .name =3D TYPE_PPC_E500_PCI_BRIDGE, - .parent =3D TYPE_PCI_DEVICE, - .instance_size =3D sizeof(PPCE500PCIBridgeState), - .class_init =3D e500_host_bridge_class_init, - .interfaces =3D (InterfaceInfo[]) { - { INTERFACE_CONVENTIONAL_PCI_DEVICE }, - { }, - }, -}; - static Property pcihost_properties[] =3D { DEFINE_PROP_UINT32("first_slot", PPCE500PCIState, first_slot, 0x11), DEFINE_PROP_UINT32("first_pin_irq", PPCE500PCIState, first_pin_irq, 0x= 1), @@ -535,17 +523,23 @@ static void e500_pcihost_class_init(ObjectClass *klas= s, void *data) dc->vmsd =3D &vmstate_ppce500_pci; } =20 -static const TypeInfo e500_pcihost_info =3D { - .name =3D TYPE_PPC_E500_PCI_HOST_BRIDGE, - .parent =3D TYPE_PCI_HOST_BRIDGE, - .instance_size =3D sizeof(PPCE500PCIState), - .class_init =3D e500_pcihost_class_init, +static const TypeInfo types[] =3D { + { + .name =3D TYPE_PPC_E500_PCI_BRIDGE, + .parent =3D TYPE_PCI_DEVICE, + .instance_size =3D sizeof(PPCE500PCIBridgeState), + .class_init =3D e500_host_bridge_class_init, + .interfaces =3D (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, + }, + { + .name =3D TYPE_PPC_E500_PCI_HOST_BRIDGE, + .parent =3D TYPE_PCI_HOST_BRIDGE, + .instance_size =3D sizeof(PPCE500PCIState), + .class_init =3D e500_pcihost_class_init, + }, }; =20 -static void e500_pci_register_types(void) -{ - type_register_static(&e500_pcihost_info); - type_register_static(&e500_host_bridge_info); -} - -type_init(e500_pci_register_types) +DEFINE_TYPES(types) --=20 2.46.2