提交 31019075 编写于 作者: J Joe Perches 提交者: Matt Turner

alpha: Use static const char * const where possible

Acked-by: NRichard Henderson  <rth@twiddle.net>
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NMatt Turner <mattst88@gmail.com>
上级 151b6a5f
...@@ -90,11 +90,13 @@ static int ...@@ -90,11 +90,13 @@ static int
ev6_parse_cbox(u64 c_addr, u64 c1_syn, u64 c2_syn, ev6_parse_cbox(u64 c_addr, u64 c1_syn, u64 c2_syn,
u64 c_stat, u64 c_sts, int print) u64 c_stat, u64 c_sts, int print)
{ {
char *sourcename[] = { "UNKNOWN", "UNKNOWN", "UNKNOWN", static const char * const sourcename[] = {
"MEMORY", "BCACHE", "DCACHE", "UNKNOWN", "UNKNOWN", "UNKNOWN",
"BCACHE PROBE", "BCACHE PROBE" }; "MEMORY", "BCACHE", "DCACHE",
char *streamname[] = { "D", "I" }; "BCACHE PROBE", "BCACHE PROBE"
char *bitsname[] = { "SINGLE", "DOUBLE" }; };
static const char * const streamname[] = { "D", "I" };
static const char * const bitsname[] = { "SINGLE", "DOUBLE" };
int status = MCHK_DISPOSITION_REPORT; int status = MCHK_DISPOSITION_REPORT;
int source = -1, stream = -1, bits = -1; int source = -1, stream = -1, bits = -1;
......
...@@ -589,22 +589,23 @@ marvel_print_pox_spl_cmplt(u64 spl_cmplt) ...@@ -589,22 +589,23 @@ marvel_print_pox_spl_cmplt(u64 spl_cmplt)
static void static void
marvel_print_pox_trans_sum(u64 trans_sum) marvel_print_pox_trans_sum(u64 trans_sum)
{ {
char *pcix_cmd[] = { "Interrupt Acknowledge", static const char * const pcix_cmd[] = {
"Special Cycle", "Interrupt Acknowledge",
"I/O Read", "Special Cycle",
"I/O Write", "I/O Read",
"Reserved", "I/O Write",
"Reserved / Device ID Message", "Reserved",
"Memory Read", "Reserved / Device ID Message",
"Memory Write", "Memory Read",
"Reserved / Alias to Memory Read Block", "Memory Write",
"Reserved / Alias to Memory Write Block", "Reserved / Alias to Memory Read Block",
"Configuration Read", "Reserved / Alias to Memory Write Block",
"Configuration Write", "Configuration Read",
"Memory Read Multiple / Split Completion", "Configuration Write",
"Dual Address Cycle", "Memory Read Multiple / Split Completion",
"Memory Read Line / Memory Read Block", "Dual Address Cycle",
"Memory Write and Invalidate / Memory Write Block" "Memory Read Line / Memory Read Block",
"Memory Write and Invalidate / Memory Write Block"
}; };
#define IO7__POX_TRANSUM__PCI_ADDR__S (0) #define IO7__POX_TRANSUM__PCI_ADDR__S (0)
......
...@@ -75,8 +75,12 @@ titan_parse_p_serror(int which, u64 serror, int print) ...@@ -75,8 +75,12 @@ titan_parse_p_serror(int which, u64 serror, int print)
int status = MCHK_DISPOSITION_REPORT; int status = MCHK_DISPOSITION_REPORT;
#ifdef CONFIG_VERBOSE_MCHECK #ifdef CONFIG_VERBOSE_MCHECK
char *serror_src[] = {"GPCI", "APCI", "AGP HP", "AGP LP"}; static const char * const serror_src[] = {
char *serror_cmd[] = {"DMA Read", "DMA RMW", "SGTE Read", "Reserved"}; "GPCI", "APCI", "AGP HP", "AGP LP"
};
static const char * const serror_cmd[] = {
"DMA Read", "DMA RMW", "SGTE Read", "Reserved"
};
#endif /* CONFIG_VERBOSE_MCHECK */ #endif /* CONFIG_VERBOSE_MCHECK */
#define TITAN__PCHIP_SERROR__LOST_UECC (1UL << 0) #define TITAN__PCHIP_SERROR__LOST_UECC (1UL << 0)
...@@ -140,14 +144,15 @@ titan_parse_p_perror(int which, int port, u64 perror, int print) ...@@ -140,14 +144,15 @@ titan_parse_p_perror(int which, int port, u64 perror, int print)
int status = MCHK_DISPOSITION_REPORT; int status = MCHK_DISPOSITION_REPORT;
#ifdef CONFIG_VERBOSE_MCHECK #ifdef CONFIG_VERBOSE_MCHECK
char *perror_cmd[] = { "Interrupt Acknowledge", "Special Cycle", static const char * const perror_cmd[] = {
"I/O Read", "I/O Write", "Interrupt Acknowledge", "Special Cycle",
"Reserved", "Reserved", "I/O Read", "I/O Write",
"Memory Read", "Memory Write", "Reserved", "Reserved",
"Reserved", "Reserved", "Memory Read", "Memory Write",
"Configuration Read", "Configuration Write", "Reserved", "Reserved",
"Memory Read Multiple", "Dual Address Cycle", "Configuration Read", "Configuration Write",
"Memory Read Line","Memory Write and Invalidate" "Memory Read Multiple", "Dual Address Cycle",
"Memory Read Line", "Memory Write and Invalidate"
}; };
#endif /* CONFIG_VERBOSE_MCHECK */ #endif /* CONFIG_VERBOSE_MCHECK */
...@@ -273,11 +278,11 @@ titan_parse_p_agperror(int which, u64 agperror, int print) ...@@ -273,11 +278,11 @@ titan_parse_p_agperror(int which, u64 agperror, int print)
int cmd, len; int cmd, len;
unsigned long addr; unsigned long addr;
char *agperror_cmd[] = { "Read (low-priority)", "Read (high-priority)", static const char * const agperror_cmd[] = {
"Write (low-priority)", "Read (low-priority)", "Read (high-priority)",
"Write (high-priority)", "Write (low-priority)", "Write (high-priority)",
"Reserved", "Reserved", "Reserved", "Reserved",
"Flush", "Fence" "Flush", "Fence"
}; };
#endif /* CONFIG_VERBOSE_MCHECK */ #endif /* CONFIG_VERBOSE_MCHECK */
......
...@@ -594,7 +594,7 @@ SYSCALL_DEFINE2(osf_sigstack, struct sigstack __user *, uss, ...@@ -594,7 +594,7 @@ SYSCALL_DEFINE2(osf_sigstack, struct sigstack __user *, uss,
SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count) SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
{ {
char *sysinfo_table[] = { const char *sysinfo_table[] = {
utsname()->sysname, utsname()->sysname,
utsname()->nodename, utsname()->nodename,
utsname()->release, utsname()->release,
...@@ -606,7 +606,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count) ...@@ -606,7 +606,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
"dummy", /* secure RPC domain */ "dummy", /* secure RPC domain */
}; };
unsigned long offset; unsigned long offset;
char *res; const char *res;
long len, err = -EINVAL; long len, err = -EINVAL;
offset = command-1; offset = command-1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册