aboutsummaryrefslogtreecommitdiff
path: root/hw/riscv
diff options
context:
space:
mode:
authorBin Meng <bmeng@tinylab.org>2023-02-06 16:50:07 +0800
committerAlistair Francis <alistair.francis@wdc.com>2023-02-07 08:21:32 +1000
commit5474aa4f3e0a3e9c171db7c55b5baf15f2e2778c (patch)
tree9ac4755512a3e70b368f0e235e6b7f57d8304dac /hw/riscv
parent947bf7fe9f0831cb6944334a06ff0b84926612b8 (diff)
hw/riscv: virt: Simplify virt_{get,set}_aclint()
There is no need to declare an intermediate "MachineState *ms". Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20230206085007.3618715-1-bmeng@tinylab.org> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'hw/riscv')
-rw-r--r--hw/riscv/virt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index a061151a6f..b81081c70b 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -1583,16 +1583,14 @@ static void virt_set_aia(Object *obj, const char *val, Error **errp)
static bool virt_get_aclint(Object *obj, Error **errp)
{
- MachineState *ms = MACHINE(obj);
- RISCVVirtState *s = RISCV_VIRT_MACHINE(ms);
+ RISCVVirtState *s = RISCV_VIRT_MACHINE(obj);
return s->have_aclint;
}
static void virt_set_aclint(Object *obj, bool value, Error **errp)
{
- MachineState *ms = MACHINE(obj);
- RISCVVirtState *s = RISCV_VIRT_MACHINE(ms);
+ RISCVVirtState *s = RISCV_VIRT_MACHINE(obj);
s->have_aclint = value;
}