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>
This commit is contained in:
parent
947bf7fe9f
commit
5474aa4f3e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user