From nobody Sat Nov 23 23:54:14 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=1730553706; cv=none; d=zohomail.com; s=zohoarc; b=DQ39pxfOJWJCNd9L8b27HFDokC0h7OZus7ku2NcMnS1FUswWzDs4sEWCsX9FfimuX91WHDEQDx/fZBGHOcI8J8rsqbGcMQKF8Z2966NmbGYRkDrgncZ6/A3vHZ4J8VLM3zD83fsHXfnJG85d4LBpjNkuY4pR41fuTQopBGs8YC4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730553706; 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=yd6NatUTxfChD+GNQ4/iAKaUKLh+xS235Qy81Xz/MlE=; b=O6JjIlaAyY98cxF5zDTMzJyWyjqe7AUhYLrGv+iZAtNs+ettj1XNUpc8N7r20xEHJNc13b0TRSLY6JfVO+xZ5NOA1VTB+jB1Kd4K5WAih8DYRCodRGVbsh5DgzF69ha7aticjX+L08qLqYk94U1EZpv4iwoG760mQ9Yfw4SGqUs= 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 1730553706130223.62405660670515; Sat, 2 Nov 2024 06:21:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7E17-0003PR-Nz; Sat, 02 Nov 2024 09:18:14 -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 1t7E0j-00035x-VW; Sat, 02 Nov 2024 09:17:51 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7E0i-0001yw-8F; Sat, 02 Nov 2024 09:17:49 -0400 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5cec7cde922so1376040a12.3; Sat, 02 Nov 2024 06:17:47 -0700 (PDT) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm307859066b.159.2024.11.02.06.17.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Nov 2024 06:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730553466; x=1731158266; 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=yd6NatUTxfChD+GNQ4/iAKaUKLh+xS235Qy81Xz/MlE=; b=Yo1Q0MdLZ+USu8AJ9WtcXUcxQh54iN8BHVQytpqTw9wbegk/sOzsUFc0e+o1BKPrgH 1F5UasMc64mdf1WGAYRKDZnltDjyQluspXzpclAP1iu5hKIoTqLemhgsGuBfeVWh4hIY ZfhEH7aESJ2lekLCoFGy1CjrnbfyhCP5LIVcpEkacx7Qm0l+7qjHRXc0kM/73x0bJhSn N0MG8UlYOFhcvbJ7nnRfj3mDaI2YtqLndJU/3FwwKr6YmxUQp35SMedPxd+eUwHbHGeP BcjmBHQXiP7ngmAlXVC9yDGwwLuxkxJ2YcLly87JFGG/gTik/YT7Z+w8Xttb5Edq5LxJ o3XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730553466; x=1731158266; 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=yd6NatUTxfChD+GNQ4/iAKaUKLh+xS235Qy81Xz/MlE=; b=G6ZSb9FLVOvB/3X4dT2OsrN0TNOKPXOrS5Wy48HRBJ7TXlQoe11CpVZqrFF+B3gY+q suHo1Q7QSut62taGy9tDhtCfn3rwTVpQMWSFll8VG6S8wzjgf3dHffB/VSYBkoKfqNj0 cwvrAQ1LSZuTgX6pZtom1VAIulAidY4UJ6cI2+eZZQnx+L4qi0e1klSVVZRS01jaleV0 oYKeu/V3akzWphPFbPgzPpQsFcZehc9IQ384843RC1aMmwlCzExjpW0TTyvK6Tw14IyV uSdSi17m9u6+tZ5Ib++xr6x7eZo1k0WT735wLhXLTLMKEiTtb+c9i+I5Eb6tmW3CsqJO /qYA== X-Forwarded-Encrypted: i=1; AJvYcCUEKreAm5Owb20V6WxB2NXPj2IosrGtOq7U7dR2Sz1hIERTejGTmrIucyu7yW3TEYqc5XzMCeSVIY4=@nongnu.org, AJvYcCUKidZ+DhZT8Bxrv5IrmeWph72wVfjrRg35ch3OCkujSgoSrqBAtfIJyYFjyVSyV6l+JUT+Fia+J2zr@nongnu.org X-Gm-Message-State: AOJu0YxvV1Mjqfir7WYT7GsYKrzu7BLhrkHIyqHfkVT1cP+SRdzDysy+ 8I9ereT6p5bsyLrnWKjO4Eu4tdxsLLZu025Qjcft2BgWeCk/vr8Bd6/yTg== X-Google-Smtp-Source: AGHT+IEWl/Y0wToQaGZaDT0jfnsKwHFZGduR+7+B9RESCEudX/YE6zwVb0e3dgILhCm+rJ2hMvua2w== X-Received: by 2002:a17:907:3f09:b0:a9a:2d04:b577 with SMTP id a640c23a62f3a-a9e3a620e06mr1456125166b.32.1730553465517; Sat, 02 Nov 2024 06:17:45 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Nicholas Piggin , qemu-block@nongnu.org, Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jason Wang , Bernhard Beschow , Daniel Henrique Barboza , Kevin Wolf , Hanna Reitz , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Alex Williamson , qemu-ppc@nongnu.org, Corey Minyard Subject: [PATCH v3 12/26] hw/i2c/mpc_i2c: Prefer DEFINE_TYPES() macro Date: Sat, 2 Nov 2024 14:17:01 +0100 Message-ID: <20241102131715.548849-13-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241102131715.548849-1-shentey@gmail.com> References: <20241102131715.548849-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::530; envelope-from=shentey@gmail.com; helo=mail-ed1-x530.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: 1730553706957116600 Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Bernhard Beschow --- hw/i2c/mpc_i2c.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/i2c/mpc_i2c.c b/hw/i2c/mpc_i2c.c index 3d79c15653..16f4309ea9 100644 --- a/hw/i2c/mpc_i2c.c +++ b/hw/i2c/mpc_i2c.c @@ -20,7 +20,6 @@ #include "qemu/osdep.h" #include "hw/i2c/i2c.h" #include "hw/irq.h" -#include "qemu/module.h" #include "hw/sysbus.h" #include "migration/vmstate.h" #include "qom/object.h" @@ -345,16 +344,13 @@ static void mpc_i2c_class_init(ObjectClass *klass, vo= id *data) dc->desc =3D "MPC I2C Controller"; } =20 -static const TypeInfo mpc_i2c_type_info =3D { - .name =3D TYPE_MPC_I2C, - .parent =3D TYPE_SYS_BUS_DEVICE, - .instance_size =3D sizeof(MPCI2CState), - .class_init =3D mpc_i2c_class_init, +static const TypeInfo types[] =3D { + { + .name =3D TYPE_MPC_I2C, + .parent =3D TYPE_SYS_BUS_DEVICE, + .instance_size =3D sizeof(MPCI2CState), + .class_init =3D mpc_i2c_class_init, + }, }; =20 -static void mpc_i2c_register_types(void) -{ - type_register_static(&mpc_i2c_type_info); -} - -type_init(mpc_i2c_register_types) +DEFINE_TYPES(types) --=20 2.47.0