From nobody Mon Feb 9 20:34:37 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1569985451; cv=none; d=zoho.com; s=zohoarc; b=JM2ns1Z1roJxyZ+8KXBxwTGkSWJuuX4msb6g9P/vIOPvj1UhY2LmYgjkTobYxvS15JyEk2dUxA4DK0GPcTy3pmycmrS9kN1tcQHHxkxJytg7nquTUNMqn2GuJx9afwEtQqF2XW6/nqoQJTcWXn06xCwBU+PPSNXlnIpMgwG6D2c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569985451; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=5/KpWrc4raNpdeppW3smWgOgWB4NDajlBxb3v9hFro0=; b=DwxEShRvfHf2SViApL+OgLQBE7lqGXof4LKCeJ1EUANQR+s+rklcPUDBZ+H2oYFZ3U+iVxnuAKpewOyarZbIWimr1X67l5BDbAFl1WvwnXy5y3D0HWT7wWxxRbW0mzOKNVm6kvqil/7O1cFukyPJlpBejuksK3Cnff+3jzasUsM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569985451211168.17051742631725; Tue, 1 Oct 2019 20:04:11 -0700 (PDT) Received: from localhost ([::1]:50904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFUvv-0003kS-Pv for importer@patchew.org; Tue, 01 Oct 2019 23:04:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59565) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFUkg-0001Zt-IB for qemu-devel@nongnu.org; Tue, 01 Oct 2019 22:52:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFUkf-0002m7-5Y for qemu-devel@nongnu.org; Tue, 01 Oct 2019 22:52:30 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:51771) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFUkb-0002bz-NH; Tue, 01 Oct 2019 22:52:28 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 46jgf640t0z9sPq; Wed, 2 Oct 2019 12:52:14 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1569984734; bh=nQZ6RYMQSnBaHohmcBBdc5v6CdjWwiWcXseE3ZORP8M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I070B1qz61GR9pEl9Ld5GbyiDmRsIiFZbYhj35cZeujy2jYPhI+vp4kNU5sm4jGWh V9pc7EKJfoWAMkuRt7JNi6LwxDbpZkXzipSEA3dRzVDf2K57pVEu2b4xYZrFghIsJd YjEbP2YmwBbDO6Qgwpr+/TuNQnmBlI9zf9p+QJZ0= From: David Gibson To: qemu-ppc@nongnu.org, clg@kaod.org, qemu-devel@nongnu.org Subject: [PATCH v3 01/34] xics: Minor fixes for XICSFabric interface Date: Wed, 2 Oct 2019 12:51:35 +1000 Message-Id: <20191002025208.3487-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191002025208.3487-1-david@gibson.dropbear.id.au> References: <20191002025208.3487-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jason Wang , Riku Voipio , Laurent Vivier , groug@kaod.org, Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , philmd@redhat.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Interface instances should never be directly dereferenced. So, the common practice is to make them incomplete types to make sure no-one does that. XICSFrabric, however, had a dummy type which is less safe. We were also using OBJECT_CHECK() where we should have been using INTERFACE_CHECK(). Signed-off-by: David Gibson Reviewed-by: Greg Kurz Reviewed-by: C=C3=A9dric Le Goater --- include/hw/ppc/xics.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index 64a2c8862a..faa33ae943 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -147,13 +147,9 @@ struct ICSIRQState { uint8_t flags; }; =20 -struct XICSFabric { - Object parent; -}; - #define TYPE_XICS_FABRIC "xics-fabric" #define XICS_FABRIC(obj) \ - OBJECT_CHECK(XICSFabric, (obj), TYPE_XICS_FABRIC) + INTERFACE_CHECK(XICSFabric, (obj), TYPE_XICS_FABRIC) #define XICS_FABRIC_CLASS(klass) \ OBJECT_CLASS_CHECK(XICSFabricClass, (klass), TYPE_XICS_FABRIC) #define XICS_FABRIC_GET_CLASS(obj) \ --=20 2.21.0