From nobody Wed Oct 23 00:32:37 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=1727084182; cv=none; d=zohomail.com; s=zohoarc; b=PNSCpyFJ6TJXJ8ND3z00c55CwSuskRI2BSWwBKu2QvWtu+3qQ8+MbIRKby9+WrC1Brr2TSMZgRCU+ucQjoJgk5WT91JCT3KTj+QMxPpgIO2I7AUN2Oh8KmBM6y/RrCHF+o6Mjle57HUO0IUfdNw8OU+7F64CBEP8w9AacTIy0uU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727084182; h=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=mHGjpUSmV1BY/gesAqJRCAT6c0HlF78YEs0jV0SsyRc=; b=JxG77cZxOClKiUZj/e/jxFsJlSx07n5dYUFWcteuvmkgKu+xbGmXlh4xURd22piEgcGbKGlzfKKqyN2C+cN0Diq2qIcxO4EESoZqcsMZsYsmLxx43GxzJ73c8rFXZGKyfWQsalXHxdL9VAVvvf/ctkSYkXVOrQ4tSIGkHXCKZzo= 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 1727084169424704.5942375261571; Mon, 23 Sep 2024 02:36:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssfPm-00039I-BV; Mon, 23 Sep 2024 05:31: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 1ssfPj-0002yf-N3; Mon, 23 Sep 2024 05:31:27 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ssfPh-0006zl-Si; Mon, 23 Sep 2024 05:31:27 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a8d24f98215so558192966b.1; Mon, 23 Sep 2024 02:31:24 -0700 (PDT) Received: from archlinux.. (90-181-218-29.rco.o2.cz. [90.181.218.29]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a90612b3f6fsm1188747166b.107.2024.09.23.02.31.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2024 02:31:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727083882; x=1727688682; 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=mHGjpUSmV1BY/gesAqJRCAT6c0HlF78YEs0jV0SsyRc=; b=RezEmTP+0B9V9xAQlssH/HvqrlhtUVxB5C3jyeQwA+rWKt8Qw6Drf5kChjwSXQ6N3G 0txnLf3P0eb7xMAdmxx2+6SckolIP6N3tSWUFuoGbwgy/xdWS2cXQuFtXEvfD9nmiVnE oZbP04aF4YBNda7X2FZr7F4mf1Zeiu6dQA7uMqKtvEeUu3nwgeZTiHW6iAntaNv110HU TlVsq5fRQjzRI06KdZcYTgHGJsneLuHK77UreWLRCdc+w+Jnzx+U8xULR7gMuitJlzJC bCuVlHMYH17h8FFcNbVi2JIxZ+kINP2H+KMa0LRHdGog5HFgeb7h6RJG8e1EoxgwUKcc epPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727083882; x=1727688682; 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=mHGjpUSmV1BY/gesAqJRCAT6c0HlF78YEs0jV0SsyRc=; b=rVg3ZMq0fYmn40JJ+MKLumcfvw4gc8Idee9gbaRbJURfP/lEOtzdT2iGtyABW7AqK/ i7AVK8iBN4SjKuU6Z7fo3wd/+bWuqMbw+C0sd2jppq31HRua1d+ZfjURDvDOwjRhYHhc ohx4b/D2w7FMBPJXZTunzCDneIKSFPrjyVCx8ZVaZ6SWOheL6r6dxNWTggCB+4BPjnaZ EaigOHKbzw9Md5kPtYRQg0OPAXMRWJR2UtHPgJDkpuWTqw69j/5zYH8nWLN8ISm0Bclm w3qoeK7M0T+4MciT3BqEAiQmdPHsejf9KDaAnyUYbNwRx/pzfq6Sd1BifLyMBzWkAsE6 d4wg== X-Forwarded-Encrypted: i=1; AJvYcCVrZhP0StLAXq9PjRTZVRnnD8+F4bPjz66U15j4oM2YWqj5jNGdfvTCAgAQalqcRcnDcgQnVyKxvsU=@nongnu.org, AJvYcCXTjghBkQC7b8qmGgYzX1dAxGIEPRBdlpBYSON/eAM6sUdVnQpKI8e9svSRMneTcnsyQazB+odtyxrw@nongnu.org X-Gm-Message-State: AOJu0YxrddgaffZDTHBRik9BTdYsX5dizhzuS+HOy+1JA6CeolP5GXaO GZcL/6PR6gB7k07JuAmPKZlLRgNKNYEymJ/Vfh57AgRc5gRWha3ut7hFmA== X-Google-Smtp-Source: AGHT+IE9itsyK/LlKe4r9Sa82Dr7vX3q9d1qBslDtDQJTMKiRyiljh/d26vV1d5PbCDgs7EEI/Z2ag== X-Received: by 2002:a17:907:d2db:b0:a8d:f04:b19b with SMTP id a640c23a62f3a-a90d4fbcfd5mr1101262466b.2.1727083882399; Mon, 23 Sep 2024 02:31:22 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Hanna Reitz , qemu-ppc@nongnu.org, Kevin Wolf , Corey Minyard , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , Alex Williamson , Jason Wang , Daniel Henrique Barboza , qemu-block@nongnu.org, Nicholas Piggin , Bin Meng , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Bernhard Beschow Subject: [PATCH 13/23] hw/pci-host/ppce500: Prefer DEFINE_TYPES() macro Date: Mon, 23 Sep 2024 11:30:06 +0200 Message-ID: <20240923093016.66437-14-shentey@gmail.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240923093016.66437-1-shentey@gmail.com> References: <20240923093016.66437-1-shentey@gmail.com> MIME-Version: 1.0 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::62e; envelope-from=shentey@gmail.com; helo=mail-ej1-x62e.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: 1727084185905116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Bernhard Beschow Reviewed-by: C=C3=A9dric Le Goater --- 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.1