[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 16/40] hw/riscv: Use the IEC binary prefix defini
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH v4 16/40] hw/riscv: Use the IEC binary prefix definitions |
Date: |
Sun, 10 Jun 2018 22:14:37 -0300 |
It eases code review, unit is explicit.
Patch generated using:
$ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/
and modified manually.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/riscv/virt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index ad03113e0f..34d48993a2 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "qemu/log.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
@@ -84,7 +85,7 @@ static hwaddr load_initrd(const char *filename, uint64_t
mem_size,
* halfway into RAM, and for boards with 256MB of RAM or more we put
* the initrd at 128MB.
*/
- *start = kernel_entry + MIN(mem_size / 2, 128 * 1024 * 1024);
+ *start = kernel_entry + MIN(mem_size / 2, 128 * MiB);
size = load_ramdisk(filename, *start, mem_size - *start);
if (size == -1) {
--
2.17.1
- [Qemu-devel] [PATCH v4 06/40] hw: Directly use "qemu/units.h" instead of "qemu/cutils.h", (continued)
- [Qemu-devel] [PATCH v4 06/40] hw: Directly use "qemu/units.h" instead of "qemu/cutils.h", Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 07/40] hw/ivshmem: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 08/40] hw/ipack: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 09/40] hw/scsi: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 10/40] hw/smbios: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 11/40] hw/xen: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 12/40] hw/tpm: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 13/40] hw/block: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 15/40] hw/misc: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 14/40] hw/display: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 16/40] hw/riscv: Use the IEC binary prefix definitions,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH v4 17/40] hw/m68k: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 18/40] hw/sparc: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 20/40] hw/hppa: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 19/40] hw/s390x: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 21/40] hw/xtensa: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 22/40] hw/alpha: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 23/40] hw/tricore: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 24/40] hw/microblaze: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 25/40] hw/nios2: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10