From patchwork Wed Jan 4 22:04:44 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: 639055 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp1975026pvb; Wed, 4 Jan 2023 14:50:04 -0800 (PST) X-Google-Smtp-Source: AMrXdXuKI9pIUvgbUJrrQjOMH4ByPI9ZJF795m6/s2gAlL0uvfYNwPvxELCkplE5cFAuQMLQjKBm X-Received: by 2002:ac8:5646:0:b0:3a7:f599:220e with SMTP id 6-20020ac85646000000b003a7f599220emr77299062qtt.55.1672872603868; Wed, 04 Jan 2023 14:50:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672872603; cv=none; d=google.com; s=arc-20160816; b=thbnhXYcjp3M9UKHqjGDRust9lEDC1gqQDv9dprUOscc+TVnT9CUiIVRpdUPKuVCec 6JytrOg/mPlrrnj4hATb4pYdI0eFSTyvVreJVfJMHyQfl4qR9tq/8tl98frz6DHbjGx/ s46u0JwWsFCLusBnSL5H6/5WCWWKuVVCrPwzdKe0mGGlVKkF+AIQQjEi0UxVKtSzlBtO ENBUUKMk3k6f2CEGy5rhHEoENW7UCfyVsIzCDz4TATaSd4b8bvTx366HpLoxDZ5S14GJ +YA/VKkfModBxSzrob23spbGELG5hz5FpZ0gvMk+6SVJw8QQe1RZEz55/H0G//o6UcXI CBBA== 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=aSPCaBssOqcI16x2eeMpiNddAyoEtVRJPGPKXdjNpIQ=; b=IQzVppkwMkiA3tObjSKGS8+1WStU2qDkiQv0RbwIHhIS8BA/ATTeFa2WB3mUHNaFFL O1zM5PEb5+XlYwq/LW7DjYSj4HL1mcphyCucLuuzGDQQ5C70CkvmUL0gWDOFp5F9uaeJ 9eNEiAJdKDrUBTR3aH1Sy9peMI37XcdkF+zsTTsMN05BNfluPN9sr3P+4bnP+wJrv08N uhWH7qmxTkczJGKRHINmjkOl8WxNfr2P3EQGHyPdosnuPPrfEBd3VmSyPS0JY+7Xm//t MzBCmRnFteOA6mizL5/D/yGsLWoD7s72jwmwUf7/fhVxXVd9R+RBGIYrBs9m8UCbiH3Y yZSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aCZaH0vh; 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 h21-20020ac85055000000b003a5cacb9ca9si18510880qtm.539.2023.01.04.14.50.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Jan 2023 14:50:03 -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=aCZaH0vh; 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 1pDBvb-0002MU-9u; Wed, 04 Jan 2023 17:08:07 -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 1pDBun-0001zg-NF for qemu-devel@nongnu.org; Wed, 04 Jan 2023 17:07:19 -0500 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pDBud-000629-Pg for qemu-devel@nongnu.org; Wed, 04 Jan 2023 17:07:10 -0500 Received: by mail-ej1-x631.google.com with SMTP id vm8so79062823ejc.2 for ; Wed, 04 Jan 2023 14:07:02 -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=aSPCaBssOqcI16x2eeMpiNddAyoEtVRJPGPKXdjNpIQ=; b=aCZaH0vh5oj1E5E4InNiTNoAmKmy+457xeL73gS5nxOTrGV20hoWJXGVDlyusBzKe2 8pfl7iNSDuNn54XFnBajK1L5Qg8oUqJEN4fba74ENRvxdJ0DnKUsoWCE5dwKz2e1SJzg 10qmJeWfd8vmN4s3mqMMfnHSHhWx4M4ukd0MCYh7eTCGf80Nv5HrHD/fqmRAJAALfS5m 6IBpYTuRvgSWTp5S6+e/DT1jTZYAsCMns9oWvoQl16iKXNATL0ej2vQdPpIAplKG/3qd hl2z9qeh9oLUjGVjbkn8g2ZX05MMFG0+FavRmbzVZpikeaafVImNvPdEoGJ1GojPfYhH TOxg== 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=aSPCaBssOqcI16x2eeMpiNddAyoEtVRJPGPKXdjNpIQ=; b=VeF1eqtx6rgRfpZy4ptQJovhubo06PfZVrBU/M04u6zBSKoWLv1pJhMqjLwb3+Lzo6 5yx6327E69T+j6pE7ohO6Co4Vn3ygE7qrcAPBKGD5zUdjfP4Xw/1Hf7pXcIN/Zsxh/nh qsHOZ9B80xd4dKXE6wyTg8oAQy5vrtOGtLIadPHevO6rfP+7rd2WwllNLdv+yuALi1q7 Hk9Hdimk9d01tc11W8Y3A4OL94Et1fBhoyeD0KWq7Y34LOLjyc8tNLRx8dSGwcPeTY1C wHSK0/qiHVFb+ky5z05Z2kYMlU0I0NpRIBLPsnhWhy66e7nixHymjUxt7H1ZhMJSHh1A KUcA== X-Gm-Message-State: AFqh2koLyPInFoXxB+oIBN4EafJtxIN59lVLZ70kmDBoIDEhcJRQHV58 mOObuufWEqIz1NW23ty9rrI14wMWGY2SwJFt X-Received: by 2002:a17:906:279a:b0:7c1:10b4:4742 with SMTP id j26-20020a170906279a00b007c110b44742mr40854672ejc.55.1672870021716; Wed, 04 Jan 2023 14:07:01 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id j2-20020a17090623e200b007add62dafbasm15551057ejg.157.2023.01.04.14.06.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 04 Jan 2023 14:07:01 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Song Gao , Antony Pavlov , Jan Kiszka , Marcel Apfelbaum , Hanna Reitz , Bernhard Beschow , BALATON Zoltan , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alistair Francis , Paolo Bonzini , qemu-ppc@nongnu.org, Mark Burton , Richard Henderson , Magnus Damm , "Michael S. Tsirkin" , Bin Meng , Max Filippov , Aurelien Jarno , Eduardo Habkost , Palmer Dabbelt , Radoslaw Biernacki , Jiaxun Yang , "Edgar E. Iglesias" , Xiaojuan Yang , Peter Maydell , qemu-block@nongnu.org, qemu-riscv@nongnu.org, Yoshinori Sato , Alistair Francis , qemu-arm@nongnu.org, Leif Lindholm , Kevin Wolf Subject: [PATCH 15/20] hw/block: Make PFlashCFI01 QOM declaration internal Date: Wed, 4 Jan 2023 23:04:44 +0100 Message-Id: <20230104220449.41337-16-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230104220449.41337-1-philmd@linaro.org> References: <20230104220449.41337-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=philmd@linaro.org; helo=mail-ej1-x631.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 Convert the QOM PFlashCFI01 to a forward/opaque pointer declaration. Only pflash_cfi01.c is able to poke at the internal fields. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng --- hw/block/pflash_cfi01.c | 2 ++ include/hw/block/flash.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 9df79b102b..2af9273fc1 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -59,6 +59,8 @@ #define PFLASH_BE 0 #define PFLASH_SECURE 1 +OBJECT_DECLARE_SIMPLE_TYPE(PFlashCFI01, PFLASH_CFI01) + struct PFlashCFI01 { /*< private >*/ SysBusDevice parent_obj; diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h index 858c0a1b6e..321aede8ef 100644 --- a/include/hw/block/flash.h +++ b/include/hw/block/flash.h @@ -9,7 +9,6 @@ /* pflash_cfi01.c */ #define TYPE_PFLASH_CFI01 "cfi.pflash01" -OBJECT_DECLARE_SIMPLE_TYPE(PFlashCFI01, PFLASH_CFI01) /** * Create and realize a parallel NOR flash (CFI type 1) on the heap.