Commit 31019075f41c785eff7f38c62e4c700af019fdb7

Authored by Joe Perches
Committed by Matt Turner
1 parent 151b6a5f1d

alpha: Use static const char * const where possible

Acked-by: Richard Henderson  <rth@twiddle.net>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>

Showing 4 changed files with 46 additions and 38 deletions Side-by-side Diff

arch/alpha/kernel/err_ev6.c
... ... @@ -90,11 +90,13 @@
90 90 ev6_parse_cbox(u64 c_addr, u64 c1_syn, u64 c2_syn,
91 91 u64 c_stat, u64 c_sts, int print)
92 92 {
93   - char *sourcename[] = { "UNKNOWN", "UNKNOWN", "UNKNOWN",
94   - "MEMORY", "BCACHE", "DCACHE",
95   - "BCACHE PROBE", "BCACHE PROBE" };
96   - char *streamname[] = { "D", "I" };
97   - char *bitsname[] = { "SINGLE", "DOUBLE" };
  93 + static const char * const sourcename[] = {
  94 + "UNKNOWN", "UNKNOWN", "UNKNOWN",
  95 + "MEMORY", "BCACHE", "DCACHE",
  96 + "BCACHE PROBE", "BCACHE PROBE"
  97 + };
  98 + static const char * const streamname[] = { "D", "I" };
  99 + static const char * const bitsname[] = { "SINGLE", "DOUBLE" };
98 100 int status = MCHK_DISPOSITION_REPORT;
99 101 int source = -1, stream = -1, bits = -1;
100 102  
arch/alpha/kernel/err_marvel.c
... ... @@ -589,22 +589,23 @@
589 589 static void
590 590 marvel_print_pox_trans_sum(u64 trans_sum)
591 591 {
592   - char *pcix_cmd[] = { "Interrupt Acknowledge",
593   - "Special Cycle",
594   - "I/O Read",
595   - "I/O Write",
596   - "Reserved",
597   - "Reserved / Device ID Message",
598   - "Memory Read",
599   - "Memory Write",
600   - "Reserved / Alias to Memory Read Block",
601   - "Reserved / Alias to Memory Write Block",
602   - "Configuration Read",
603   - "Configuration Write",
604   - "Memory Read Multiple / Split Completion",
605   - "Dual Address Cycle",
606   - "Memory Read Line / Memory Read Block",
607   - "Memory Write and Invalidate / Memory Write Block"
  592 + static const char * const pcix_cmd[] = {
  593 + "Interrupt Acknowledge",
  594 + "Special Cycle",
  595 + "I/O Read",
  596 + "I/O Write",
  597 + "Reserved",
  598 + "Reserved / Device ID Message",
  599 + "Memory Read",
  600 + "Memory Write",
  601 + "Reserved / Alias to Memory Read Block",
  602 + "Reserved / Alias to Memory Write Block",
  603 + "Configuration Read",
  604 + "Configuration Write",
  605 + "Memory Read Multiple / Split Completion",
  606 + "Dual Address Cycle",
  607 + "Memory Read Line / Memory Read Block",
  608 + "Memory Write and Invalidate / Memory Write Block"
608 609 };
609 610  
610 611 #define IO7__POX_TRANSUM__PCI_ADDR__S (0)
arch/alpha/kernel/err_titan.c
... ... @@ -75,8 +75,12 @@
75 75 int status = MCHK_DISPOSITION_REPORT;
76 76  
77 77 #ifdef CONFIG_VERBOSE_MCHECK
78   - char *serror_src[] = {"GPCI", "APCI", "AGP HP", "AGP LP"};
79   - char *serror_cmd[] = {"DMA Read", "DMA RMW", "SGTE Read", "Reserved"};
  78 + static const char * const serror_src[] = {
  79 + "GPCI", "APCI", "AGP HP", "AGP LP"
  80 + };
  81 + static const char * const serror_cmd[] = {
  82 + "DMA Read", "DMA RMW", "SGTE Read", "Reserved"
  83 + };
80 84 #endif /* CONFIG_VERBOSE_MCHECK */
81 85  
82 86 #define TITAN__PCHIP_SERROR__LOST_UECC (1UL << 0)
... ... @@ -140,14 +144,15 @@
140 144 int status = MCHK_DISPOSITION_REPORT;
141 145  
142 146 #ifdef CONFIG_VERBOSE_MCHECK
143   - char *perror_cmd[] = { "Interrupt Acknowledge", "Special Cycle",
144   - "I/O Read", "I/O Write",
145   - "Reserved", "Reserved",
146   - "Memory Read", "Memory Write",
147   - "Reserved", "Reserved",
148   - "Configuration Read", "Configuration Write",
149   - "Memory Read Multiple", "Dual Address Cycle",
150   - "Memory Read Line","Memory Write and Invalidate"
  147 + static const char * const perror_cmd[] = {
  148 + "Interrupt Acknowledge", "Special Cycle",
  149 + "I/O Read", "I/O Write",
  150 + "Reserved", "Reserved",
  151 + "Memory Read", "Memory Write",
  152 + "Reserved", "Reserved",
  153 + "Configuration Read", "Configuration Write",
  154 + "Memory Read Multiple", "Dual Address Cycle",
  155 + "Memory Read Line", "Memory Write and Invalidate"
151 156 };
152 157 #endif /* CONFIG_VERBOSE_MCHECK */
153 158  
... ... @@ -273,11 +278,11 @@
273 278 int cmd, len;
274 279 unsigned long addr;
275 280  
276   - char *agperror_cmd[] = { "Read (low-priority)", "Read (high-priority)",
277   - "Write (low-priority)",
278   - "Write (high-priority)",
279   - "Reserved", "Reserved",
280   - "Flush", "Fence"
  281 + static const char * const agperror_cmd[] = {
  282 + "Read (low-priority)", "Read (high-priority)",
  283 + "Write (low-priority)", "Write (high-priority)",
  284 + "Reserved", "Reserved",
  285 + "Flush", "Fence"
281 286 };
282 287 #endif /* CONFIG_VERBOSE_MCHECK */
283 288  
arch/alpha/kernel/osf_sys.c
... ... @@ -594,7 +594,7 @@
594 594  
595 595 SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
596 596 {
597   - char *sysinfo_table[] = {
  597 + const char *sysinfo_table[] = {
598 598 utsname()->sysname,
599 599 utsname()->nodename,
600 600 utsname()->release,
... ... @@ -606,7 +606,7 @@
606 606 "dummy", /* secure RPC domain */
607 607 };
608 608 unsigned long offset;
609   - char *res;
  609 + const char *res;
610 610 long len, err = -EINVAL;
611 611  
612 612 offset = command-1;