From patchwork Wed Jan 4 22:04:48 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: 639044 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp1965493pvb; Wed, 4 Jan 2023 14:19:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXv2iY4v4rn7S8Anp52msV2VPk8m7CY6/PadflvlyyuKf11ZBIR+TLmU9/FXdmyv1qyW2m4k X-Received: by 2002:ad4:4e8c:0:b0:52d:2224:5660 with SMTP id dy12-20020ad44e8c000000b0052d22245660mr63579955qvb.37.1672870772900; Wed, 04 Jan 2023 14:19:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672870772; cv=none; d=google.com; s=arc-20160816; b=OJNCujIpv3DuyeOiIFc4yHasbtLBDChvYyoJsTFFfbyJiWrdjiz3RAUlE3XMLk/g3K YfKxM8htVbHK0G3wLTf7sLYqemtbCBBIK7JKko32DoRXEWm531ZJIA0sXJ26Ogosk5i3 gSAm+EsTsR1Kspxk2LdeqkThqbJrLoOa2l+ixXvRHUeJEmLzGCMgoJ7uDY8S/G1RqQy3 Vy6rjOZldwvBULN67ZBTzNOtmORZCDEom+KNvENsmFkEBTQepdPH9n9wjY2kSad0Yxc5 gVSgWuE5K5B2FX1gqziWQzEudx+aK7AI7uLzajddD8r9syoujRU4bOktyo8vAPslxTkP NrDQ== 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=1aa33f3a7n9BSTQqA7U/LbCvTvRWLOt7Nts6p8HXsEU=; b=Nx7KpA9ERXRhp3V6VPp8gE84tG4wdlw9OhHX2wpgDjexA1khV4xtQTuH78kKuARAgf Ymr9Iw89x5osa8NWEgScsdKdUBLi53eT0JOsfgWAmgKRCwMfdioNMEG+9hpqZBDwCBKO j51Ww74qFaq8mcz3kXKrNvS+Hga7fqU6HskTSAUte7u5l+PlrrsshEEACVR9/7/hpEUW hbjK3J7EQ78KHUdc2OtcdrbHT7d6ME1SIO0vcRGDE9cUof+kpP5pzKICR7HIK/uq7ZMG R3A81rELImtElSKdQNmBbYMhy2K6wS4/oufyUluGYNPbn/gKPZz8kQkC8Xc6DSkppK/z gxlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HF8qRByT; 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 fw14-20020a056214238e00b004c68b87e5a0si19102538qvb.366.2023.01.04.14.19.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Jan 2023 14:19:32 -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=HF8qRByT; 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 1pDBvf-0002Wp-2w; Wed, 04 Jan 2023 17:08:11 -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 1pDBvC-0002B1-Oi for qemu-devel@nongnu.org; Wed, 04 Jan 2023 17:07:42 -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 1pDBv9-0000Lo-LC for qemu-devel@nongnu.org; Wed, 04 Jan 2023 17:07:42 -0500 Received: by mail-ej1-x631.google.com with SMTP id fc4so85886144ejc.12 for ; Wed, 04 Jan 2023 14:07:38 -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=1aa33f3a7n9BSTQqA7U/LbCvTvRWLOt7Nts6p8HXsEU=; b=HF8qRByTAVk8VS2Xa8Bogk8aJuJWs1R6Jucp9qhx2tprzLDSWbbvnoJYLiy9Oz3x7E qdkFnt5GpbXnBAAQvXgn/Ydp0wxSxRK8V0vfeGZtXQoWyrDqlEHRQpfKv3uGm69LEhMF uEIh95xePAgB91KA5Jc3djKwW4tGt068OiKwrxJIBG2PfdtYsLrbhUdJCVIDlztQz9/m 8u7ZC9EBr5AQYvvYsAhmhORW87fYg9g+HPLbkHIhlO2adM3HgvU1gqhyEwMqLM0jG+Xr XYR+ijDKJVJMDF5sC0HZHQzTVGetnjIvIoZBSXWgP3aUBZ5LgoYLmzGt4C9Y3lL7bQXO YUYQ== 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=1aa33f3a7n9BSTQqA7U/LbCvTvRWLOt7Nts6p8HXsEU=; b=jixWCO8VTwrpWfuig8fh+JD7bcdRf9s4hncOAIF2u0n1mGZAjVRIrjJnwmDXSboR+P rHjXjMAkuI69prOTn1AUgRa8y/afCHEJzZF6s7HMo+YK6cbt5KqyVvax0ygkPrsBwzbf xCRoBHlGelHfXspeztwBNdYP3GYRxsZ9cSM6LrNaHjxFIW9TzbNL7+J4j/hFsxEYXyLd c0oXD+ehtlnCAcWF+HMGC7F6ac86CrCfn6V88D3oz/DD5z/a8DFKQA3gpPvKAb1cp7Tg kSNn0ws7beC7xuhvKbh7VX967r+C9lWtLJaOkJ0h70CF55GDO/3PCF7TYI04HlQcwHkj PgIg== X-Gm-Message-State: AFqh2kpQ/i8qiRW+8ABNuO9xvLWj6cxkKMe5EhzqmLJPSzHvOdg7OBFH JQay7QTjGXfl7qinGyHcip0kVC92aMi1Ho3G X-Received: by 2002:a17:907:8b98:b0:840:a6a3:41c7 with SMTP id tb24-20020a1709078b9800b00840a6a341c7mr44366000ejc.50.1672870057438; Wed, 04 Jan 2023 14:07:37 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id f11-20020a17090631cb00b0084c465709b7sm12959809ejf.74.2023.01.04.14.07.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 04 Jan 2023 14:07:37 -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 19/20] hw/block: Remove unused pflash_cfi02_register() Date: Wed, 4 Jan 2023 23:04:48 +0100 Message-Id: <20230104220449.41337-20-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=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_cfi02_register() by open coding a call to pflash_cfi02_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_cfi02.c | 22 ---------------------- include/hw/block/flash.h | 12 ------------ 2 files changed, 34 deletions(-) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index 176f93b512..a9dcabdeb2 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw/block/pflash_cfi02.c @@ -1024,25 +1024,3 @@ DeviceState *pflash_cfi02_create(const char *name, hwaddr size, return dev; } - -PFlashCFI02 *pflash_cfi02_register(hwaddr base, - const char *name, - hwaddr size, - BlockBackend *blk, - uint32_t sector_len, - int nb_mappings, int width, - uint16_t id0, uint16_t id1, - uint16_t id2, uint16_t id3, - uint16_t unlock_addr0, - uint16_t unlock_addr1, - int be) -{ - DeviceState *dev; - - dev = pflash_cfi02_create(name, size, blk, sector_len, - nb_mappings, width, id0, id1, id2, id3, - unlock_addr0, unlock_addr1, be); - sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); - - return PFLASH_CFI02(dev); -} diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h index 78b078955e..64ee40c561 100644 --- a/include/hw/block/flash.h +++ b/include/hw/block/flash.h @@ -45,18 +45,6 @@ DeviceState *pflash_cfi02_create(const char *name, hwaddr size, uint16_t id2, uint16_t id3, uint16_t unlock_addr0, uint16_t unlock_addr1, int be); -PFlashCFI02 *pflash_cfi02_register(hwaddr base, - const char *name, - hwaddr size, - BlockBackend *blk, - uint32_t sector_len, - int nb_mappings, - int width, - uint16_t id0, uint16_t id1, - uint16_t id2, uint16_t id3, - uint16_t unlock_addr0, - uint16_t unlock_addr1, - int be); /* nand.c */ DeviceState *nand_init(BlockBackend *blk, int manf_id, int chip_id);