Commit 36cbd3dc authored by Jan Engelhardt's avatar Jan Engelhardt Committed by David S. Miller
Browse files

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: default avatarJan Engelhardt <jengelh@medozas.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent db71789c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -738,7 +738,8 @@ extern void ip_vs_protocol_cleanup(void);
extern void ip_vs_protocol_timeout_change(int flags);
extern int *ip_vs_create_timeout_table(int *table, int size);
extern int
ip_vs_set_state_timeout(int *table, int num, char **names, char *name, int to);
ip_vs_set_state_timeout(int *table, int num, const char *const *names,
			const char *name, int to);
extern void
ip_vs_tcpudp_debug_packet(struct ip_vs_protocol *pp, const struct sk_buff *skb,
			  int offset, const char *msg);
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ struct ircomm_info {
	struct qos_info *qos;
};

extern char *ircomm_state[];
extern const char *const ircomm_state[];

struct ircomm_cb;   /* Forward decl. */

+2 −2
Original line number Diff line number Diff line
@@ -66,8 +66,8 @@ struct ircomm_tty_info {
        __u8      dlsap_sel;
};

extern char *ircomm_state[];
extern char *ircomm_tty_state[];
extern const char *const ircomm_state[];
extern const char *const ircomm_tty_state[];

int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event,
			struct sk_buff *skb, struct ircomm_tty_info *info);
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ typedef enum { /* FIXME check the two first reason codes */
	LAP_PRIMARY_CONFLICT,
} LAP_REASON;

extern const char *irlap_state[];
extern const char *const irlap_state[];

void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, 
		    struct sk_buff *skb, struct irlap_info *info);
+2 −2
Original line number Diff line number Diff line
@@ -79,8 +79,8 @@ typedef enum {
	LM_LAP_IDLE_TIMEOUT,
} IRLMP_EVENT;

extern const char *irlmp_state[];
extern const char *irlsap_state[];
extern const char *const irlmp_state[];
extern const char *const irlsap_state[];

void irlmp_watchdog_timer_expired(void *data);
void irlmp_discovery_timer_expired(void *data);
Loading