[U-Boot,5/5] riscv: checkpatch: Fix static const char * array declarations

Message ID 20180313075913.5873-1-uboot@andestech.com
State Accepted
Commit 22e8c0f02b4f1b79ebc752c662498fb6fbe30935
Delegated to: Andes
Headers show
Series
  • [U-Boot,1/5] riscv: checkpatch: Fix Macro argument reuse
Related show

Commit Message

Andes March 13, 2018, 7:59 a.m.
From: Rick Chen <rick@andestech.com>

It is reported by checkpatch.pl
WARNING: static const char * array
should probably be static const char * const

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
---
 arch/riscv/lib/interrupts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c
index 075db8b..923f752 100644
--- a/arch/riscv/lib/interrupts.c
+++ b/arch/riscv/lib/interrupts.c
@@ -63,7 +63,7 @@  __attribute__((weak)) void timer_interrupt(struct pt_regs *regs)
 
 static void _exit_trap(int code, uint epc, struct pt_regs *regs)
 {
-	static const char *exception_code[] = {
+	static const char * const exception_code[] = {
 		"Instruction address misaligned",
 		"Instruction access fault",
 		"Illegal instruction",