From patchwork Wed Jan 4 22:04:43 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: 639056 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp1975098pvb; Wed, 4 Jan 2023 14:50:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXt/qyMBHa74kIaPjvDhS1Nj2n9ve0c1fDR/EcGjO6/pLTbMNlUiJkgNSxMknwRZ3UNO2Bt8 X-Received: by 2002:ac8:4646:0:b0:3ab:6e0e:3b78 with SMTP id f6-20020ac84646000000b003ab6e0e3b78mr62699462qto.38.1672872614436; Wed, 04 Jan 2023 14:50:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672872614; cv=none; d=google.com; s=arc-20160816; b=mjUzrkWhYKt7nhhaX6NuOHoHKMaNaN+nK4PxyBoWZnhts+/JjqzPfZuus/sHS9upc+ DIPSuQD9PWhcr0Q8eSWda4KhdeXfrXTDx5y9Q8quAxMtLNeDd3eHUQTizwPbD2HR3Yxs HXakPLB2OPB0nzvciYz115w6mnhhwUksFyzMdbAHhg7M23UuvdImGNhYi1MYP6SYVsXg WCeL6XWTDHhTtweW+3PD7v9W3fLfdsvNUhgTTs7QgdLwtuHgJjeqU7xsLVOKSTSpZLK0 15F+d/velwimBOMHyRUT6JJMiAiWwKuFlEx7KRr1TqApcmTOrEhv6adAxhzb2i+T5M9D xBMg== 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=/hYs50GwFMyuZfrImrAOFNvNLwGPKhd/4T6LtSg8+5M=; b=hR9GOryMYSzcKZGejm1xGW0e1aJ1V8/ufhB6XuheL/Z7CVEOE8Hnb5Y9xVIxwtwTlz OTfLtClkzsPV/B+UFWz+4x4IYmh84MAm2bKN8CnfOIQmTzDsUQRwfFFFuhDNUbINkhIS j7ucO4U6RQJ4kNx5B6l8J3N+d7nq9bRcHf4vk2LXU5vCnXjElGDvKi2V9k8BjtH6fcCC BsQcfICC0MPJh9k5ahVcsXgiHVlIflpdqiUj4P04RF7kXpsA2ikzUG/yD1EQ/NpGib0/ tpR/wwti3UKzCb7kZUrdJmYIxiat5Pqzr7AOLXnWyNl9t3eLhEkaLlrWKXdfEj6KOHiY AUsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qz7J1Aaz; 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 ow5-20020a05620a820500b006ff0b402704si17165017qkn.341.2023.01.04.14.50.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Jan 2023 14:50:14 -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=Qz7J1Aaz; 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 1pDBvD-0002BI-7f; Wed, 04 Jan 2023 17:07:43 -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 1pDBuR-0001to-N8 for qemu-devel@nongnu.org; Wed, 04 Jan 2023 17:07:05 -0500 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pDBuP-0005ax-NR for qemu-devel@nongnu.org; Wed, 04 Jan 2023 17:06:55 -0500 Received: by mail-ej1-x62e.google.com with SMTP id m18so85787558eji.5 for ; Wed, 04 Jan 2023 14:06:52 -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=/hYs50GwFMyuZfrImrAOFNvNLwGPKhd/4T6LtSg8+5M=; b=Qz7J1AazlyA7TkFmTghpBG/6vJrDSWHKbTwtiuGnzqK7ApC9+o8bNw/7/IJHgXWR3i YCLat9y+G6p6U4z1Kpg2pjsXWAofMcNf3VPViZbRDRonu5xtJoH7vehTtKxZ0iysg2TV 51nDPAhZ369/CvCFhA1wrvQLQfHE9hyi5sctpKzmJYmKPNY96QunXQUKqfNlp57ltjBX 04W3bCtp83zOPi5x/zPahdwrU1muZojnmnjz7kMhBE1Hlc9YWFGeqdUQcSxcY8J47jdI nJRQ55pvpqcBB3BqRDsxXwLv5GE5q6uWw1t37TvG/snnGG2Wc7Z7otNQf7Em3zPKfU+D xp9w== 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=/hYs50GwFMyuZfrImrAOFNvNLwGPKhd/4T6LtSg8+5M=; b=2hcq8lvl1QsK6SyilwK8Mo5P6wBYTcigElDnnQ3X+4lTXY4oJuK3myW0hC10g+FLmS t051z+yXZnspFgnEoTEq4uaA/fVdtgMRPMl4VDnvBFvB49PHiOSo6MeIdpkerDsLYesZ zQ6926yNjSucDbe75etsX3Qe5sCVkLdnIIhVVXValPmhM0olGWDDN7nPkcuuvf073pzD by3hhXnNrOi1Dxfx6ebF20DKAgWWEdW7tvh8leMJZTJ+V59v6RL7Rw0ZWSnAJvO3tUKM qsMi8UhNea4N5x0JuyPddGDtHMxxOg82D/6TpWWLIlA4v8sw10PqCsqTCbqPuFIDp7nt LLnQ== X-Gm-Message-State: AFqh2koMI2cw55YeGamZSqfFjl+ppCKvyKTesx+FvPya0Fylf4XK+4Sw +Q3gamEVCq8zrAF1gIBF9UFdpVZgBOxAEHJu X-Received: by 2002:a17:907:908b:b0:846:cdd9:d28 with SMTP id ge11-20020a170907908b00b00846cdd90d28mr32353056ejb.30.1672870011907; Wed, 04 Jan 2023 14:06:51 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id hb1-20020a170906b88100b0078d9b967962sm15694423ejb.65.2023.01.04.14.06.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 04 Jan 2023 14:06:51 -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 14/20] hw/block: Remove unused pflash_cfi01_register() Date: Wed, 4 Jan 2023 23:04:43 +0100 Message-Id: <20230104220449.41337-15-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::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.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 We converted all caller of pflash_cfi01_register() by open coding a call to pflash_cfi01_create() followed by an explicit call to sysbus_mmio_map(); we can now remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng --- hw/block/pflash_cfi01.c | 19 ------------------- include/hw/block/flash.h | 9 --------- 2 files changed, 28 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 6a8f9e6319..9df79b102b 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -981,25 +981,6 @@ DeviceState *pflash_cfi01_create(const char *name, return dev; } -PFlashCFI01 *pflash_cfi01_register(hwaddr base, - const char *name, - hwaddr size, - BlockBackend *blk, - uint32_t sector_len, - int bank_width, - uint16_t id0, uint16_t id1, - uint16_t id2, uint16_t id3, - int be) -{ - DeviceState *dev; - - dev = pflash_cfi01_create(name, size, blk, sector_len, bank_width, - id0, id1, id2, id3, be); - sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); - - return PFLASH_CFI01(dev); -} - BlockBackend *pflash_cfi01_get_blk(DeviceState *dev) { PFlashCFI01 *fl = PFLASH_CFI01(dev); diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h index 40ba857f69..858c0a1b6e 100644 --- a/include/hw/block/flash.h +++ b/include/hw/block/flash.h @@ -24,15 +24,6 @@ DeviceState *pflash_cfi01_create(const char *name, uint16_t id0, uint16_t id1, uint16_t id2, uint16_t id3, int be); -PFlashCFI01 *pflash_cfi01_register(hwaddr base, - const char *name, - hwaddr size, - BlockBackend *blk, - uint32_t sector_len, - int width, - uint16_t id0, uint16_t id1, - uint16_t id2, uint16_t id3, - int be); BlockBackend *pflash_cfi01_get_blk(DeviceState *dev); MemoryRegion *pflash_cfi01_get_memory(DeviceState *dev); void pflash_cfi01_legacy_drive(DeviceState *dev, DriveInfo *dinfo);