diff options
author | Bin Meng <bmeng@tinylab.org> | 2022-12-29 17:18:19 +0800 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2023-01-20 10:14:13 +1000 |
commit | dc6882464161a7bf77c8b847cef6d4f2f9066361 (patch) | |
tree | dc8cbbb704673a65a1742d32f375c8f7f7ae97c9 /hw/char | |
parent | bc9c3b18626fbfe9eb8f37438b5fbb2f901c2460 (diff) | |
download | qemu-dc6882464161a7bf77c8b847cef6d4f2f9066361.zip qemu-dc6882464161a7bf77c8b847cef6d4f2f9066361.tar.gz qemu-dc6882464161a7bf77c8b847cef6d4f2f9066361.tar.bz2 |
hw/char: riscv_htif: Drop useless assignment of memory region
struct HTIFState has 3 members for address space and memory region,
and are initialized during htif_mm_init(). But they are actually
useless. Drop them.
Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20221229091828.1945072-4-bmeng@tinylab.org>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'hw/char')
-rw-r--r-- | hw/char/riscv_htif.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/char/riscv_htif.c b/hw/char/riscv_htif.c index 088556b..e7e319c 100644 --- a/hw/char/riscv_htif.c +++ b/hw/char/riscv_htif.c @@ -265,8 +265,8 @@ bool htif_uses_elf_symbols(void) return (address_symbol_set == 3) ? true : false; } -HTIFState *htif_mm_init(MemoryRegion *address_space, MemoryRegion *main_mem, - CPURISCVState *env, Chardev *chr, uint64_t nonelf_base) +HTIFState *htif_mm_init(MemoryRegion *address_space, CPURISCVState *env, + Chardev *chr, uint64_t nonelf_base) { uint64_t base, size, tohost_offset, fromhost_offset; @@ -281,9 +281,6 @@ HTIFState *htif_mm_init(MemoryRegion *address_space, MemoryRegion *main_mem, fromhost_offset = fromhost_addr - base; HTIFState *s = g_new0(HTIFState, 1); - s->address_space = address_space; - s->main_mem = main_mem; - s->main_mem_ram_ptr = memory_region_get_ram_ptr(main_mem); s->env = env; s->tohost_offset = tohost_offset; s->fromhost_offset = fromhost_offset; |