target/riscv: Declare csr_ops[] with a known size
PATCH 1/1 target/riscv: Declare csr_ops[] with a known size
From: Bin Meng <[email protected]>
csr_ops[] is currently declared with an unknown size in cpu.h. Since the array size is known, let's do a complete declaration.
---
target/riscv/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/riscv/cpu.h +1 -1
@@ -487,7 +487,7 @@ enum { };/* CSR function table */ -extern riscv_csr_operations csr_ops[]; +extern riscv_csr_operations csr_ops[CSR_TABLE_SIZE ];void riscv_get_csr_ops (int csrno,riscv_csr_operations *ops);void riscv_set_csr_ops (int csrno,riscv_csr_operations *ops);
Signature · 1 line
2.7.4
Quoted 10 lines · Bin Meng
From: Bin Meng <[email protected]>
csr_ops[] is currently declared with an unknown size in
cpu.h. Since the array size is known, let's do a complete declaration.Signed-off-by Bin Meng <[email protected]>---
target/riscv/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 2 lines · Bin Meng
From: Bin Meng <[email protected]>
Alistair
Quoted 27 lines
csr_ops[] is currently declared with an unknown size in
cpu.h. Since the array size is known, let's do a complete declaration.Signed-off-by Bin Meng <[email protected]>---
target/riscv/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/riscv/cpu.h +1
-2@@ -487,7 +487,7 @@ enum { };/* CSR function table */ -extern riscv_csr_operations csr_ops[]; +extern riscv_csr_operations csr_ops[CSR_TABLE_SIZE ];void riscv_get_csr_ops (int csrno,riscv_csr_operations *ops);void riscv_set_csr_ops (int csrno,riscv_csr_operations *ops); --2.7.4
Alistair Francis
AppliedQuoted 7 lines · Bin Meng
From: Bin Meng <[email protected]>
csr_ops[] is currently declared with an unknown size in
cpu.h. Since the array size is known, let's do a complete declaration.Signed-off-by Bin Meng <[email protected]>
Thanks!
Applied to riscv-to-apply.next
Alistair
Quoted 22 lines
---
target/riscv/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/riscv/cpu.h +1
-2@@ -487,7 +487,7 @@ enum { };/* CSR function table */ -extern riscv_csr_operations csr_ops[]; +extern riscv_csr_operations csr_ops[CSR_TABLE_SIZE ];void riscv_get_csr_ops (int csrno,riscv_csr_operations *ops);void riscv_set_csr_ops (int csrno,riscv_csr_operations *ops); --2.7.4