From patchwork Mon Feb 27 14:01:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656982 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2367277wrb; Mon, 27 Feb 2023 06:03:51 -0800 (PST) X-Google-Smtp-Source: AK7set8MiVlGpOjwICGVrZbtTXrs20tFT1YZeD/a6CDNFSaAayqrHj49E3N7BCH28nZfcAwUMzgN X-Received: by 2002:a05:6214:1d08:b0:56e:a832:928 with SMTP id e8-20020a0562141d0800b0056ea8320928mr15450057qvd.24.1677506631515; Mon, 27 Feb 2023 06:03:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506631; cv=none; d=google.com; s=arc-20160816; b=p7Ina+6VEabeljupqnCxw4QFmJebT96EeYX7jS2hkinYXDCWLMTO4WZO8Tq6nr+NZG YfNOYVFOPQyIkTll/MQjhvjqfmPubVqGXODg3cCZfdqSonOBjmH2cmB2vdhdVFwhyuBA PuUmLXupENuiDzDEFSE97gDHrvzO9DjTQT3BpRyYwtHhDy8m1QN4FvHUtwIdAS4n+THq iwlWeMWPqJWUjEDcRh1Pt1Jwc9Vl0lqLkmPL0woRfHML8d4TFyR1qn7CMHedPApp9FWF M3o1zA5FxYelOupfPSMsbL4WjfVLr9VZFuv/zO9hj93f5K5baM9uqArxHdKfAaEbTjLe RdHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ABw6Fx7bvROh29XWw3RjhC64oEfI8tf4qJj38BnQL70=; b=MDfSA1OTrWsDmCsXVcYzB4AhtIj24RQ5Vbqxl2JJ9dug7DHzxE5wT0ZBsBtzPn2IKG wUmGRYKQP/KOCIbuJnqQN7t70Ghag74hyk596z0GbnaIB+WbMzFVeufmM8mhYUSLbbmQ cINjVlsnTf/nzdIvv58le16rK1ASaPv1zVLcxuCkDKFnhhz0Vykc7BPhYQxH0RTmsAKl HuhKYxT9O4hcSHUX1OkF12yDqKJcQl1aw2YIKKLHX2Bjylz0QS3f/CX1buFw8K0L+YAj twuvv0vgmB79nlH/4hr44nSpgx6VpIb+5m1TZt2zWbWd1oeox/2STPWhja94I+dPI7qd mYLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IHNhWW1n; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m4-20020a0cdb84000000b0056eda3b12d9si6790565qvk.70.2023.02.27.06.03.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:03:51 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IHNhWW1n; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWe55-000234-75; Mon, 27 Feb 2023 09:02:19 -0500 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 1pWe4R-0000pi-2E for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:46 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe4O-0007at-PT for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:38 -0500 Received: by mail-wm1-x32a.google.com with SMTP id j19-20020a05600c1c1300b003e9b564fae9so7244782wms.2 for ; Mon, 27 Feb 2023 06:01:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ABw6Fx7bvROh29XWw3RjhC64oEfI8tf4qJj38BnQL70=; b=IHNhWW1nPJp1x+JsdMTC/DS7cfoXtSfW9EulLFGyKR4XXpZNqI+A93av3I75VEqM3l cBQF9j6ph3eYwapXxt8W+X4u6Ssg6aoxklXy+WB6SdVNb3cTYEBNvOEEJrZHyigg7Pwp wanz4klSsKLag6vnqE7P7CHw8eAG6I+H9MaiR00i+Wiw9Tu3PWnhqLHJota8b5QNv+eF QdTWeu737K8DjQEgqz78kFbfg1e8LxAc/6HBkvaSS6FuuOx6o+pnDHAycgp0T6cBKwHu 1pYY6akByTti6pA+vXZNPuVOnSwPqcC5euuTq4L0JiXS1zDgjTBTcCdWDUIU79WVNbRk xCPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ABw6Fx7bvROh29XWw3RjhC64oEfI8tf4qJj38BnQL70=; b=RgEYVgXJJM79NCayFNmsIZ7sYNHwJwxkjDVWbycmsbiTyySyEpdfie7JJEDWhPnVbz 7Z5VXyIqkmb35YtSQ40jILSjPLGykUOR+dhhde4Bldxi/xVVQgI+rJKwFLlh8RYz1t0K hSRICqQ8cROQCNPJnwak8pqeptbI3YuDAfg4ITw2n+PNz0JSu8rvrF6zHycF2oaD56JD k9W25yfrzMJX1sJTK0aj9WytgyvxjaL5LPntJaDoQjwWjba63JOCMEsq3TgCd9kOqeau Y1yaZ0wkkZejfouXcSkJdc9DnAQGNVoj2WE0i7kKeMns4y+wpR/lcQqGon2ps8esIeWX njyg== X-Gm-Message-State: AO0yUKXeeDVWep1zlHWaF1eS3juWXKE/QSDbSQsPjYH//qsE/HeSuv95 bcbvSu9oPgOfdzCwoHGPCgxJERisW/BfgorJ X-Received: by 2002:a05:600c:1616:b0:3eb:383c:187d with SMTP id m22-20020a05600c161600b003eb383c187dmr5457148wmn.27.1677506495931; Mon, 27 Feb 2023 06:01:35 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:34 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 23/25] hw/irq: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() Date: Mon, 27 Feb 2023 14:01:00 +0000 Message-Id: <20230227140102.3712344-24-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé QOM *DECLARE* macros expect a typedef as first argument, not a structure. Replace 'struct IRQState' by 'IRQState' to avoid when modifying the macros: ../hw/core/irq.c:29:1: error: declaration of anonymous struct must be a definition DECLARE_INSTANCE_CHECKER(struct IRQState, IRQ, ^ Use OBJECT_DECLARE_SIMPLE_TYPE instead of DECLARE_INSTANCE_CHECKER. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Alistair Francis Message-id: 20230113200138.52869-3-philmd@linaro.org Signed-off-by: Peter Maydell --- hw/core/irq.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/core/irq.c b/hw/core/irq.c index 3623f711fe6..3f14e2dda74 100644 --- a/hw/core/irq.c +++ b/hw/core/irq.c @@ -26,8 +26,7 @@ #include "hw/irq.h" #include "qom/object.h" -DECLARE_INSTANCE_CHECKER(struct IRQState, IRQ, - TYPE_IRQ) +OBJECT_DECLARE_SIMPLE_TYPE(IRQState, IRQ) struct IRQState { Object parent_obj; @@ -68,7 +67,7 @@ qemu_irq *qemu_allocate_irqs(qemu_irq_handler handler, void *opaque, int n) qemu_irq qemu_allocate_irq(qemu_irq_handler handler, void *opaque, int n) { - struct IRQState *irq; + IRQState *irq; irq = IRQ(object_new(TYPE_IRQ)); irq->handler = handler; @@ -94,7 +93,7 @@ void qemu_free_irq(qemu_irq irq) static void qemu_notirq(void *opaque, int line, int level) { - struct IRQState *irq = opaque; + IRQState *irq = opaque; irq->handler(irq->opaque, irq->n, !level); } @@ -120,7 +119,7 @@ void qemu_irq_intercept_in(qemu_irq *gpio_in, qemu_irq_handler handler, int n) static const TypeInfo irq_type_info = { .name = TYPE_IRQ, .parent = TYPE_OBJECT, - .instance_size = sizeof(struct IRQState), + .instance_size = sizeof(IRQState), }; static void irq_register_types(void)