diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-08-05 13:42:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-05 13:42:58 -0400 |
commit | 36cbd3dcc10384f813ec0814255f576c84f2bcd4 (patch) | |
tree | c3579edea972519d2f9ae99d7da9a5dd56e6f5c1 /net/irda | |
parent | db71789c01ae7b641f83c5aa64e7df25122f4b28 (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>
Diffstat (limited to 'net/irda')
-rw-r--r-- | net/irda/ircomm/ircomm_event.c | 4 | ||||
-rw-r--r-- | net/irda/ircomm/ircomm_tty_attach.c | 4 | ||||
-rw-r--r-- | net/irda/iriap.c | 4 | ||||
-rw-r--r-- | net/irda/irlan/irlan_common.c | 4 | ||||
-rw-r--r-- | net/irda/irlap.c | 2 | ||||
-rw-r--r-- | net/irda/irlap_event.c | 4 | ||||
-rw-r--r-- | net/irda/irlmp_event.c | 6 |
7 files changed, 14 insertions, 14 deletions
diff --git a/net/irda/ircomm/ircomm_event.c b/net/irda/ircomm/ircomm_event.c index c35b3ef5c2f..d78554fedba 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, | |||
49 | static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event, | 49 | static 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 | ||
52 | char *ircomm_state[] = { | 52 | const 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 |
60 | static char *ircomm_event[] = { | 60 | static 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 9032a1d1190..eafc010907c 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 | ||
83 | char *ircomm_tty_state[] = { | 83 | const 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 |
94 | static char *ircomm_tty_event[] = { | 94 | static 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 4a105dc32dc..294e34d3517 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 */ |
47 | static const char *ias_charset_types[] = { | 47 | static 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 | ||
969 | static const char *ias_value_types[] = { | 969 | static 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 774d73a7685..62116829b81 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 */ | |||
69 | static int access = ACCESS_PEER; /* PEER, DIRECT or HOSTED */ | 69 | static int access = ACCESS_PEER; /* PEER, DIRECT or HOSTED */ |
70 | 70 | ||
71 | #ifdef CONFIG_PROC_FS | 71 | #ifdef CONFIG_PROC_FS |
72 | static const char *irlan_access[] = { | 72 | static 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 | ||
79 | static const char *irlan_media[] = { | 79 | static 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 e4965b764b9..356e65b1dc4 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 |
66 | static char *lap_reasons[] = { | 66 | static 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 16c4ef0f5c1..c5c51959e3c 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 |
81 | static const char *irlap_event[] = { | 81 | static 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 | ||
123 | const char *irlap_state[] = { | 123 | const 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 78cce0cb073..c1fb5db8104 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 | ||
36 | const char *irlmp_state[] = { | 36 | const 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 | ||
42 | const char *irlsap_state[] = { | 42 | const 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 |
52 | static const char *irlmp_event[] = { | 52 | static 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", |