[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH v3 21/41] hw/xtensa: Use the BYTE-based definition
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-trivial] [PATCH v3 21/41] hw/xtensa: Use the BYTE-based definitions |
Date: |
Sun, 15 Apr 2018 20:42:47 -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>
Acked-by: Max Filippov <address@hidden>
---
hw/xtensa/xtfpga.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index 70686a2eb1..2d1cce1d31 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -26,6 +26,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "qapi/error.h"
#include "cpu.h"
#include "sysemu/sysemu.h"
@@ -153,7 +154,7 @@ static void xtfpga_net_init(MemoryRegion *address_space,
sysbus_mmio_get_region(s, 1));
ram = g_malloc(sizeof(*ram));
- memory_region_init_ram_nomigrate(ram, OBJECT(s), "open_eth.ram", 16384,
+ memory_region_init_ram_nomigrate(ram, OBJECT(s), "open_eth.ram", 16 *
K_BYTE,
&error_fatal);
vmstate_register_ram_global(ram);
memory_region_add_subregion(address_space, buffers, ram);
@@ -230,7 +231,7 @@ static void xtfpga_init(const XtfpgaBoardDesc *board,
MachineState *machine)
const char *kernel_cmdline = qemu_opt_get(machine_opts, "append");
const char *dtb_filename = qemu_opt_get(machine_opts, "dtb");
const char *initrd_filename = qemu_opt_get(machine_opts, "initrd");
- const unsigned system_io_size = 224 * 1024 * 1024;
+ const unsigned system_io_size = 224 * M_BYTE;
int n;
for (n = 0; n < smp_cpus; n++) {
--
2.17.0
- [Qemu-trivial] [PATCH v3 10/41] hw/smbios: Use the BYTE-based definitions, (continued)
- [Qemu-trivial] [PATCH v3 10/41] hw/smbios: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 11/41] hw/xen: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 12/41] hw/tpm: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 13/41] hw/block: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 15/41] hw/misc: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 16/41] hw/riscv: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 17/41] hw/m68k: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 18/41] hw/sparc: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 19/41] hw/s390x: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 21/41] hw/xtensa: Use the BYTE-based definitions,
Philippe Mathieu-Daudé <=
- [Qemu-trivial] [PATCH v3 22/41] hw/alpha: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 23/41] hw/tricore: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 24/41] hw/microblaze: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 25/41] hw/nios2: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 26/41] hw/cris: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 27/41] hw/lm32: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 28/41] hw/sh4: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15
- [Qemu-trivial] [PATCH v3 29/41] hw/mips: Use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/04/15