aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-08-05 13:42:58 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-05 13:42:58 -0400
commit36cbd3dcc10384f813ec0814255f576c84f2bcd4 (patch)
treec3579edea972519d2f9ae99d7da9a5dd56e6f5c1
parentdb71789c01ae7b641f83c5aa64e7df25122f4b28 (diff)
net: mark read-only arrays as const
String literals are constant, and usually, we can also tag the array of pointers const too, moving it to the .rodata section. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/ip_vs.h3
-rw-r--r--include/net/irda/ircomm_event.h2
-rw-r--r--include/net/irda/ircomm_tty_attach.h4
-rw-r--r--include/net/irda/irlap_event.h2
-rw-r--r--include/net/irda/irlmp_event.h4
-rw-r--r--include/net/sctp/constants.h4
-rw-r--r--net/8021q/vlanproc.c2
-rw-r--r--net/atm/lec.c9
-rw-r--r--net/atm/proc.c9
-rw-r--r--net/bluetooth/af_bluetooth.c4
-rw-r--r--net/bridge/br_stp.c2
-rw-r--r--net/core/dev.c2
-rw-r--r--net/core/net-sysfs.c2
-rw-r--r--net/core/sock.c6
-rw-r--r--net/dccp/ccids/ccid3.c4
-rw-r--r--net/dccp/feat.c7
-rw-r--r--net/dccp/proto.c4
-rw-r--r--net/ipv4/fib_trie.c2
-rw-r--r--net/ipv6/proc.c4
-rw-r--r--net/irda/ircomm/ircomm_event.c4
-rw-r--r--net/irda/ircomm/ircomm_tty_attach.c4
-rw-r--r--net/irda/iriap.c4
-rw-r--r--net/irda/irlan/irlan_common.c4
-rw-r--r--net/irda/irlap.c2
-rw-r--r--net/irda/irlap_event.c4
-rw-r--r--net/irda/irlmp_event.c6
-rw-r--r--net/llc/llc_proc.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_proto.c3
-rw-r--r--net/netfilter/ipvs/ip_vs_proto_tcp.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_proto_udp.c2
-rw-r--r--net/rds/ib_stats.c2
-rw-r--r--net/rds/iw_stats.c2
-rw-r--r--net/rds/rds.h3
-rw-r--r--net/rds/stats.c4
-rw-r--r--net/rxrpc/ar-ack.c2
-rw-r--r--net/sctp/debug.c14
36 files changed, 74 insertions, 66 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 1c8ee1b13651..98978e73f666 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -738,7 +738,8 @@ extern void ip_vs_protocol_cleanup(void);
738extern void ip_vs_protocol_timeout_change(int flags); 738extern void ip_vs_protocol_timeout_change(int flags);
739extern int *ip_vs_create_timeout_table(int *table, int size); 739extern int *ip_vs_create_timeout_table(int *table, int size);
740extern int 740extern int
741ip_vs_set_state_timeout(int *table, int num, char **names, char *name, int to); 741ip_vs_set_state_timeout(int *table, int num, const char *const *names,
742 const char *name, int to);
742extern void 743extern void
743ip_vs_tcpudp_debug_packet(struct ip_vs_protocol *pp, const struct sk_buff *skb, 744ip_vs_tcpudp_debug_packet(struct ip_vs_protocol *pp, const struct sk_buff *skb,
744 int offset, const char *msg); 745 int offset, const char *msg);
diff --git a/include/net/irda/ircomm_event.h b/include/net/irda/ircomm_event.h
index c290447872d1..bc0c6f31f1c6 100644
--- a/include/net/irda/ircomm_event.h
+++ b/include/net/irda/ircomm_event.h
@@ -74,7 +74,7 @@ struct ircomm_info {
74 struct qos_info *qos; 74 struct qos_info *qos;
75}; 75};
76 76
77extern char *ircomm_state[]; 77extern const char *const ircomm_state[];
78 78
79struct ircomm_cb; /* Forward decl. */ 79struct ircomm_cb; /* Forward decl. */
80 80
diff --git a/include/net/irda/ircomm_tty_attach.h b/include/net/irda/ircomm_tty_attach.h
index f91a5695aa44..0a63bbb972d7 100644
--- a/include/net/irda/ircomm_tty_attach.h
+++ b/include/net/irda/ircomm_tty_attach.h
@@ -66,8 +66,8 @@ struct ircomm_tty_info {
66 __u8 dlsap_sel; 66 __u8 dlsap_sel;
67}; 67};
68 68
69extern char *ircomm_state[]; 69extern const char *const ircomm_state[];
70extern char *ircomm_tty_state[]; 70extern const char *const ircomm_tty_state[];
71 71
72int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event, 72int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event,
73 struct sk_buff *skb, struct ircomm_tty_info *info); 73 struct sk_buff *skb, struct ircomm_tty_info *info);
diff --git a/include/net/irda/irlap_event.h b/include/net/irda/irlap_event.h
index 2ae2e119ef4b..4c90824c50fb 100644
--- a/include/net/irda/irlap_event.h
+++ b/include/net/irda/irlap_event.h
@@ -120,7 +120,7 @@ typedef enum { /* FIXME check the two first reason codes */
120 LAP_PRIMARY_CONFLICT, 120 LAP_PRIMARY_CONFLICT,
121} LAP_REASON; 121} LAP_REASON;
122 122
123extern const char *irlap_state[]; 123extern const char *const irlap_state[];
124 124
125void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, 125void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event,
126 struct sk_buff *skb, struct irlap_info *info); 126 struct sk_buff *skb, struct irlap_info *info);
diff --git a/include/net/irda/irlmp_event.h b/include/net/irda/irlmp_event.h
index e03ae4ae3963..9e4ec17a7449 100644
--- a/include/net/irda/irlmp_event.h
+++ b/include/net/irda/irlmp_event.h
@@ -79,8 +79,8 @@ typedef enum {
79 LM_LAP_IDLE_TIMEOUT, 79 LM_LAP_IDLE_TIMEOUT,
80} IRLMP_EVENT; 80} IRLMP_EVENT;
81 81
82extern const char *irlmp_state[]; 82extern const char *const irlmp_state[];
83extern const char *irlsap_state[]; 83extern const char *const irlsap_state[];
84 84
85void irlmp_watchdog_timer_expired(void *data); 85void irlmp_watchdog_timer_expired(void *data);
86void irlmp_discovery_timer_expired(void *data); 86void irlmp_discovery_timer_expired(void *data);
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index b05b0557211f..8bc25f7b04ce 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -241,7 +241,9 @@ const char *sctp_tname(const sctp_subtype_t); /* timeouts */
241const char *sctp_pname(const sctp_subtype_t); /* primitives */ 241const char *sctp_pname(const sctp_subtype_t); /* primitives */
242 242
243/* This is a table of printable names of sctp_state_t's. */ 243/* This is a table of printable names of sctp_state_t's. */
244extern const char *sctp_state_tbl[], *sctp_evttype_tbl[], *sctp_status_tbl[]; 244extern const char *const sctp_state_tbl[];
245extern const char *const sctp_evttype_tbl[];
246extern const char *const sctp_status_tbl[];
245 247
246/* Maximum chunk length considering padding requirements. */ 248/* Maximum chunk length considering padding requirements. */
247enum { SCTP_MAX_CHUNK_LEN = ((1<<16) - sizeof(__u32)) }; 249enum { SCTP_MAX_CHUNK_LEN = ((1<<16) - sizeof(__u32)) };
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index b55a091a33df..6262c335f3c2 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -107,7 +107,7 @@ static const struct file_operations vlandev_fops = {
107 */ 107 */
108 108
109/* Strings */ 109/* Strings */
110static const char *vlan_name_type_str[VLAN_NAME_TYPE_HIGHEST] = { 110static const char *const vlan_name_type_str[VLAN_NAME_TYPE_HIGHEST] = {
111 [VLAN_NAME_TYPE_RAW_PLUS_VID] = "VLAN_NAME_TYPE_RAW_PLUS_VID", 111 [VLAN_NAME_TYPE_RAW_PLUS_VID] = "VLAN_NAME_TYPE_RAW_PLUS_VID",
112 [VLAN_NAME_TYPE_PLUS_VID_NO_PAD] = "VLAN_NAME_TYPE_PLUS_VID_NO_PAD", 112 [VLAN_NAME_TYPE_PLUS_VID_NO_PAD] = "VLAN_NAME_TYPE_PLUS_VID_NO_PAD",
113 [VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD] = "VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD", 113 [VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD] = "VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD",
diff --git a/net/atm/lec.c b/net/atm/lec.c
index c463868c993b..8e723c2654cb 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -935,9 +935,9 @@ static int lecd_attach(struct atm_vcc *vcc, int arg)
935} 935}
936 936
937#ifdef CONFIG_PROC_FS 937#ifdef CONFIG_PROC_FS
938static char *lec_arp_get_status_string(unsigned char status) 938static const char *lec_arp_get_status_string(unsigned char status)
939{ 939{
940 static char *lec_arp_status_string[] = { 940 static const char *const lec_arp_status_string[] = {
941 "ESI_UNKNOWN ", 941 "ESI_UNKNOWN ",
942 "ESI_ARP_PENDING ", 942 "ESI_ARP_PENDING ",
943 "ESI_VC_PENDING ", 943 "ESI_VC_PENDING ",
@@ -1121,7 +1121,8 @@ static void *lec_seq_next(struct seq_file *seq, void *v, loff_t *pos)
1121 1121
1122static int lec_seq_show(struct seq_file *seq, void *v) 1122static int lec_seq_show(struct seq_file *seq, void *v)
1123{ 1123{
1124 static char lec_banner[] = "Itf MAC ATM destination" 1124 static const char lec_banner[] =
1125 "Itf MAC ATM destination"
1125 " Status Flags " 1126 " Status Flags "
1126 "VPI/VCI Recv VPI/VCI\n"; 1127 "VPI/VCI Recv VPI/VCI\n";
1127 1128
@@ -1505,7 +1506,7 @@ lec_arp_remove(struct lec_priv *priv, struct lec_arp_table *to_remove)
1505} 1506}
1506 1507
1507#if DEBUG_ARP_TABLE 1508#if DEBUG_ARP_TABLE
1508static char *get_status_string(unsigned char st) 1509static const char *get_status_string(unsigned char st)
1509{ 1510{
1510 switch (st) { 1511 switch (st) {
1511 case ESI_UNKNOWN: 1512 case ESI_UNKNOWN:
diff --git a/net/atm/proc.c b/net/atm/proc.c
index 38de5ff61ecd..ab8419a324b6 100644
--- a/net/atm/proc.c
+++ b/net/atm/proc.c
@@ -151,8 +151,9 @@ static void *vcc_seq_next(struct seq_file *seq, void *v, loff_t *pos)
151 151
152static void pvc_info(struct seq_file *seq, struct atm_vcc *vcc) 152static void pvc_info(struct seq_file *seq, struct atm_vcc *vcc)
153{ 153{
154 static const char *class_name[] = { "off","UBR","CBR","VBR","ABR" }; 154 static const char *const class_name[] =
155 static const char *aal_name[] = { 155 {"off","UBR","CBR","VBR","ABR"};
156 static const char *const aal_name[] = {
156 "---", "1", "2", "3/4", /* 0- 3 */ 157 "---", "1", "2", "3/4", /* 0- 3 */
157 "???", "5", "???", "???", /* 4- 7 */ 158 "???", "5", "???", "???", /* 4- 7 */
158 "???", "???", "???", "???", /* 8-11 */ 159 "???", "???", "???", "???", /* 8-11 */
@@ -178,7 +179,7 @@ static void pvc_info(struct seq_file *seq, struct atm_vcc *vcc)
178 179
179static const char *vcc_state(struct atm_vcc *vcc) 180static const char *vcc_state(struct atm_vcc *vcc)
180{ 181{
181 static const char *map[] = { ATM_VS2TXT_MAP }; 182 static const char *const map[] = { ATM_VS2TXT_MAP };
182 183
183 return map[ATM_VF2VS(vcc->flags)]; 184 return map[ATM_VF2VS(vcc->flags)];
184} 185}
@@ -335,7 +336,7 @@ static const struct file_operations vcc_seq_fops = {
335 336
336static int svc_seq_show(struct seq_file *seq, void *v) 337static int svc_seq_show(struct seq_file *seq, void *v)
337{ 338{
338 static char atm_svc_banner[] = 339 static const char atm_svc_banner[] =
339 "Itf VPI VCI State Remote\n"; 340 "Itf VPI VCI State Remote\n";
340 341
341 if (v == SEQ_START_TOKEN) 342 if (v == SEQ_START_TOKEN)
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 0250e0600150..8cfb5a849841 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -49,7 +49,7 @@ static struct net_proto_family *bt_proto[BT_MAX_PROTO];
49static DEFINE_RWLOCK(bt_proto_lock); 49static DEFINE_RWLOCK(bt_proto_lock);
50 50
51static struct lock_class_key bt_lock_key[BT_MAX_PROTO]; 51static struct lock_class_key bt_lock_key[BT_MAX_PROTO];
52static const char *bt_key_strings[BT_MAX_PROTO] = { 52static const char *const bt_key_strings[BT_MAX_PROTO] = {
53 "sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP", 53 "sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP",
54 "sk_lock-AF_BLUETOOTH-BTPROTO_HCI", 54 "sk_lock-AF_BLUETOOTH-BTPROTO_HCI",
55 "sk_lock-AF_BLUETOOTH-BTPROTO_SCO", 55 "sk_lock-AF_BLUETOOTH-BTPROTO_SCO",
@@ -61,7 +61,7 @@ static const char *bt_key_strings[BT_MAX_PROTO] = {
61}; 61};
62 62
63static struct lock_class_key bt_slock_key[BT_MAX_PROTO]; 63static struct lock_class_key bt_slock_key[BT_MAX_PROTO];
64static const char *bt_slock_key_strings[BT_MAX_PROTO] = { 64static const char *const bt_slock_key_strings[BT_MAX_PROTO] = {
65 "slock-AF_BLUETOOTH-BTPROTO_L2CAP", 65 "slock-AF_BLUETOOTH-BTPROTO_L2CAP",
66 "slock-AF_BLUETOOTH-BTPROTO_HCI", 66 "slock-AF_BLUETOOTH-BTPROTO_HCI",
67 "slock-AF_BLUETOOTH-BTPROTO_SCO", 67 "slock-AF_BLUETOOTH-BTPROTO_SCO",
diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c
index 0660515f3992..fd3f8d6c0998 100644
--- a/net/bridge/br_stp.c
+++ b/net/bridge/br_stp.c
@@ -21,7 +21,7 @@
21 */ 21 */
22#define MESSAGE_AGE_INCR ((HZ < 256) ? 1 : (HZ/256)) 22#define MESSAGE_AGE_INCR ((HZ < 256) ? 1 : (HZ/256))
23 23
24static const char *br_port_state_names[] = { 24static const char *const br_port_state_names[] = {
25 [BR_STATE_DISABLED] = "disabled", 25 [BR_STATE_DISABLED] = "disabled",
26 [BR_STATE_LISTENING] = "listening", 26 [BR_STATE_LISTENING] = "listening",
27 [BR_STATE_LEARNING] = "learning", 27 [BR_STATE_LEARNING] = "learning",
diff --git a/net/core/dev.c b/net/core/dev.c
index 71347668c506..f01a9c41f112 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -272,7 +272,7 @@ static const unsigned short netdev_lock_type[] =
272 ARPHRD_PHONET_PIPE, ARPHRD_IEEE802154, ARPHRD_IEEE802154_PHY, 272 ARPHRD_PHONET_PIPE, ARPHRD_IEEE802154, ARPHRD_IEEE802154_PHY,
273 ARPHRD_VOID, ARPHRD_NONE}; 273 ARPHRD_VOID, ARPHRD_NONE};
274 274
275static const char *netdev_lock_name[] = 275static const char *const netdev_lock_name[] =
276 {"_xmit_NETROM", "_xmit_ETHER", "_xmit_EETHER", "_xmit_AX25", 276 {"_xmit_NETROM", "_xmit_ETHER", "_xmit_EETHER", "_xmit_AX25",
277 "_xmit_PRONET", "_xmit_CHAOS", "_xmit_IEEE802", "_xmit_ARCNET", 277 "_xmit_PRONET", "_xmit_CHAOS", "_xmit_IEEE802", "_xmit_ARCNET",
278 "_xmit_APPLETLK", "_xmit_DLCI", "_xmit_ATM", "_xmit_METRICOM", 278 "_xmit_APPLETLK", "_xmit_DLCI", "_xmit_ATM", "_xmit_METRICOM",
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 3994680c08b9..ad91e9e5f475 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -141,7 +141,7 @@ static ssize_t show_dormant(struct device *dev,
141 return -EINVAL; 141 return -EINVAL;
142} 142}
143 143
144static const char *operstates[] = { 144static const char *const operstates[] = {
145 "unknown", 145 "unknown",
146 "notpresent", /* currently unused */ 146 "notpresent", /* currently unused */
147 "down", 147 "down",
diff --git a/net/core/sock.c b/net/core/sock.c
index bbb25be7ddfe..a324a80c163e 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -142,7 +142,7 @@ static struct lock_class_key af_family_slock_keys[AF_MAX];
142 * strings build-time, so that runtime initialization of socket 142 * strings build-time, so that runtime initialization of socket
143 * locks is fast): 143 * locks is fast):
144 */ 144 */
145static const char *af_family_key_strings[AF_MAX+1] = { 145static const char *const af_family_key_strings[AF_MAX+1] = {
146 "sk_lock-AF_UNSPEC", "sk_lock-AF_UNIX" , "sk_lock-AF_INET" , 146 "sk_lock-AF_UNSPEC", "sk_lock-AF_UNIX" , "sk_lock-AF_INET" ,
147 "sk_lock-AF_AX25" , "sk_lock-AF_IPX" , "sk_lock-AF_APPLETALK", 147 "sk_lock-AF_AX25" , "sk_lock-AF_IPX" , "sk_lock-AF_APPLETALK",
148 "sk_lock-AF_NETROM", "sk_lock-AF_BRIDGE" , "sk_lock-AF_ATMPVC" , 148 "sk_lock-AF_NETROM", "sk_lock-AF_BRIDGE" , "sk_lock-AF_ATMPVC" ,
@@ -158,7 +158,7 @@ static const char *af_family_key_strings[AF_MAX+1] = {
158 "sk_lock-AF_IEEE802154", 158 "sk_lock-AF_IEEE802154",
159 "sk_lock-AF_MAX" 159 "sk_lock-AF_MAX"
160}; 160};
161static const char *af_family_slock_key_strings[AF_MAX+1] = { 161static const char *const af_family_slock_key_strings[AF_MAX+1] = {
162 "slock-AF_UNSPEC", "slock-AF_UNIX" , "slock-AF_INET" , 162 "slock-AF_UNSPEC", "slock-AF_UNIX" , "slock-AF_INET" ,
163 "slock-AF_AX25" , "slock-AF_IPX" , "slock-AF_APPLETALK", 163 "slock-AF_AX25" , "slock-AF_IPX" , "slock-AF_APPLETALK",
164 "slock-AF_NETROM", "slock-AF_BRIDGE" , "slock-AF_ATMPVC" , 164 "slock-AF_NETROM", "slock-AF_BRIDGE" , "slock-AF_ATMPVC" ,
@@ -174,7 +174,7 @@ static const char *af_family_slock_key_strings[AF_MAX+1] = {
174 "slock-AF_IEEE802154", 174 "slock-AF_IEEE802154",
175 "slock-AF_MAX" 175 "slock-AF_MAX"
176}; 176};
177static const char *af_family_clock_key_strings[AF_MAX+1] = { 177static const char *const af_family_clock_key_strings[AF_MAX+1] = {
178 "clock-AF_UNSPEC", "clock-AF_UNIX" , "clock-AF_INET" , 178 "clock-AF_UNSPEC", "clock-AF_UNIX" , "clock-AF_INET" ,
179 "clock-AF_AX25" , "clock-AF_IPX" , "clock-AF_APPLETALK", 179 "clock-AF_AX25" , "clock-AF_IPX" , "clock-AF_APPLETALK",
180 "clock-AF_NETROM", "clock-AF_BRIDGE" , "clock-AF_ATMPVC" , 180 "clock-AF_NETROM", "clock-AF_BRIDGE" , "clock-AF_ATMPVC" ,
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index a27b7f4c19c5..f596ce149c3c 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -52,7 +52,7 @@ static int ccid3_debug;
52#ifdef CONFIG_IP_DCCP_CCID3_DEBUG 52#ifdef CONFIG_IP_DCCP_CCID3_DEBUG
53static const char *ccid3_tx_state_name(enum ccid3_hc_tx_states state) 53static const char *ccid3_tx_state_name(enum ccid3_hc_tx_states state)
54{ 54{
55 static char *ccid3_state_names[] = { 55 static const char *const ccid3_state_names[] = {
56 [TFRC_SSTATE_NO_SENT] = "NO_SENT", 56 [TFRC_SSTATE_NO_SENT] = "NO_SENT",
57 [TFRC_SSTATE_NO_FBACK] = "NO_FBACK", 57 [TFRC_SSTATE_NO_FBACK] = "NO_FBACK",
58 [TFRC_SSTATE_FBACK] = "FBACK", 58 [TFRC_SSTATE_FBACK] = "FBACK",
@@ -646,7 +646,7 @@ enum ccid3_fback_type {
646#ifdef CONFIG_IP_DCCP_CCID3_DEBUG 646#ifdef CONFIG_IP_DCCP_CCID3_DEBUG
647static const char *ccid3_rx_state_name(enum ccid3_hc_rx_states state) 647static const char *ccid3_rx_state_name(enum ccid3_hc_rx_states state)
648{ 648{
649 static char *ccid3_rx_state_names[] = { 649 static const char *const ccid3_rx_state_names[] = {
650 [TFRC_RSTATE_NO_DATA] = "NO_DATA", 650 [TFRC_RSTATE_NO_DATA] = "NO_DATA",
651 [TFRC_RSTATE_DATA] = "DATA", 651 [TFRC_RSTATE_DATA] = "DATA",
652 [TFRC_RSTATE_TERM] = "TERM", 652 [TFRC_RSTATE_TERM] = "TERM",
diff --git a/net/dccp/feat.c b/net/dccp/feat.c
index b04160a2eea5..972b8dc918d6 100644
--- a/net/dccp/feat.c
+++ b/net/dccp/feat.c
@@ -213,7 +213,7 @@ static int dccp_feat_default_value(u8 feat_num)
213 */ 213 */
214static const char *dccp_feat_fname(const u8 feat) 214static const char *dccp_feat_fname(const u8 feat)
215{ 215{
216 static const char *feature_names[] = { 216 static const char *const feature_names[] = {
217 [DCCPF_RESERVED] = "Reserved", 217 [DCCPF_RESERVED] = "Reserved",
218 [DCCPF_CCID] = "CCID", 218 [DCCPF_CCID] = "CCID",
219 [DCCPF_SHORT_SEQNOS] = "Allow Short Seqnos", 219 [DCCPF_SHORT_SEQNOS] = "Allow Short Seqnos",
@@ -236,8 +236,9 @@ static const char *dccp_feat_fname(const u8 feat)
236 return feature_names[feat]; 236 return feature_names[feat];
237} 237}
238 238
239static const char *dccp_feat_sname[] = { "DEFAULT", "INITIALISING", "CHANGING", 239static const char *const dccp_feat_sname[] = {
240 "UNSTABLE", "STABLE" }; 240 "DEFAULT", "INITIALISING", "CHANGING", "UNSTABLE", "STABLE",
241};
241 242
242#ifdef CONFIG_IP_DCCP_DEBUG 243#ifdef CONFIG_IP_DCCP_DEBUG
243static const char *dccp_feat_oname(const u8 opt) 244static const char *dccp_feat_oname(const u8 opt)
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 94ca8eaace7d..37b3b4293ef4 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -124,7 +124,7 @@ EXPORT_SYMBOL_GPL(dccp_done);
124 124
125const char *dccp_packet_name(const int type) 125const char *dccp_packet_name(const int type)
126{ 126{
127 static const char *dccp_packet_names[] = { 127 static const char *const dccp_packet_names[] = {
128 [DCCP_PKT_REQUEST] = "REQUEST", 128 [DCCP_PKT_REQUEST] = "REQUEST",
129 [DCCP_PKT_RESPONSE] = "RESPONSE", 129 [DCCP_PKT_RESPONSE] = "RESPONSE",
130 [DCCP_PKT_DATA] = "DATA", 130 [DCCP_PKT_DATA] = "DATA",
@@ -147,7 +147,7 @@ EXPORT_SYMBOL_GPL(dccp_packet_name);
147 147
148const char *dccp_state_name(const int state) 148const char *dccp_state_name(const int state)
149{ 149{
150 static char *dccp_state_names[] = { 150 static const char *const dccp_state_names[] = {
151 [DCCP_OPEN] = "OPEN", 151 [DCCP_OPEN] = "OPEN",
152 [DCCP_REQUESTING] = "REQUESTING", 152 [DCCP_REQUESTING] = "REQUESTING",
153 [DCCP_PARTOPEN] = "PARTOPEN", 153 [DCCP_PARTOPEN] = "PARTOPEN",
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index d58b49115386..fe3c846b99a6 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -2421,7 +2421,7 @@ static inline const char *rtn_scope(char *buf, size_t len, enum rt_scope_t s)
2421 } 2421 }
2422} 2422}
2423 2423
2424static const char *rtn_type_names[__RTN_MAX] = { 2424static const char *const rtn_type_names[__RTN_MAX] = {
2425 [RTN_UNSPEC] = "UNSPEC", 2425 [RTN_UNSPEC] = "UNSPEC",
2426 [RTN_UNICAST] = "UNICAST", 2426 [RTN_UNICAST] = "UNICAST",
2427 [RTN_LOCAL] = "LOCAL", 2427 [RTN_LOCAL] = "LOCAL",
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index 590ddefb7ffc..c9605c3ad91f 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -101,7 +101,7 @@ static struct snmp_mib snmp6_icmp6_list[] = {
101}; 101};
102 102
103/* RFC 4293 v6 ICMPMsgStatsTable; named items for RFC 2466 compatibility */ 103/* RFC 4293 v6 ICMPMsgStatsTable; named items for RFC 2466 compatibility */
104static char *icmp6type2name[256] = { 104static const char *const icmp6type2name[256] = {
105 [ICMPV6_DEST_UNREACH] = "DestUnreachs", 105 [ICMPV6_DEST_UNREACH] = "DestUnreachs",
106 [ICMPV6_PKT_TOOBIG] = "PktTooBigs", 106 [ICMPV6_PKT_TOOBIG] = "PktTooBigs",
107 [ICMPV6_TIME_EXCEED] = "TimeExcds", 107 [ICMPV6_TIME_EXCEED] = "TimeExcds",
@@ -144,7 +144,7 @@ static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void **mib)
144 /* print by name -- deprecated items */ 144 /* print by name -- deprecated items */
145 for (i = 0; i < ICMP6MSG_MIB_MAX; i++) { 145 for (i = 0; i < ICMP6MSG_MIB_MAX; i++) {
146 int icmptype; 146 int icmptype;
147 char *p; 147 const char *p;
148 148
149 icmptype = i & 0xff; 149 icmptype = i & 0xff;
150 p = icmp6type2name[icmptype]; 150 p = icmp6type2name[icmptype];
diff --git a/net/irda/ircomm/ircomm_event.c b/net/irda/ircomm/ircomm_event.c
index c35b3ef5c2f0..d78554fedbac 100644
--- a/net/irda/ircomm/ircomm_event.c
+++ b/net/irda/ircomm/ircomm_event.c
@@ -49,7 +49,7 @@ static int ircomm_state_waitr(struct ircomm_cb *self, IRCOMM_EVENT event,
49static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event, 49static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event,
50 struct sk_buff *skb, struct ircomm_info *info); 50 struct sk_buff *skb, struct ircomm_info *info);
51 51
52char *ircomm_state[] = { 52const char *const ircomm_state[] = {
53 "IRCOMM_IDLE", 53 "IRCOMM_IDLE",
54 "IRCOMM_WAITI", 54 "IRCOMM_WAITI",
55 "IRCOMM_WAITR", 55 "IRCOMM_WAITR",
@@ -57,7 +57,7 @@ char *ircomm_state[] = {
57}; 57};
58 58
59#ifdef CONFIG_IRDA_DEBUG 59#ifdef CONFIG_IRDA_DEBUG
60static char *ircomm_event[] = { 60static const char *const ircomm_event[] = {
61 "IRCOMM_CONNECT_REQUEST", 61 "IRCOMM_CONNECT_REQUEST",
62 "IRCOMM_CONNECT_RESPONSE", 62 "IRCOMM_CONNECT_RESPONSE",
63 "IRCOMM_TTP_CONNECT_INDICATION", 63 "IRCOMM_TTP_CONNECT_INDICATION",
diff --git a/net/irda/ircomm/ircomm_tty_attach.c b/net/irda/ircomm/ircomm_tty_attach.c
index 9032a1d1190d..eafc010907c2 100644
--- a/net/irda/ircomm/ircomm_tty_attach.c
+++ b/net/irda/ircomm/ircomm_tty_attach.c
@@ -80,7 +80,7 @@ static int ircomm_tty_state_ready(struct ircomm_tty_cb *self,
80 struct sk_buff *skb, 80 struct sk_buff *skb,
81 struct ircomm_tty_info *info); 81 struct ircomm_tty_info *info);
82 82
83char *ircomm_tty_state[] = { 83const char *const ircomm_tty_state[] = {
84 "IRCOMM_TTY_IDLE", 84 "IRCOMM_TTY_IDLE",
85 "IRCOMM_TTY_SEARCH", 85 "IRCOMM_TTY_SEARCH",
86 "IRCOMM_TTY_QUERY_PARAMETERS", 86 "IRCOMM_TTY_QUERY_PARAMETERS",
@@ -91,7 +91,7 @@ char *ircomm_tty_state[] = {
91}; 91};
92 92
93#ifdef CONFIG_IRDA_DEBUG 93#ifdef CONFIG_IRDA_DEBUG
94static char *ircomm_tty_event[] = { 94static const char *const ircomm_tty_event[] = {
95 "IRCOMM_TTY_ATTACH_CABLE", 95 "IRCOMM_TTY_ATTACH_CABLE",
96 "IRCOMM_TTY_DETACH_CABLE", 96 "IRCOMM_TTY_DETACH_CABLE",
97 "IRCOMM_TTY_DATA_REQUEST", 97 "IRCOMM_TTY_DATA_REQUEST",
diff --git a/net/irda/iriap.c b/net/irda/iriap.c
index 4a105dc32dcd..294e34d3517c 100644
--- a/net/irda/iriap.c
+++ b/net/irda/iriap.c
@@ -44,7 +44,7 @@
44 44
45#ifdef CONFIG_IRDA_DEBUG 45#ifdef CONFIG_IRDA_DEBUG
46/* FIXME: This one should go in irlmp.c */ 46/* FIXME: This one should go in irlmp.c */
47static const char *ias_charset_types[] = { 47static const char *const ias_charset_types[] = {
48 "CS_ASCII", 48 "CS_ASCII",
49 "CS_ISO_8859_1", 49 "CS_ISO_8859_1",
50 "CS_ISO_8859_2", 50 "CS_ISO_8859_2",
@@ -966,7 +966,7 @@ static void iriap_watchdog_timer_expired(void *data)
966 966
967#ifdef CONFIG_PROC_FS 967#ifdef CONFIG_PROC_FS
968 968
969static const char *ias_value_types[] = { 969static const char *const ias_value_types[] = {
970 "IAS_MISSING", 970 "IAS_MISSING",
971 "IAS_INTEGER", 971 "IAS_INTEGER",
972 "IAS_OCT_SEQ", 972 "IAS_OCT_SEQ",
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c
index 774d73a76852..62116829b817 100644
--- a/net/irda/irlan/irlan_common.c
+++ b/net/irda/irlan/irlan_common.c
@@ -69,14 +69,14 @@ static int eth; /* Use "eth" or "irlan" name for devices */
69static int access = ACCESS_PEER; /* PEER, DIRECT or HOSTED */ 69static int access = ACCESS_PEER; /* PEER, DIRECT or HOSTED */
70 70
71#ifdef CONFIG_PROC_FS 71#ifdef CONFIG_PROC_FS
72static const char *irlan_access[] = { 72static const char *const irlan_access[] = {
73 "UNKNOWN", 73 "UNKNOWN",
74 "DIRECT", 74 "DIRECT",
75 "PEER", 75 "PEER",
76 "HOSTED" 76 "HOSTED"
77}; 77};
78 78
79static const char *irlan_media[] = { 79static const char *const irlan_media[] = {
80 "UNKNOWN", 80 "UNKNOWN",
81 "802.3", 81 "802.3",
82 "802.5" 82 "802.5"
diff --git a/net/irda/irlap.c b/net/irda/irlap.c
index e4965b764b9b..356e65b1dc42 100644
--- a/net/irda/irlap.c
+++ b/net/irda/irlap.c
@@ -63,7 +63,7 @@ static void irlap_init_qos_capabilities(struct irlap_cb *self,
63 struct qos_info *qos_user); 63 struct qos_info *qos_user);
64 64
65#ifdef CONFIG_IRDA_DEBUG 65#ifdef CONFIG_IRDA_DEBUG
66static char *lap_reasons[] = { 66static const char *const lap_reasons[] = {
67 "ERROR, NOT USED", 67 "ERROR, NOT USED",
68 "LAP_DISC_INDICATION", 68 "LAP_DISC_INDICATION",
69 "LAP_NO_RESPONSE", 69 "LAP_NO_RESPONSE",
diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c
index 16c4ef0f5c1a..c5c51959e3ce 100644
--- a/net/irda/irlap_event.c
+++ b/net/irda/irlap_event.c
@@ -78,7 +78,7 @@ static int irlap_state_reset_check(struct irlap_cb *, IRLAP_EVENT event,
78 struct sk_buff *, struct irlap_info *); 78 struct sk_buff *, struct irlap_info *);
79 79
80#ifdef CONFIG_IRDA_DEBUG 80#ifdef CONFIG_IRDA_DEBUG
81static const char *irlap_event[] = { 81static const char *const irlap_event[] = {
82 "DISCOVERY_REQUEST", 82 "DISCOVERY_REQUEST",
83 "CONNECT_REQUEST", 83 "CONNECT_REQUEST",
84 "CONNECT_RESPONSE", 84 "CONNECT_RESPONSE",
@@ -120,7 +120,7 @@ static const char *irlap_event[] = {
120}; 120};
121#endif /* CONFIG_IRDA_DEBUG */ 121#endif /* CONFIG_IRDA_DEBUG */
122 122
123const char *irlap_state[] = { 123const char *const irlap_state[] = {
124 "LAP_NDM", 124 "LAP_NDM",
125 "LAP_QUERY", 125 "LAP_QUERY",
126 "LAP_REPLY", 126 "LAP_REPLY",
diff --git a/net/irda/irlmp_event.c b/net/irda/irlmp_event.c
index 78cce0cb073f..c1fb5db81042 100644
--- a/net/irda/irlmp_event.c
+++ b/net/irda/irlmp_event.c
@@ -33,13 +33,13 @@
33#include <net/irda/irlmp_frame.h> 33#include <net/irda/irlmp_frame.h>
34#include <net/irda/irlmp_event.h> 34#include <net/irda/irlmp_event.h>
35 35
36const char *irlmp_state[] = { 36const char *const irlmp_state[] = {
37 "LAP_STANDBY", 37 "LAP_STANDBY",
38 "LAP_U_CONNECT", 38 "LAP_U_CONNECT",
39 "LAP_ACTIVE", 39 "LAP_ACTIVE",
40}; 40};
41 41
42const char *irlsap_state[] = { 42const char *const irlsap_state[] = {
43 "LSAP_DISCONNECTED", 43 "LSAP_DISCONNECTED",
44 "LSAP_CONNECT", 44 "LSAP_CONNECT",
45 "LSAP_CONNECT_PEND", 45 "LSAP_CONNECT_PEND",
@@ -49,7 +49,7 @@ const char *irlsap_state[] = {
49}; 49};
50 50
51#ifdef CONFIG_IRDA_DEBUG 51#ifdef CONFIG_IRDA_DEBUG
52static const char *irlmp_event[] = { 52static const char *const irlmp_event[] = {
53 "LM_CONNECT_REQUEST", 53 "LM_CONNECT_REQUEST",
54 "LM_CONNECT_CONFIRM", 54 "LM_CONNECT_CONFIRM",
55 "LM_CONNECT_RESPONSE", 55 "LM_CONNECT_RESPONSE",
diff --git a/net/llc/llc_proc.c b/net/llc/llc_proc.c
index f97be471fe2e..be47ac427f6b 100644
--- a/net/llc/llc_proc.c
+++ b/net/llc/llc_proc.c
@@ -143,7 +143,7 @@ out:
143 return 0; 143 return 0;
144} 144}
145 145
146static char *llc_conn_state_names[] = { 146static const char *const llc_conn_state_names[] = {
147 [LLC_CONN_STATE_ADM] = "adm", 147 [LLC_CONN_STATE_ADM] = "adm",
148 [LLC_CONN_STATE_SETUP] = "setup", 148 [LLC_CONN_STATE_SETUP] = "setup",
149 [LLC_CONN_STATE_NORMAL] = "normal", 149 [LLC_CONN_STATE_NORMAL] = "normal",
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
index 85c8892e1e8b..3e7671674549 100644
--- a/net/netfilter/ipvs/ip_vs_proto.c
+++ b/net/netfilter/ipvs/ip_vs_proto.c
@@ -127,7 +127,8 @@ ip_vs_create_timeout_table(int *table, int size)
127 * Set timeout value for state specified by name 127 * Set timeout value for state specified by name
128 */ 128 */
129int 129int
130ip_vs_set_state_timeout(int *table, int num, char **names, char *name, int to) 130ip_vs_set_state_timeout(int *table, int num, const char *const *names,
131 const char *name, int to)
131{ 132{
132 int i; 133 int i;
133 134
diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp.c b/net/netfilter/ipvs/ip_vs_proto_tcp.c
index 2278e141489e..91d28e073742 100644
--- a/net/netfilter/ipvs/ip_vs_proto_tcp.c
+++ b/net/netfilter/ipvs/ip_vs_proto_tcp.c
@@ -377,7 +377,7 @@ static int tcp_timeouts[IP_VS_TCP_S_LAST+1] = {
377 [IP_VS_TCP_S_LAST] = 2*HZ, 377 [IP_VS_TCP_S_LAST] = 2*HZ,
378}; 378};
379 379
380static char * tcp_state_name_table[IP_VS_TCP_S_LAST+1] = { 380static const char *const tcp_state_name_table[IP_VS_TCP_S_LAST+1] = {
381 [IP_VS_TCP_S_NONE] = "NONE", 381 [IP_VS_TCP_S_NONE] = "NONE",
382 [IP_VS_TCP_S_ESTABLISHED] = "ESTABLISHED", 382 [IP_VS_TCP_S_ESTABLISHED] = "ESTABLISHED",
383 [IP_VS_TCP_S_SYN_SENT] = "SYN_SENT", 383 [IP_VS_TCP_S_SYN_SENT] = "SYN_SENT",
diff --git a/net/netfilter/ipvs/ip_vs_proto_udp.c b/net/netfilter/ipvs/ip_vs_proto_udp.c
index 33a05d3684d9..e7a6885e0167 100644
--- a/net/netfilter/ipvs/ip_vs_proto_udp.c
+++ b/net/netfilter/ipvs/ip_vs_proto_udp.c
@@ -472,7 +472,7 @@ static int udp_timeouts[IP_VS_UDP_S_LAST+1] = {
472 [IP_VS_UDP_S_LAST] = 2*HZ, 472 [IP_VS_UDP_S_LAST] = 2*HZ,
473}; 473};
474 474
475static char * udp_state_name_table[IP_VS_UDP_S_LAST+1] = { 475static const char *const udp_state_name_table[IP_VS_UDP_S_LAST+1] = {
476 [IP_VS_UDP_S_NORMAL] = "UDP", 476 [IP_VS_UDP_S_NORMAL] = "UDP",
477 [IP_VS_UDP_S_LAST] = "BUG!", 477 [IP_VS_UDP_S_LAST] = "BUG!",
478}; 478};
diff --git a/net/rds/ib_stats.c b/net/rds/ib_stats.c
index 02e3e3d50d4a..8d8488306fe4 100644
--- a/net/rds/ib_stats.c
+++ b/net/rds/ib_stats.c
@@ -39,7 +39,7 @@
39 39
40DEFINE_PER_CPU(struct rds_ib_statistics, rds_ib_stats) ____cacheline_aligned; 40DEFINE_PER_CPU(struct rds_ib_statistics, rds_ib_stats) ____cacheline_aligned;
41 41
42static char *rds_ib_stat_names[] = { 42static const char *const rds_ib_stat_names[] = {
43 "ib_connect_raced", 43 "ib_connect_raced",
44 "ib_listen_closed_stale", 44 "ib_listen_closed_stale",
45 "ib_tx_cq_call", 45 "ib_tx_cq_call",
diff --git a/net/rds/iw_stats.c b/net/rds/iw_stats.c
index ccc7e8f0bf0e..d33ea790484e 100644
--- a/net/rds/iw_stats.c
+++ b/net/rds/iw_stats.c
@@ -39,7 +39,7 @@
39 39
40DEFINE_PER_CPU(struct rds_iw_statistics, rds_iw_stats) ____cacheline_aligned; 40DEFINE_PER_CPU(struct rds_iw_statistics, rds_iw_stats) ____cacheline_aligned;
41 41
42static char *rds_iw_stat_names[] = { 42static const char *const rds_iw_stat_names[] = {
43 "iw_connect_raced", 43 "iw_connect_raced",
44 "iw_listen_closed_stale", 44 "iw_listen_closed_stale",
45 "iw_tx_cq_call", 45 "iw_tx_cq_call",
diff --git a/net/rds/rds.h b/net/rds/rds.h
index dbe111236783..290566c69d28 100644
--- a/net/rds/rds.h
+++ b/net/rds/rds.h
@@ -652,7 +652,8 @@ DECLARE_PER_CPU_SHARED_ALIGNED(struct rds_statistics, rds_stats);
652int __init rds_stats_init(void); 652int __init rds_stats_init(void);
653void rds_stats_exit(void); 653void rds_stats_exit(void);
654void rds_stats_info_copy(struct rds_info_iterator *iter, 654void rds_stats_info_copy(struct rds_info_iterator *iter,
655 uint64_t *values, char **names, size_t nr); 655 uint64_t *values, const char *const *names,
656 size_t nr);
656 657
657/* sysctl.c */ 658/* sysctl.c */
658int __init rds_sysctl_init(void); 659int __init rds_sysctl_init(void);
diff --git a/net/rds/stats.c b/net/rds/stats.c
index 637146893cf3..91d8c58b8335 100644
--- a/net/rds/stats.c
+++ b/net/rds/stats.c
@@ -40,7 +40,7 @@ DEFINE_PER_CPU_SHARED_ALIGNED(struct rds_statistics, rds_stats);
40 40
41/* :.,$s/unsigned long\>.*\<s_\(.*\);/"\1",/g */ 41/* :.,$s/unsigned long\>.*\<s_\(.*\);/"\1",/g */
42 42
43static char *rds_stat_names[] = { 43static const char *const rds_stat_names[] = {
44 "conn_reset", 44 "conn_reset",
45 "recv_drop_bad_checksum", 45 "recv_drop_bad_checksum",
46 "recv_drop_old_seq", 46 "recv_drop_old_seq",
@@ -77,7 +77,7 @@ static char *rds_stat_names[] = {
77}; 77};
78 78
79void rds_stats_info_copy(struct rds_info_iterator *iter, 79void rds_stats_info_copy(struct rds_info_iterator *iter,
80 uint64_t *values, char **names, size_t nr) 80 uint64_t *values, const char *const *names, size_t nr)
81{ 81{
82 struct rds_info_counter ctr; 82 struct rds_info_counter ctr;
83 size_t i; 83 size_t i;
diff --git a/net/rxrpc/ar-ack.c b/net/rxrpc/ar-ack.c
index 3ac1672e1070..c9f1f0a3a2ff 100644
--- a/net/rxrpc/ar-ack.c
+++ b/net/rxrpc/ar-ack.c
@@ -20,7 +20,7 @@
20 20
21static unsigned rxrpc_ack_defer = 1; 21static unsigned rxrpc_ack_defer = 1;
22 22
23static const char *rxrpc_acks[] = { 23static const char *const rxrpc_acks[] = {
24 "---", "REQ", "DUP", "OOS", "WIN", "MEM", "PNG", "PNR", "DLY", "IDL", 24 "---", "REQ", "DUP", "OOS", "WIN", "MEM", "PNG", "PNR", "DLY", "IDL",
25 "-?-" 25 "-?-"
26}; 26};
diff --git a/net/sctp/debug.c b/net/sctp/debug.c
index 7ff548a30cfb..bf24fa697de2 100644
--- a/net/sctp/debug.c
+++ b/net/sctp/debug.c
@@ -52,7 +52,7 @@ int sctp_debug_flag = 1; /* Initially enable DEBUG */
52#endif /* SCTP_DEBUG */ 52#endif /* SCTP_DEBUG */
53 53
54/* These are printable forms of Chunk ID's from section 3.1. */ 54/* These are printable forms of Chunk ID's from section 3.1. */
55static const char *sctp_cid_tbl[SCTP_NUM_BASE_CHUNK_TYPES] = { 55static const char *const sctp_cid_tbl[SCTP_NUM_BASE_CHUNK_TYPES] = {
56 "DATA", 56 "DATA",
57 "INIT", 57 "INIT",
58 "INIT_ACK", 58 "INIT_ACK",
@@ -97,7 +97,7 @@ const char *sctp_cname(const sctp_subtype_t cid)
97} 97}
98 98
99/* These are printable forms of the states. */ 99/* These are printable forms of the states. */
100const char *sctp_state_tbl[SCTP_STATE_NUM_STATES] = { 100const char *const sctp_state_tbl[SCTP_STATE_NUM_STATES] = {
101 "STATE_EMPTY", 101 "STATE_EMPTY",
102 "STATE_CLOSED", 102 "STATE_CLOSED",
103 "STATE_COOKIE_WAIT", 103 "STATE_COOKIE_WAIT",
@@ -110,7 +110,7 @@ const char *sctp_state_tbl[SCTP_STATE_NUM_STATES] = {
110}; 110};
111 111
112/* Events that could change the state of an association. */ 112/* Events that could change the state of an association. */
113const char *sctp_evttype_tbl[] = { 113const char *const sctp_evttype_tbl[] = {
114 "EVENT_T_unknown", 114 "EVENT_T_unknown",
115 "EVENT_T_CHUNK", 115 "EVENT_T_CHUNK",
116 "EVENT_T_TIMEOUT", 116 "EVENT_T_TIMEOUT",
@@ -119,7 +119,7 @@ const char *sctp_evttype_tbl[] = {
119}; 119};
120 120
121/* Return value of a state function */ 121/* Return value of a state function */
122const char *sctp_status_tbl[] = { 122const char *const sctp_status_tbl[] = {
123 "DISPOSITION_DISCARD", 123 "DISPOSITION_DISCARD",
124 "DISPOSITION_CONSUME", 124 "DISPOSITION_CONSUME",
125 "DISPOSITION_NOMEM", 125 "DISPOSITION_NOMEM",
@@ -132,7 +132,7 @@ const char *sctp_status_tbl[] = {
132}; 132};
133 133
134/* Printable forms of primitives */ 134/* Printable forms of primitives */
135static const char *sctp_primitive_tbl[SCTP_NUM_PRIMITIVE_TYPES] = { 135static const char *const sctp_primitive_tbl[SCTP_NUM_PRIMITIVE_TYPES] = {
136 "PRIMITIVE_ASSOCIATE", 136 "PRIMITIVE_ASSOCIATE",
137 "PRIMITIVE_SHUTDOWN", 137 "PRIMITIVE_SHUTDOWN",
138 "PRIMITIVE_ABORT", 138 "PRIMITIVE_ABORT",
@@ -149,7 +149,7 @@ const char *sctp_pname(const sctp_subtype_t id)
149 return "unknown_primitive"; 149 return "unknown_primitive";
150} 150}
151 151
152static const char *sctp_other_tbl[] = { 152static const char *const sctp_other_tbl[] = {
153 "NO_PENDING_TSN", 153 "NO_PENDING_TSN",
154 "ICMP_PROTO_UNREACH", 154 "ICMP_PROTO_UNREACH",
155}; 155};
@@ -162,7 +162,7 @@ const char *sctp_oname(const sctp_subtype_t id)
162 return "unknown 'other' event"; 162 return "unknown 'other' event";
163} 163}
164 164
165static const char *sctp_timer_tbl[] = { 165static const char *const sctp_timer_tbl[] = {
166 "TIMEOUT_NONE", 166 "TIMEOUT_NONE",
167 "TIMEOUT_T1_COOKIE", 167 "TIMEOUT_T1_COOKIE",
168 "TIMEOUT_T1_INIT", 168 "TIMEOUT_T1_INIT",