riscv: replace macro DIM() with ARRAY_SIZE()
authorAntonio Borneo <borneo.antonio@gmail.com>
Sun, 16 May 2021 12:02:53 +0000 (14:02 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 22 May 2021 09:11:41 +0000 (10:11 +0100)
commit036de3b48217e9c0b5ec0bbf6638e9cad6cae517
tree42c86aeaf2d7e8fb9a8e161969e2940311891357
parent8d207b5d2e034c94b7a989fcb20e90d496aa8c3b
riscv: replace macro DIM() with ARRAY_SIZE()

OpenOCD already defines the macro ARRAY_SIZE, while riscv code
uses a local macro DIM.

Prefer using the macro ARRAY_SIZE() instead of DIM().
Not all the riscv code has been upstreamed, yes; this patch only
covers the code already upstreamed.

Change-Id: I89a58a6d91916d85c53ba5e4091b558271f8d618
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6258
Reviewed-by: Xiang W <wxjstz@126.com>
Tested-by: jenkins
Reviewed-by: Tim Newsome <tim@sifive.com>
src/target/riscv/riscv-011.c
src/target/riscv/riscv-013.c
src/target/riscv/riscv.c