From nobody Tue Feb 10 01:30:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.65 as permitted sender) client-ip=209.85.221.65; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f65.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1603558896; cv=none; d=zohomail.com; s=zohoarc; b=NJbqDeLisIs+yi5cfrZLCYp9+lEiDuhI90uaPLIXxMXZkZhrG3lvEJmZuUifmBuK2xZHmbjqfPsv4ZT3L5h8Jbi/dI4KCMayopfGrkZRF1MwGJx2dfO1OujblnVKFAUmHQ9FkTpiooLbpPLt8XL7//3y9vp+AFpsHlylonCAhdY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603558896; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=JltEwXbGzmO7Iz477A1CNJvyjNGP/jwshVCvgGssOxI=; b=Kjh+mvP6UAjKaPzxFsVsfVAKFlLtAdokvu1osqe9ftN32a8tYKMqKWNxJ47PE/75OdCbWmRt2TaKNDq6kGRJGEaK8Sx9LJSfln0hkkxZQcbvIBGfCa0FCx+gpDiATXKAxu43j6Sth6Lz6hnVr+iL09OLTp9IzVfH5HKfy7uMIsQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by mx.zohomail.com with SMTPS id 1603558896940872.4888972264444; Sat, 24 Oct 2020 10:01:36 -0700 (PDT) Received: by mail-wr1-f65.google.com with SMTP id y12so6439025wrp.6 for ; Sat, 24 Oct 2020 10:01:36 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (237.red-88-18-140.staticip.rima-tde.net. [88.18.140.237]) by smtp.gmail.com with ESMTPSA id q5sm13581801wrs.54.2020.10.24.10.01.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Oct 2020 10:01:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JltEwXbGzmO7Iz477A1CNJvyjNGP/jwshVCvgGssOxI=; b=GwzJh/5HvIMW1HN/x+/u1vbdXDls3UbtgIv9AuP4kGrCnbou9hLYR8d4YvmCJRYXpv VXP7PE7EPk38lVmbvSExFhND/2l6IxIxImJX4UKYH5iSCmcYhqxrWFG8hKMRVsr7Cuum odKSxvIQn7XP6tIlw2O9NQk86zzyIGGoqjfT5dTFWwNbXCp2alM3WHRhLL1TrUgISpAq DCSuV2yU42az2baWrrx1vfrrP4/TMwMueCBz16T8VsvAcJNXnU3a4qJ5+4AgYS9op3eb SixzTLQiev/1sRhMnYZHjZCqwZpLOaic1J7mqkIQtm7M45hDr2PtlavkyrmxNMn7ujLm 7XsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=JltEwXbGzmO7Iz477A1CNJvyjNGP/jwshVCvgGssOxI=; b=pm5DXN8jSUHncwtiWJoU8hlu7z2mSl8fuQwtcV4oDkujrhIgjcxqkG3MJ04/dRNr3J lKPBi8tMsdqU1YPBIdCxD0x+Se7l21dIMoobHyNgEwzit1RV4dbv7zPwQkWGikaKAyn1 c23HiSf3mVnX64Ju4dK26DzjI2s/19Lwy4d9GycSvtyFMfgKyTugj+cvWSR2KtutJ2kN 3BDEYoCOomaNkHr+YBwCK+gXC9Vh+Itf74623Y/Y4wsgxMu3Z+7JHj+44Zft+SvSs7Tq m3FbQjRwLhJ/5SRRI0sudnPd/dvfi6wDArXvIS+bGAw09BxYIuNnlGdkJs7OKN1s4KoH PjYw== X-Gm-Message-State: AOAM5301XpV6sbfpetl/nvEV0FeNvkNapOkP4wZ5kaUgeWBv5PmMM1VP rX0R/w6iFgg8lNDgCHfsUlA= X-Google-Smtp-Source: ABdhPJxIMeyJQrJINxobfBB/6PSTQH2Jk+bKOwynBJmuLLuecA+/z95+RbCLVJM4h57tnZ42TJEEnA== X-Received: by 2002:a5d:66d2:: with SMTP id k18mr9226262wrw.229.1603558895163; Sat, 24 Oct 2020 10:01:35 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Baumann , Peter Maydell , qemu-arm@nongnu.org, Luc Michel , Luc Michel Subject: [PATCH v4 1/9] hw/arm/bcm2836: Restrict BCM283XInfo declaration to C source Date: Sat, 24 Oct 2020 19:01:19 +0200 Message-Id: <20201024170127.3592182-2-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201024170127.3592182-1-f4bug@amsat.org> References: <20201024170127.3592182-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) No code out of bcm2836.c uses (or requires) the BCM283XInfo declarations. Move it locally to the C source file. Reviewed-by: Luc Michel Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/arm/bcm2836.h | 8 -------- hw/arm/bcm2836.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/include/hw/arm/bcm2836.h b/include/hw/arm/bcm2836.h index 428c15d316e..43e9f8cd0ef 100644 --- a/include/hw/arm/bcm2836.h +++ b/include/hw/arm/bcm2836.h @@ -43,12 +43,4 @@ struct BCM283XState { BCM2835PeripheralState peripherals; }; =20 -typedef struct BCM283XInfo BCM283XInfo; - -struct BCM283XClass { - DeviceClass parent_class; - const BCM283XInfo *info; -}; - - #endif /* BCM2836_H */ diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index f15cc3b4053..e7cc2c930d9 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -17,6 +17,15 @@ #include "hw/arm/raspi_platform.h" #include "hw/sysbus.h" =20 +typedef struct BCM283XInfo BCM283XInfo; + +typedef struct BCM283XClass { + /*< private >*/ + DeviceClass parent_class; + /*< public >*/ + const BCM283XInfo *info; +} BCM283XClass; + struct BCM283XInfo { const char *name; const char *cpu_type; @@ -25,6 +34,11 @@ struct BCM283XInfo { int clusterid; }; =20 +#define BCM283X_CLASS(klass) \ + OBJECT_CLASS_CHECK(BCM283XClass, (klass), TYPE_BCM283X) +#define BCM283X_GET_CLASS(obj) \ + OBJECT_GET_CLASS(BCM283XClass, (obj), TYPE_BCM283X) + static const BCM283XInfo bcm283x_socs[] =3D { { .name =3D TYPE_BCM2836, --=20 2.26.2