riscv: replace macro DIM() with ARRAY_SIZE()