From patchwork Mon Feb 27 14:01:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 657068 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2380411wrb; Mon, 27 Feb 2023 06:26:50 -0800 (PST) X-Google-Smtp-Source: AK7set8/oFDIstP5bXIoyal1I+DJmmrzv5/qG8w02TaM5Z6vHiH0rXqsrVhWCiVol5hzNgJ/U+O5 X-Received: by 2002:ad4:5c47:0:b0:56e:b7a1:c9e with SMTP id a7-20020ad45c47000000b0056eb7a10c9emr48759904qva.15.1677508010564; Mon, 27 Feb 2023 06:26:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508010; cv=none; d=google.com; s=arc-20160816; b=dTZw4njCVQ76ZUhf7p/Uaqb036ZcEkqT+MINVCG/z4OqW/k2/aryI4sx27iuAfudqz Ww3t1huEDfOB9X34JU+2T9IK1s584LAYKO3d4tZ+GpixpUvqbx1g70an07oRDUjGd6aE RmgavVhqDHNkeUmojnb5f7KJ2Uc//1QgI93OqP71jurRdVA2IR7uK20ZX0jjy+oeFVUz LwayjQyU9PKIRkeg4CPzn2ltkqfLuNgRKguzgL+2Feido9SVkIIi1yuWgMJLLy3Lq8MF gU/QgbAk89DYpL9nRrH1kzg57AMhDMU3xNU1/lTrZ2lcvKrJCuYo1BR1Vu1RFAQnUxp+ po/w== 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=QJ3BKCFcAXPLhAg+8B2nnFVcuypAiJT5mvyLP2qVcBI=; b=YrPEiA8Bxl5yiutePEFrAVO7mYBovPrlbimobKJO5fOM9jy7p+nDOHqRgjUn/21Iqx znO2RDJRup+Fjbb8NSfIhbOFA8phH00pY0ZPXF4zLMSFpl83pfqrvSFX2jaPh8Sa6PgV JK5F2PYr/bo3BC/GdEOPdOTi4o1yTMkMCal6ft0F855ApHcRdcy0LeDllyFz3uwzoq5q 3OO39He7nc6ZeXiAaBfF65gledPV/GiVbXOVouBVU6ForJFivBMlNPAKihGYROVs+A8+ g+9hLQV5Jo8ZJZcChizsggOfBzbAPUsUvzq5dk8qSwVUD9SLefdXd95tz6Tg9w/p0sGC picQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VA0DRsLi; 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 az38-20020a05620a172600b007423fc5b7basi160908qkb.182.2023.02.27.06.26.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:26:50 -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=VA0DRsLi; 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 1pWeAv-0002Dp-1b; Mon, 27 Feb 2023 09:08:21 -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 1pWeAt-00024R-8z for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:19 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeAp-0000Od-1Y for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:16 -0500 Received: by mail-wr1-x429.google.com with SMTP id r7so6358499wrz.6 for ; Mon, 27 Feb 2023 06:08:14 -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=QJ3BKCFcAXPLhAg+8B2nnFVcuypAiJT5mvyLP2qVcBI=; b=VA0DRsLi06sYDvJg8wAqDf+VYbENd1yjjJ3a3t4Ne/TP3jTKEASPL433P0BdrsJQBw gNG91KpCbfv0A1TVN2nrqEKBU9ZwI5pGuxIcmoyWA+8fSl+FPM1fHagWEpktLYV6CNfq /ybj2i9+ba5VkQS6D/AnJDIEitz1WcaHO6CuOdeqMU4wKKYhTl4N6SgFJ4I4Mh/8NJbv sBsmL+FQJXakjxNhv6jDFFfxE2syqQRREA5B4HkJTbA7SqV7xPweWeagvMy0+0srQdK7 Kr1LjSNvt1wUhwnXBlq23DoYmE7iACtsm7wbsWIpasIgfEVuDuiaJ1SHb8WZrdTzs/jY D+vQ== 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=QJ3BKCFcAXPLhAg+8B2nnFVcuypAiJT5mvyLP2qVcBI=; b=nYkuNKQRhRN7BvF+fkGGLa/+kZ7IhUpn2Y6h9X7BxfcU1oHnCSdoVAfUWMsBQ5CRyE NSo5P0HudRhwJ47T2DQVkl1ILTPQ7aNM62uumfdsdRNGJ51qT41CykvsO8JMOSQ28740 ql2C5uUWl46wzLY3fnoIU1CpEfG4/XysXNryaybKurhFbheNQQoNy/DNLpRnV9dlTysx crZgL4/Ve0aKKK2TOk0KdxHMQMsnUtfzZi8cz6dPJBtx91D+Haq+U8p7tDKlBPRPS6Z/ 6oUPshzf9hLv627NjtaaiCo0B0vE2YSBxhGxURRFLXAMkpLbITFMFniSIMVzYJZWrtPj nfbg== X-Gm-Message-State: AO0yUKXJNQ5kh+1AfpaT4tI91neQrtGpVuZgc2oO2YfM1quiE9Ztnddy eonOz2+Agn/8cmHrugNTRqbmQLlYxvfq1Fcx X-Received: by 2002:a5d:58d9:0:b0:2c6:e87f:30cc with SMTP id o25-20020a5d58d9000000b002c6e87f30ccmr19165699wrf.48.1677506893523; Mon, 27 Feb 2023 06:08:13 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id h8-20020adff188000000b002c54241b4fesm7118517wro.80.2023.02.27.06.08.12 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:08:13 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 075/126] hw/usb/dev-smartcard-reader: Avoid forward-declaring CCIDBus Date: Mon, 27 Feb 2023 15:01:22 +0100 Message-Id: <20230227140213.35084-66-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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 To avoid forward-declaring CCIDBus, declare CCID_BUS QOM definitions before its use in the USBCCIDState structure. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230220150515.32549-2-philmd@linaro.org> --- hw/usb/dev-smartcard-reader.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 28164d89be..be0a4fc3bc 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c @@ -278,7 +278,9 @@ typedef struct BulkIn { struct CCIDBus { BusState qbus; }; -typedef struct CCIDBus CCIDBus; + +#define TYPE_CCID_BUS "ccid-bus" +OBJECT_DECLARE_SIMPLE_TYPE(CCIDBus, CCID_BUS) /* * powered - defaults to true, changed by PowerOn/PowerOff messages @@ -1174,9 +1176,6 @@ static Property ccid_props[] = { DEFINE_PROP_END_OF_LIST(), }; -#define TYPE_CCID_BUS "ccid-bus" -OBJECT_DECLARE_SIMPLE_TYPE(CCIDBus, CCID_BUS) - static const TypeInfo ccid_bus_info = { .name = TYPE_CCID_BUS, .parent = TYPE_BUS,