diff options
| author | Daniel Henrique Barboza <dbarboza@ventanamicro.com> | 2023-02-24 14:45:19 -0300 |
|---|---|---|
| committer | Palmer Dabbelt <palmer@rivosinc.com> | 2023-03-01 17:40:14 -0800 |
| commit | a9a4e39fd2bbf09bf10cb30700f4792a10cd2392 (patch) | |
| tree | 5e6b41b6a463e6558232ce88ec302a9e39de7fb3 /hw/core/machine-qmp-cmds.c | |
| parent | 96b1b00058fc95de6c76c441a8b941003de3a54d (diff) | |
| download | focaccia-qemu-a9a4e39fd2bbf09bf10cb30700f4792a10cd2392.tar.gz focaccia-qemu-a9a4e39fd2bbf09bf10cb30700f4792a10cd2392.zip | |
target/riscv/csr.c: use riscv_cpu_cfg() to avoid env_cpu() pointers
A common trend in this file is to retrieve a RISCVCPU pointer by first retrieving a CPUState pointer via env_cpu(). The CPU pointer is used only to access the RISCVCPUConfig object and nothing else. Let's use riscv_cpu_cfg() to access what we need directly without these 2 pointers. Suggested-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20230224174520.92490-4-dbarboza@ventanamicro.com> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'hw/core/machine-qmp-cmds.c')
0 files changed, 0 insertions, 0 deletions