From patchwork Mon Feb 20 13:18:34 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: 655087 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1390621wrc; Mon, 20 Feb 2023 05:20:04 -0800 (PST) X-Google-Smtp-Source: AK7set9xjD95T+E4Bc6DJYdmIZniK5WbG7qJKpn+9w6VjDsOfANLnIUIcn2/+6eb+v4Wu7FjhFW3 X-Received: by 2002:ac8:4e55:0:b0:3b9:a4ac:9109 with SMTP id e21-20020ac84e55000000b003b9a4ac9109mr2397435qtw.64.1676899204739; Mon, 20 Feb 2023 05:20:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676899204; cv=none; d=google.com; s=arc-20160816; b=ZamGXmdkqySmn/jcW+nBlUFvUkJNIQ7yUIRaYFzxNMZGevSh+h9cXw4Ce4KHv8Akl6 xxwnD9bO2u/Dq+Y6OQ8xTBdJ1o48pTHhFio78Nq3yU4bXieB95phUM7AS2fHMPZIAlZV OA+YPj25ZbNFfE/QGWT8lzetp7hq7gUe7jI5bdbc5GqXlG/IHPaUy4G8m/SYHWYOTzNT rZVcEy15DbGV0VF0K36JuXYjUradPj1BKVAYLCCuVlrFa7jsPdAy5jWM2WHnAU/cQ0j0 kIOwIPsaUURuSXhqYIA/pls/NJiBW9gyyZfEPiXCQZByxMbS6A6qkew7KcOZHuoUUIFa THyA== 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:cc:to :from:dkim-signature; bh=31e2czA0rOGt43Bpx9OSiR8m8XfJzcMSVoea56a8oA0=; b=yzeZ9OEtReScWwoyG8jpoQEyo/TTQ/fzibDbgtU7Mtj89Sl2OxKdGGIHeleZ6bkoyV cpp18hTTDPZ3M2F938K/CSNygghVJi5KrmD3BMqcpvLS2CJdaJKniZ9QlR8d2Pc3ttfy tx9QphUFicmVCAggv6nc2K5y0U6xzYuaqiQrTxRhFEqG+v1gXMQbXb80jJk8v8fjENgc 4Rp8Wo/HHk212rs37CwZdj+xJhJ5Gv9G4gIW5/aBFfrJ7WzWtTLQ8UPi3w4yiOFgfut7 FP9ChDPaqsvGwcfJjufOmcDv4Q8D/T6H4WHyYbe76ZJd4mP5NpYcGk0H7PA3KiGSFQCO UFQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o3H45KjQ; 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 r7-20020a05622a034700b003b852fc2c43si9741640qtw.434.2023.02.20.05.20.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 05:20:04 -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=o3H45KjQ; 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 1pU64I-0002Bo-Aj; Mon, 20 Feb 2023 08:18:58 -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 1pU64G-0002Ax-KA for qemu-devel@nongnu.org; Mon, 20 Feb 2023 08:18:56 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU64F-00073G-4W for qemu-devel@nongnu.org; Mon, 20 Feb 2023 08:18:56 -0500 Received: by mail-wm1-x32b.google.com with SMTP id p3-20020a05600c358300b003e206711347so883033wmq.0 for ; Mon, 20 Feb 2023 05:18:54 -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:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=31e2czA0rOGt43Bpx9OSiR8m8XfJzcMSVoea56a8oA0=; b=o3H45KjQi33YhrADQ3PSYhHFTq3lQ/v8Na7lQAOfMfXgMyBCNyUqWAwFXFv4560l3I xp+9Ixk97yl+KCqxAbSxTsKOYkKdY6M4hPZPmpClW9qoYcoEKjvIRV16Wg3s8Nw42qPC 4K+PP0y3jghfaEAsX8xeBplbLX9L1IKPebrSIH3TRpXaUxEKNO7je6N6MfQTV5b6N4OI EMu269sS86o+/YPUF7MCllsX4+2PX93j2/Xq0H2IT/gMrQZ2GfONwpUHhWdV5k1/sPTy bYNCYTHXW8RU0S15o+//ZcldYMFC+rUy6lmrxf5cdHd4m8bMtccTICnGupcMpQSQGdT4 VZlw== 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:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=31e2czA0rOGt43Bpx9OSiR8m8XfJzcMSVoea56a8oA0=; b=JLp6DpBjvbHU8Iokix2qdCw7cLJ9RtKCHcVvR3KaP3Qw/re3XcZXdsHLyFSD2f1/LM xiJkvm+jixys2B63191N6+lgZNdGv/BFUyyi71npU02zkX5w5z7KqX6VnusGBOLW5WFa 0+p+C9/dZZgrK/dv7P1XLpwAaLRnIvh3Q9nQqQEAZXU/671UbmN/F/ERFym+323gb/42 GrnqwKxYh7rmF8Ynamyw4PE3yr411CqXXmTp91GMozmM3x6yanUho3McnWZm18O3FlgK pd4r7jL2Oj64M0mFKIG01f7rOy/fkmmcqC8IjdEy5iM3tbYbJuZzwn6DKKWByrSTvIUb PUxA== X-Gm-Message-State: AO0yUKURsRdVTmZCvQ5hbJ3zXFJzlMBNR1jLOA2gbMN5hK3nNVsmtIkF Be+FtcokZyV23FdWycx6y+ds9ePWeKIi9WQp X-Received: by 2002:a05:600c:a294:b0:3d9:fb59:c16b with SMTP id hu20-20020a05600ca29400b003d9fb59c16bmr661015wmb.36.1676899133320; Mon, 20 Feb 2023 05:18:53 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id f4-20020a7bcd04000000b003e00c9888besm9315268wmj.30.2023.02.20.05.18.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 05:18:52 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , qemu-ppc@nongnu.org, Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Herv=C3=A9_Poussineau?= , Richard Henderson , Markus Armbruster , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 2/5] hw/audio/es1370: Avoid forward-declaring ES1370State Date: Mon, 20 Feb 2023 14:18:34 +0100 Message-Id: <20230220131837.26292-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220131837.26292-1-philmd@linaro.org> References: <20230220131837.26292-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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=unavailable 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 ES1370State, declare ES1370 QOM definitions before its use in the chan_bits structure. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/audio/es1370.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index 54cc19a637..ea76c9a734 100644 --- a/hw/audio/es1370.c +++ b/hw/audio/es1370.c @@ -256,6 +256,9 @@ static void print_sctl (uint32_t val) #define lwarn(...) #endif +#define TYPE_ES1370 "ES1370" +OBJECT_DECLARE_SIMPLE_TYPE(ES1370State, ES1370) + struct chan { uint32_t shift; uint32_t leftover; @@ -278,7 +281,6 @@ struct ES1370State { uint32_t codec; uint32_t sctl; }; -typedef struct ES1370State ES1370State; struct chan_bits { uint32_t ctl_en; @@ -292,9 +294,6 @@ struct chan_bits { uint32_t *old_freq, uint32_t *new_freq); }; -#define TYPE_ES1370 "ES1370" -OBJECT_DECLARE_SIMPLE_TYPE(ES1370State, ES1370) - static void es1370_dac1_calc_freq (ES1370State *s, uint32_t ctl, uint32_t *old_freq, uint32_t *new_freq); static void es1370_dac2_and_adc_calc_freq (ES1370State *s, uint32_t ctl,