Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jan Engelhardt and committed by
David S. Miller
36cbd3dc db71789c

+74 -66
+2 -1
include/net/ip_vs.h
··· 738 738 extern void ip_vs_protocol_timeout_change(int flags); 739 739 extern int *ip_vs_create_timeout_table(int *table, int size); 740 740 extern int 741 - ip_vs_set_state_timeout(int *table, int num, char **names, char *name, int to); 741 + ip_vs_set_state_timeout(int *table, int num, const char *const *names, 742 + const char *name, int to); 742 743 extern void 743 744 ip_vs_tcpudp_debug_packet(struct ip_vs_protocol *pp, const struct sk_buff *skb, 744 745 int offset, const char *msg);
+1 -1
include/net/irda/ircomm_event.h
··· 74 74 struct qos_info *qos; 75 75 }; 76 76 77 - extern char *ircomm_state[]; 77 + extern const char *const ircomm_state[]; 78 78 79 79 struct ircomm_cb; /* Forward decl. */ 80 80
+2 -2
include/net/irda/ircomm_tty_attach.h
··· 66 66 __u8 dlsap_sel; 67 67 }; 68 68 69 - extern char *ircomm_state[]; 70 - extern char *ircomm_tty_state[]; 69 + extern const char *const ircomm_state[]; 70 + extern const char *const ircomm_tty_state[]; 71 71 72 72 int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event, 73 73 struct sk_buff *skb, struct ircomm_tty_info *info);
+1 -1
include/net/irda/irlap_event.h
··· 120 120 LAP_PRIMARY_CONFLICT, 121 121 } LAP_REASON; 122 122 123 - extern const char *irlap_state[]; 123 + extern const char *const irlap_state[]; 124 124 125 125 void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, 126 126 struct sk_buff *skb, struct irlap_info *info);
+2 -2
include/net/irda/irlmp_event.h
··· 79 79 LM_LAP_IDLE_TIMEOUT, 80 80 } IRLMP_EVENT; 81 81 82 - extern const char *irlmp_state[]; 83 - extern const char *irlsap_state[]; 82 + extern const char *const irlmp_state[]; 83 + extern const char *const irlsap_state[]; 84 84 85 85 void irlmp_watchdog_timer_expired(void *data); 86 86 void irlmp_discovery_timer_expired(void *data);
+3 -1
include/net/sctp/constants.h
··· 241 241 const char *sctp_pname(const sctp_subtype_t); /* primitives */ 242 242 243 243 /* This is a table of printable names of sctp_state_t's. */ 244 - extern const char *sctp_state_tbl[], *sctp_evttype_tbl[], *sctp_status_tbl[]; 244 + extern const char *const sctp_state_tbl[]; 245 + extern const char *const sctp_evttype_tbl[]; 246 + extern const char *const sctp_status_tbl[]; 245 247 246 248 /* Maximum chunk length considering padding requirements. */ 247 249 enum { SCTP_MAX_CHUNK_LEN = ((1<<16) - sizeof(__u32)) };
+1 -1
net/8021q/vlanproc.c
··· 107 107 */ 108 108 109 109 /* Strings */ 110 - static const char *vlan_name_type_str[VLAN_NAME_TYPE_HIGHEST] = { 110 + static const char *const vlan_name_type_str[VLAN_NAME_TYPE_HIGHEST] = { 111 111 [VLAN_NAME_TYPE_RAW_PLUS_VID] = "VLAN_NAME_TYPE_RAW_PLUS_VID", 112 112 [VLAN_NAME_TYPE_PLUS_VID_NO_PAD] = "VLAN_NAME_TYPE_PLUS_VID_NO_PAD", 113 113 [VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD] = "VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD",
+5 -4
net/atm/lec.c
··· 935 935 } 936 936 937 937 #ifdef CONFIG_PROC_FS 938 - static char *lec_arp_get_status_string(unsigned char status) 938 + static 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 941 "ESI_UNKNOWN ", 942 942 "ESI_ARP_PENDING ", 943 943 "ESI_VC_PENDING ", ··· 1121 1121 1122 1122 static 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 1126 " Status Flags " 1126 1127 "VPI/VCI Recv VPI/VCI\n"; 1127 1128 ··· 1506 1505 } 1507 1506 1508 1507 #if DEBUG_ARP_TABLE 1509 - static char *get_status_string(unsigned char st) 1508 + static const char *get_status_string(unsigned char st) 1510 1509 { 1511 1510 switch (st) { 1512 1511 case ESI_UNKNOWN:
+5 -4
net/atm/proc.c
··· 151 151 152 152 static void pvc_info(struct seq_file *seq, struct atm_vcc *vcc) 153 153 { 154 - static const char *class_name[] = { "off","UBR","CBR","VBR","ABR" }; 155 - static const char *aal_name[] = { 154 + static const char *const class_name[] = 155 + {"off","UBR","CBR","VBR","ABR"}; 156 + static const char *const aal_name[] = { 156 157 "---", "1", "2", "3/4", /* 0- 3 */ 157 158 "???", "5", "???", "???", /* 4- 7 */ 158 159 "???", "???", "???", "???", /* 8-11 */ ··· 179 178 180 179 static const char *vcc_state(struct atm_vcc *vcc) 181 180 { 182 - static const char *map[] = { ATM_VS2TXT_MAP }; 181 + static const char *const map[] = { ATM_VS2TXT_MAP }; 183 182 184 183 return map[ATM_VF2VS(vcc->flags)]; 185 184 } ··· 336 335 337 336 static int svc_seq_show(struct seq_file *seq, void *v) 338 337 { 339 - static char atm_svc_banner[] = 338 + static const char atm_svc_banner[] = 340 339 "Itf VPI VCI State Remote\n"; 341 340 342 341 if (v == SEQ_START_TOKEN)
+2 -2
net/bluetooth/af_bluetooth.c
··· 49 49 static DEFINE_RWLOCK(bt_proto_lock); 50 50 51 51 static struct lock_class_key bt_lock_key[BT_MAX_PROTO]; 52 - static const char *bt_key_strings[BT_MAX_PROTO] = { 52 + static const char *const bt_key_strings[BT_MAX_PROTO] = { 53 53 "sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP", 54 54 "sk_lock-AF_BLUETOOTH-BTPROTO_HCI", 55 55 "sk_lock-AF_BLUETOOTH-BTPROTO_SCO", ··· 61 61 }; 62 62 63 63 static struct lock_class_key bt_slock_key[BT_MAX_PROTO]; 64 - static const char *bt_slock_key_strings[BT_MAX_PROTO] = { 64 + static const char *const bt_slock_key_strings[BT_MAX_PROTO] = { 65 65 "slock-AF_BLUETOOTH-BTPROTO_L2CAP", 66 66 "slock-AF_BLUETOOTH-BTPROTO_HCI", 67 67 "slock-AF_BLUETOOTH-BTPROTO_SCO",
+1 -1
net/bridge/br_stp.c
··· 21 21 */ 22 22 #define MESSAGE_AGE_INCR ((HZ < 256) ? 1 : (HZ/256)) 23 23 24 - static const char *br_port_state_names[] = { 24 + static const char *const br_port_state_names[] = { 25 25 [BR_STATE_DISABLED] = "disabled", 26 26 [BR_STATE_LISTENING] = "listening", 27 27 [BR_STATE_LEARNING] = "learning",
+1 -1
net/core/dev.c
··· 272 272 ARPHRD_PHONET_PIPE, ARPHRD_IEEE802154, ARPHRD_IEEE802154_PHY, 273 273 ARPHRD_VOID, ARPHRD_NONE}; 274 274 275 - static const char *netdev_lock_name[] = 275 + static const char *const netdev_lock_name[] = 276 276 {"_xmit_NETROM", "_xmit_ETHER", "_xmit_EETHER", "_xmit_AX25", 277 277 "_xmit_PRONET", "_xmit_CHAOS", "_xmit_IEEE802", "_xmit_ARCNET", 278 278 "_xmit_APPLETLK", "_xmit_DLCI", "_xmit_ATM", "_xmit_METRICOM",
+1 -1
net/core/net-sysfs.c
··· 141 141 return -EINVAL; 142 142 } 143 143 144 - static const char *operstates[] = { 144 + static const char *const operstates[] = { 145 145 "unknown", 146 146 "notpresent", /* currently unused */ 147 147 "down",
+3 -3
net/core/sock.c
··· 142 142 * strings build-time, so that runtime initialization of socket 143 143 * locks is fast): 144 144 */ 145 - static const char *af_family_key_strings[AF_MAX+1] = { 145 + static const char *const af_family_key_strings[AF_MAX+1] = { 146 146 "sk_lock-AF_UNSPEC", "sk_lock-AF_UNIX" , "sk_lock-AF_INET" , 147 147 "sk_lock-AF_AX25" , "sk_lock-AF_IPX" , "sk_lock-AF_APPLETALK", 148 148 "sk_lock-AF_NETROM", "sk_lock-AF_BRIDGE" , "sk_lock-AF_ATMPVC" , ··· 158 158 "sk_lock-AF_IEEE802154", 159 159 "sk_lock-AF_MAX" 160 160 }; 161 - static const char *af_family_slock_key_strings[AF_MAX+1] = { 161 + static const char *const af_family_slock_key_strings[AF_MAX+1] = { 162 162 "slock-AF_UNSPEC", "slock-AF_UNIX" , "slock-AF_INET" , 163 163 "slock-AF_AX25" , "slock-AF_IPX" , "slock-AF_APPLETALK", 164 164 "slock-AF_NETROM", "slock-AF_BRIDGE" , "slock-AF_ATMPVC" , ··· 174 174 "slock-AF_IEEE802154", 175 175 "slock-AF_MAX" 176 176 }; 177 - static const char *af_family_clock_key_strings[AF_MAX+1] = { 177 + static const char *const af_family_clock_key_strings[AF_MAX+1] = { 178 178 "clock-AF_UNSPEC", "clock-AF_UNIX" , "clock-AF_INET" , 179 179 "clock-AF_AX25" , "clock-AF_IPX" , "clock-AF_APPLETALK", 180 180 "clock-AF_NETROM", "clock-AF_BRIDGE" , "clock-AF_ATMPVC" ,
+2 -2
net/dccp/ccids/ccid3.c
··· 52 52 #ifdef CONFIG_IP_DCCP_CCID3_DEBUG 53 53 static 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 56 [TFRC_SSTATE_NO_SENT] = "NO_SENT", 57 57 [TFRC_SSTATE_NO_FBACK] = "NO_FBACK", 58 58 [TFRC_SSTATE_FBACK] = "FBACK", ··· 646 646 #ifdef CONFIG_IP_DCCP_CCID3_DEBUG 647 647 static 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 650 [TFRC_RSTATE_NO_DATA] = "NO_DATA", 651 651 [TFRC_RSTATE_DATA] = "DATA", 652 652 [TFRC_RSTATE_TERM] = "TERM",
+4 -3
net/dccp/feat.c
··· 213 213 */ 214 214 static const char *dccp_feat_fname(const u8 feat) 215 215 { 216 - static const char *feature_names[] = { 216 + static const char *const feature_names[] = { 217 217 [DCCPF_RESERVED] = "Reserved", 218 218 [DCCPF_CCID] = "CCID", 219 219 [DCCPF_SHORT_SEQNOS] = "Allow Short Seqnos", ··· 236 236 return feature_names[feat]; 237 237 } 238 238 239 - static const char *dccp_feat_sname[] = { "DEFAULT", "INITIALISING", "CHANGING", 240 - "UNSTABLE", "STABLE" }; 239 + static const char *const dccp_feat_sname[] = { 240 + "DEFAULT", "INITIALISING", "CHANGING", "UNSTABLE", "STABLE", 241 + }; 241 242 242 243 #ifdef CONFIG_IP_DCCP_DEBUG 243 244 static const char *dccp_feat_oname(const u8 opt)
+2 -2
net/dccp/proto.c
··· 124 124 125 125 const 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 128 [DCCP_PKT_REQUEST] = "REQUEST", 129 129 [DCCP_PKT_RESPONSE] = "RESPONSE", 130 130 [DCCP_PKT_DATA] = "DATA", ··· 147 147 148 148 const char *dccp_state_name(const int state) 149 149 { 150 - static char *dccp_state_names[] = { 150 + static const char *const dccp_state_names[] = { 151 151 [DCCP_OPEN] = "OPEN", 152 152 [DCCP_REQUESTING] = "REQUESTING", 153 153 [DCCP_PARTOPEN] = "PARTOPEN",
+1 -1
net/ipv4/fib_trie.c
··· 2421 2421 } 2422 2422 } 2423 2423 2424 - static const char *rtn_type_names[__RTN_MAX] = { 2424 + static const char *const rtn_type_names[__RTN_MAX] = { 2425 2425 [RTN_UNSPEC] = "UNSPEC", 2426 2426 [RTN_UNICAST] = "UNICAST", 2427 2427 [RTN_LOCAL] = "LOCAL",
+2 -2
net/ipv6/proc.c
··· 101 101 }; 102 102 103 103 /* RFC 4293 v6 ICMPMsgStatsTable; named items for RFC 2466 compatibility */ 104 - static char *icmp6type2name[256] = { 104 + static const char *const icmp6type2name[256] = { 105 105 [ICMPV6_DEST_UNREACH] = "DestUnreachs", 106 106 [ICMPV6_PKT_TOOBIG] = "PktTooBigs", 107 107 [ICMPV6_TIME_EXCEED] = "TimeExcds", ··· 144 144 /* print by name -- deprecated items */ 145 145 for (i = 0; i < ICMP6MSG_MIB_MAX; i++) { 146 146 int icmptype; 147 - char *p; 147 + const char *p; 148 148 149 149 icmptype = i & 0xff; 150 150 p = icmp6type2name[icmptype];
+2 -2
net/irda/ircomm/ircomm_event.c
··· 49 49 static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event, 50 50 struct sk_buff *skb, struct ircomm_info *info); 51 51 52 - char *ircomm_state[] = { 52 + const char *const ircomm_state[] = { 53 53 "IRCOMM_IDLE", 54 54 "IRCOMM_WAITI", 55 55 "IRCOMM_WAITR", ··· 57 57 }; 58 58 59 59 #ifdef CONFIG_IRDA_DEBUG 60 - static char *ircomm_event[] = { 60 + static const char *const ircomm_event[] = { 61 61 "IRCOMM_CONNECT_REQUEST", 62 62 "IRCOMM_CONNECT_RESPONSE", 63 63 "IRCOMM_TTP_CONNECT_INDICATION",
+2 -2
net/irda/ircomm/ircomm_tty_attach.c
··· 80 80 struct sk_buff *skb, 81 81 struct ircomm_tty_info *info); 82 82 83 - char *ircomm_tty_state[] = { 83 + const char *const ircomm_tty_state[] = { 84 84 "IRCOMM_TTY_IDLE", 85 85 "IRCOMM_TTY_SEARCH", 86 86 "IRCOMM_TTY_QUERY_PARAMETERS", ··· 91 91 }; 92 92 93 93 #ifdef CONFIG_IRDA_DEBUG 94 - static char *ircomm_tty_event[] = { 94 + static const char *const ircomm_tty_event[] = { 95 95 "IRCOMM_TTY_ATTACH_CABLE", 96 96 "IRCOMM_TTY_DETACH_CABLE", 97 97 "IRCOMM_TTY_DATA_REQUEST",
+2 -2
net/irda/iriap.c
··· 44 44 45 45 #ifdef CONFIG_IRDA_DEBUG 46 46 /* FIXME: This one should go in irlmp.c */ 47 - static const char *ias_charset_types[] = { 47 + static const char *const ias_charset_types[] = { 48 48 "CS_ASCII", 49 49 "CS_ISO_8859_1", 50 50 "CS_ISO_8859_2", ··· 966 966 967 967 #ifdef CONFIG_PROC_FS 968 968 969 - static const char *ias_value_types[] = { 969 + static const char *const ias_value_types[] = { 970 970 "IAS_MISSING", 971 971 "IAS_INTEGER", 972 972 "IAS_OCT_SEQ",
+2 -2
net/irda/irlan/irlan_common.c
··· 69 69 static int access = ACCESS_PEER; /* PEER, DIRECT or HOSTED */ 70 70 71 71 #ifdef CONFIG_PROC_FS 72 - static const char *irlan_access[] = { 72 + static const char *const irlan_access[] = { 73 73 "UNKNOWN", 74 74 "DIRECT", 75 75 "PEER", 76 76 "HOSTED" 77 77 }; 78 78 79 - static const char *irlan_media[] = { 79 + static const char *const irlan_media[] = { 80 80 "UNKNOWN", 81 81 "802.3", 82 82 "802.5"
+1 -1
net/irda/irlap.c
··· 63 63 struct qos_info *qos_user); 64 64 65 65 #ifdef CONFIG_IRDA_DEBUG 66 - static char *lap_reasons[] = { 66 + static const char *const lap_reasons[] = { 67 67 "ERROR, NOT USED", 68 68 "LAP_DISC_INDICATION", 69 69 "LAP_NO_RESPONSE",
+2 -2
net/irda/irlap_event.c
··· 78 78 struct sk_buff *, struct irlap_info *); 79 79 80 80 #ifdef CONFIG_IRDA_DEBUG 81 - static const char *irlap_event[] = { 81 + static const char *const irlap_event[] = { 82 82 "DISCOVERY_REQUEST", 83 83 "CONNECT_REQUEST", 84 84 "CONNECT_RESPONSE", ··· 120 120 }; 121 121 #endif /* CONFIG_IRDA_DEBUG */ 122 122 123 - const char *irlap_state[] = { 123 + const char *const irlap_state[] = { 124 124 "LAP_NDM", 125 125 "LAP_QUERY", 126 126 "LAP_REPLY",
+3 -3
net/irda/irlmp_event.c
··· 33 33 #include <net/irda/irlmp_frame.h> 34 34 #include <net/irda/irlmp_event.h> 35 35 36 - const char *irlmp_state[] = { 36 + const char *const irlmp_state[] = { 37 37 "LAP_STANDBY", 38 38 "LAP_U_CONNECT", 39 39 "LAP_ACTIVE", 40 40 }; 41 41 42 - const char *irlsap_state[] = { 42 + const char *const irlsap_state[] = { 43 43 "LSAP_DISCONNECTED", 44 44 "LSAP_CONNECT", 45 45 "LSAP_CONNECT_PEND", ··· 49 49 }; 50 50 51 51 #ifdef CONFIG_IRDA_DEBUG 52 - static const char *irlmp_event[] = { 52 + static const char *const irlmp_event[] = { 53 53 "LM_CONNECT_REQUEST", 54 54 "LM_CONNECT_CONFIRM", 55 55 "LM_CONNECT_RESPONSE",
+1 -1
net/llc/llc_proc.c
··· 143 143 return 0; 144 144 } 145 145 146 - static char *llc_conn_state_names[] = { 146 + static const char *const llc_conn_state_names[] = { 147 147 [LLC_CONN_STATE_ADM] = "adm", 148 148 [LLC_CONN_STATE_SETUP] = "setup", 149 149 [LLC_CONN_STATE_NORMAL] = "normal",
+2 -1
net/netfilter/ipvs/ip_vs_proto.c
··· 127 127 * Set timeout value for state specified by name 128 128 */ 129 129 int 130 - ip_vs_set_state_timeout(int *table, int num, char **names, char *name, int to) 130 + ip_vs_set_state_timeout(int *table, int num, const char *const *names, 131 + const char *name, int to) 131 132 { 132 133 int i; 133 134
+1 -1
net/netfilter/ipvs/ip_vs_proto_tcp.c
··· 377 377 [IP_VS_TCP_S_LAST] = 2*HZ, 378 378 }; 379 379 380 - static char * tcp_state_name_table[IP_VS_TCP_S_LAST+1] = { 380 + static const char *const tcp_state_name_table[IP_VS_TCP_S_LAST+1] = { 381 381 [IP_VS_TCP_S_NONE] = "NONE", 382 382 [IP_VS_TCP_S_ESTABLISHED] = "ESTABLISHED", 383 383 [IP_VS_TCP_S_SYN_SENT] = "SYN_SENT",
+1 -1
net/netfilter/ipvs/ip_vs_proto_udp.c
··· 472 472 [IP_VS_UDP_S_LAST] = 2*HZ, 473 473 }; 474 474 475 - static char * udp_state_name_table[IP_VS_UDP_S_LAST+1] = { 475 + static const char *const udp_state_name_table[IP_VS_UDP_S_LAST+1] = { 476 476 [IP_VS_UDP_S_NORMAL] = "UDP", 477 477 [IP_VS_UDP_S_LAST] = "BUG!", 478 478 };
+1 -1
net/rds/ib_stats.c
··· 39 39 40 40 DEFINE_PER_CPU(struct rds_ib_statistics, rds_ib_stats) ____cacheline_aligned; 41 41 42 - static char *rds_ib_stat_names[] = { 42 + static const char *const rds_ib_stat_names[] = { 43 43 "ib_connect_raced", 44 44 "ib_listen_closed_stale", 45 45 "ib_tx_cq_call",
+1 -1
net/rds/iw_stats.c
··· 39 39 40 40 DEFINE_PER_CPU(struct rds_iw_statistics, rds_iw_stats) ____cacheline_aligned; 41 41 42 - static char *rds_iw_stat_names[] = { 42 + static const char *const rds_iw_stat_names[] = { 43 43 "iw_connect_raced", 44 44 "iw_listen_closed_stale", 45 45 "iw_tx_cq_call",
+2 -1
net/rds/rds.h
··· 652 652 int __init rds_stats_init(void); 653 653 void rds_stats_exit(void); 654 654 void 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 658 /* sysctl.c */ 658 659 int __init rds_sysctl_init(void);
+2 -2
net/rds/stats.c
··· 40 40 41 41 /* :.,$s/unsigned long\>.*\<s_\(.*\);/"\1",/g */ 42 42 43 - static char *rds_stat_names[] = { 43 + static const char *const rds_stat_names[] = { 44 44 "conn_reset", 45 45 "recv_drop_bad_checksum", 46 46 "recv_drop_old_seq", ··· 77 77 }; 78 78 79 79 void 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 82 struct rds_info_counter ctr; 83 83 size_t i;
+1 -1
net/rxrpc/ar-ack.c
··· 20 20 21 21 static unsigned rxrpc_ack_defer = 1; 22 22 23 - static const char *rxrpc_acks[] = { 23 + static const char *const rxrpc_acks[] = { 24 24 "---", "REQ", "DUP", "OOS", "WIN", "MEM", "PNG", "PNR", "DLY", "IDL", 25 25 "-?-" 26 26 };
+7 -7
net/sctp/debug.c
··· 52 52 #endif /* SCTP_DEBUG */ 53 53 54 54 /* These are printable forms of Chunk ID's from section 3.1. */ 55 - static const char *sctp_cid_tbl[SCTP_NUM_BASE_CHUNK_TYPES] = { 55 + static const char *const sctp_cid_tbl[SCTP_NUM_BASE_CHUNK_TYPES] = { 56 56 "DATA", 57 57 "INIT", 58 58 "INIT_ACK", ··· 97 97 } 98 98 99 99 /* These are printable forms of the states. */ 100 - const char *sctp_state_tbl[SCTP_STATE_NUM_STATES] = { 100 + const char *const sctp_state_tbl[SCTP_STATE_NUM_STATES] = { 101 101 "STATE_EMPTY", 102 102 "STATE_CLOSED", 103 103 "STATE_COOKIE_WAIT", ··· 110 110 }; 111 111 112 112 /* Events that could change the state of an association. */ 113 - const char *sctp_evttype_tbl[] = { 113 + const char *const sctp_evttype_tbl[] = { 114 114 "EVENT_T_unknown", 115 115 "EVENT_T_CHUNK", 116 116 "EVENT_T_TIMEOUT", ··· 119 119 }; 120 120 121 121 /* Return value of a state function */ 122 - const char *sctp_status_tbl[] = { 122 + const char *const sctp_status_tbl[] = { 123 123 "DISPOSITION_DISCARD", 124 124 "DISPOSITION_CONSUME", 125 125 "DISPOSITION_NOMEM", ··· 132 132 }; 133 133 134 134 /* Printable forms of primitives */ 135 - static const char *sctp_primitive_tbl[SCTP_NUM_PRIMITIVE_TYPES] = { 135 + static const char *const sctp_primitive_tbl[SCTP_NUM_PRIMITIVE_TYPES] = { 136 136 "PRIMITIVE_ASSOCIATE", 137 137 "PRIMITIVE_SHUTDOWN", 138 138 "PRIMITIVE_ABORT", ··· 149 149 return "unknown_primitive"; 150 150 } 151 151 152 - static const char *sctp_other_tbl[] = { 152 + static const char *const sctp_other_tbl[] = { 153 153 "NO_PENDING_TSN", 154 154 "ICMP_PROTO_UNREACH", 155 155 }; ··· 162 162 return "unknown 'other' event"; 163 163 } 164 164 165 - static const char *sctp_timer_tbl[] = { 165 + static const char *const sctp_timer_tbl[] = { 166 166 "TIMEOUT_NONE", 167 167 "TIMEOUT_T1_COOKIE", 168 168 "TIMEOUT_T1_INIT",