[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v9 01/23] target/riscv: Move MISA limits to class
|
From: |
Alex Bennée |
|
Subject: |
Re: [PATCH v9 01/23] target/riscv: Move MISA limits to class |
|
Date: |
Wed, 11 Oct 2023 17:04:00 +0100 |
|
User-agent: |
mu4e 1.11.22; emacs 29.1.50 |
Akihiko Odaki <akihiko.odaki@daynix.com> writes:
> MISA limits are common for all instances of a RISC-V CPU class so they
> are better put into class.
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
<snip>
> +static void riscv_host_cpu_init(Object *obj)
> +{
> + CPURISCVState *env = &RISCV_CPU(obj)->env;
> riscv_cpu_add_user_properties(obj);
> }
You don't actually need env here, although only picked up by one
compiler:
../target/riscv/cpu.c: In function ‘riscv_host_cpu_init’:
../target/riscv/cpu.c:673:20: error: unused variable ‘env’
[-Werror=unused-variable]
673 | CPURISCVState *env = &RISCV_CPU(obj)->env;
| ^~~
../target/riscv/cpu.c: At top level:
../target/riscv/cpu.c:2337:31: error: lvalue required as unary ‘&’ operand
2337 | .class_data = (void *)&(class_data_value) \
| ^
../target/riscv/cpu.c:2368:5: note: in expansion of macro ‘DEFINE_CPU’
2368 | DEFINE_CPU(TYPE_RISCV_CPU_HOST,
| ^~~~~~~~~~
cc1: all warnings being treated as errors
https://gitlab.com/stsquad/qemu/-/jobs/5271601075
<snip>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
- [PATCH v9 00/23] plugins: Allow to read registers, Akihiko Odaki, 2023/10/11
- [PATCH v9 01/23] target/riscv: Move MISA limits to class, Akihiko Odaki, 2023/10/11
- [PATCH v9 02/23] target/riscv: Remove misa_mxl validation, Akihiko Odaki, 2023/10/11
- [PATCH v9 03/23] target/riscv: Validate misa_mxl_max only once, Akihiko Odaki, 2023/10/11
- [PATCH v9 04/23] gdbstub: Add num_regs member to GDBFeature, Akihiko Odaki, 2023/10/11
- [PATCH v9 05/23] gdbstub: Introduce gdb_find_static_feature(), Akihiko Odaki, 2023/10/11
- [PATCH v9 06/23] gdbstub: Introduce GDBFeatureBuilder, Akihiko Odaki, 2023/10/11
- [PATCH v9 07/23] target/arm: Use GDBFeature for dynamic XML, Akihiko Odaki, 2023/10/11
- [PATCH v9 09/23] target/riscv: Use GDBFeature for dynamic XML, Akihiko Odaki, 2023/10/11