riscv: Trap cleanup - use nitems()
No functional changes, just cleanup.
Reviewed by: kp Approved by: kp (mentor) Sponsored by: Axiado