From 5207c595eb8910eee3d329214e65d64e348985d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Mar 2019 10:46:06 +0100 Subject: [PATCH] hw/mips/malta: Remove fl_sectors variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Variable fl_sectors is used just once. Since fl_sectors = bios_size >> 16 and bios_size = FLASH_SIZE there, we can simply use FLASH_SIZE >> 16, and eliminate variable. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Markus Armbruster Message-Id: <20190308094610.21210-12-armbru@redhat.com> --- hw/mips/mips_malta.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 8736d3a00e..51a3ecab59 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -1206,7 +1206,6 @@ void mips_malta_init(MachineState *machine) DriveInfo *dinfo; DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; int fl_idx = 0; - int fl_sectors = bios_size >> 16; int be; DeviceState *dev = qdev_create(NULL, TYPE_MIPS_MALTA); @@ -1266,7 +1265,7 @@ void mips_malta_init(MachineState *machine) fl = pflash_cfi01_register(FLASH_ADDRESS, NULL, "mips_malta.bios", BIOS_SIZE, dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, - 65536, fl_sectors, + 65536, FLASH_SIZE >> 16, 4, 0x0000, 0x0000, 0x0000, 0x0000, be); bios = pflash_cfi01_get_memory(fl); fl_idx++; -- GitLab