From patchwork Tue Mar 26 09:05:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 1065335 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44T4xC0fNzz9sSX for ; Tue, 26 Mar 2019 20:06:06 +1100 (AEDT) Received: from localhost ([127.0.0.1]:55162 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8i20-0001KC-OO for incoming@patchwork.ozlabs.org; Tue, 26 Mar 2019 05:06:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8i13-0001Cu-1D for qemu-devel@nongnu.org; Tue, 26 Mar 2019 05:05:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8i11-0004Ig-Tv for qemu-devel@nongnu.org; Tue, 26 Mar 2019 05:05:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35388) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h8i11-0004Hw-Kj for qemu-devel@nongnu.org; Tue, 26 Mar 2019 05:05:03 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4BC6307FBCB; Tue, 26 Mar 2019 09:05:02 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-116.ams2.redhat.com [10.36.116.116]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 952718386A; Tue, 26 Mar 2019 09:05:02 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 188551132BD3; Tue, 26 Mar 2019 10:05:01 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 26 Mar 2019 10:05:01 +0100 Message-Id: <20190326090501.15253-3-armbru@redhat.com> In-Reply-To: <20190326090501.15253-1-armbru@redhat.com> References: <20190326090501.15253-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 26 Mar 2019 09:05:02 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/2] pflash: Bury disabled code to limit device sizes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée We disabled code to limit device sizes to 8, 16, 32 or 64MiB more than a decade ago in commit 95d1f3edd5e and c8b153d7949, v0.9.1. Bury. Signed-off-by: Alex Bennée Reviewed-by: Laszlo Ersek [Extracted from a larger patch, extended to pflash_cfi02.c] Signed-off-by: Markus Armbruster Message-Id: <20190319163551.32499-3-armbru@redhat.com> --- hw/block/pflash_cfi01.c | 7 ------- hw/block/pflash_cfi02.c | 6 ------ 2 files changed, 13 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 9937739a82..16dfae14b8 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -731,13 +731,6 @@ static void pflash_cfi01_realize(DeviceState *dev, Error **errp) } device_len = sector_len_per_device * blocks_per_device; - /* XXX: to be fixed */ -#if 0 - if (total_len != (8 * 1024 * 1024) && total_len != (16 * 1024 * 1024) && - total_len != (32 * 1024 * 1024) && total_len != (64 * 1024 * 1024)) - return NULL; -#endif - memory_region_init_rom_device( &pfl->mem, OBJECT(dev), &pflash_cfi01_ops, diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index 9b934305fa..f2c6201f81 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw/block/pflash_cfi02.c @@ -551,12 +551,6 @@ static void pflash_cfi02_realize(DeviceState *dev, Error **errp) } chip_len = pfl->sector_len * pfl->nb_blocs; - /* XXX: to be fixed */ -#if 0 - if (total_len != (8 * 1024 * 1024) && total_len != (16 * 1024 * 1024) && - total_len != (32 * 1024 * 1024) && total_len != (64 * 1024 * 1024)) - return NULL; -#endif memory_region_init_rom_device(&pfl->orig_mem, OBJECT(pfl), pfl->be ? &pflash_cfi02_ops_be : &pflash_cfi02_ops_le,