[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/27] hw/mips/malta: Remove fl_sectors variable
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 11/27] hw/mips/malta: Remove fl_sectors variable |
Date: |
Mon, 11 Mar 2019 23:08:27 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
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é <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
---
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++;
--
2.17.2
- [Qemu-devel] [PULL 01/27] pflash: Rename pflash_t to PFlashCFI01, PFlashCFI02, (continued)
- [Qemu-devel] [PULL 01/27] pflash: Rename pflash_t to PFlashCFI01, PFlashCFI02, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 09/27] r2d: Fix flash memory size, sector size, width, device ID, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 06/27] sam460ex: Don't size flash memory to match backing image, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 08/27] ppc405_boards: Don't size flash memory to match backing image, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 20/27] vl: Improve legibility of BlockdevOptions queue, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 16/27] qdev: Fix latent bug with compat_props and onboard devices, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 05/27] hw: Use PFLASH_CFI0{1, 2} and TYPE_PFLASH_CFI0{1, 2}, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 24/27] pc_sysfw: Remove unused PcSysFwDevice, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 17/27] qom: Move compat_props machinery from qdev to QOM, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 04/27] pflash: Rename *CFI_PFLASH* to *PFLASH_CFI*, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 11/27] hw/mips/malta: Remove fl_sectors variable,
Markus Armbruster <=
- [Qemu-devel] [PULL 19/27] sysbus: Fix latent bug with onboard devices, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 12/27] hw/mips/malta: Restrict 'bios_size' variable scope, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 07/27] ppc405_boards: Delete stale, disabled DEBUG_BOARD_INIT code, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 21/27] vl: Factor configure_blockdev() out of main(), Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 26/27] pc: Support firmware configuration with -blockdev, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 13/27] mips_malta: Clean up definition of flash memory size somewhat, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 25/27] pc_sysfw: Pass PCMachineState to pc_system_firmware_init(), Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 27/27] docs/interop/firmware.json: Prefer -machine to if=pflash, Markus Armbruster, 2019/03/11