|
|
383d26 |
From 1170f872af13f294082e33e172e3c6e3a8995895 Mon Sep 17 00:00:00 2001
|
|
|
383d26 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
383d26 |
Date: Fri, 17 May 2019 06:51:02 +0200
|
|
|
383d26 |
Subject: [PATCH 35/53] hw/mips/malta: Remove fl_sectors variable
|
|
|
383d26 |
MIME-Version: 1.0
|
|
|
383d26 |
Content-Type: text/plain; charset=UTF-8
|
|
|
383d26 |
Content-Transfer-Encoding: 8bit
|
|
|
383d26 |
|
|
|
383d26 |
RH-Author: Markus Armbruster <armbru@redhat.com>
|
|
|
383d26 |
Message-id: <20190517065120.12028-14-armbru@redhat.com>
|
|
|
383d26 |
Patchwork-id: 87996
|
|
|
383d26 |
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH v3 13/31] hw/mips/malta: Remove fl_sectors variable
|
|
|
383d26 |
Bugzilla: 1624009
|
|
|
383d26 |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
383d26 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
383d26 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
383d26 |
|
|
|
383d26 |
From: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
383d26 |
|
|
|
383d26 |
Variable fl_sectors is used just once. Since
|
|
|
383d26 |
fl_sectors = bios_size >> 16 and bios_size = FLASH_SIZE there,
|
|
|
383d26 |
we can simply use FLASH_SIZE >> 16, and eliminate variable.
|
|
|
383d26 |
|
|
|
383d26 |
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
383d26 |
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
|
|
|
383d26 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
383d26 |
Message-Id: <20190308094610.21210-12-armbru@redhat.com>
|
|
|
383d26 |
(cherry picked from commit 5207c595eb8910eee3d329214e65d64e348985d1)
|
|
|
383d26 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
383d26 |
---
|
|
|
383d26 |
hw/mips/mips_malta.c | 3 +--
|
|
|
383d26 |
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
383d26 |
|
|
|
383d26 |
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
|
|
|
383d26 |
index 7f19bdc..0566d18 100644
|
|
|
383d26 |
--- a/hw/mips/mips_malta.c
|
|
|
383d26 |
+++ b/hw/mips/mips_malta.c
|
|
|
383d26 |
@@ -1003,7 +1003,6 @@ void mips_malta_init(MachineState *machine)
|
|
|
383d26 |
DriveInfo *dinfo;
|
|
|
383d26 |
DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
|
|
|
383d26 |
int fl_idx = 0;
|
|
|
383d26 |
- int fl_sectors = bios_size >> 16;
|
|
|
383d26 |
int be;
|
|
|
383d26 |
|
|
|
383d26 |
DeviceState *dev = qdev_create(NULL, TYPE_MIPS_MALTA);
|
|
|
383d26 |
@@ -1067,7 +1066,7 @@ void mips_malta_init(MachineState *machine)
|
|
|
383d26 |
fl = pflash_cfi01_register(FLASH_ADDRESS, NULL, "mips_malta.bios",
|
|
|
383d26 |
BIOS_SIZE,
|
|
|
383d26 |
dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
|
|
|
383d26 |
- 65536, fl_sectors,
|
|
|
383d26 |
+ 65536, FLASH_SIZE >> 16,
|
|
|
383d26 |
4, 0x0000, 0x0000, 0x0000, 0x0000, be);
|
|
|
383d26 |
bios = pflash_cfi01_get_memory(fl);
|
|
|
383d26 |
fl_idx++;
|
|
|
383d26 |
--
|
|
|
383d26 |
1.8.3.1
|
|
|
383d26 |
|