Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1373528
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/9] rxrpc: Static arrays of strings should be const char *const[] |
| Date | 2016-04-07 18:30 +0200 |
| Message-ID | <rlkYH-6F9-55@gated-at.bofh.it> (permalink) |
| References | <rlkYG-6F9-9@gated-at.bofh.it> |
| Organization | Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 |
Static arrays of strings should be const char *const[].
Signed-off-by: David Howells <dhowells@redhat.com>
---
include/rxrpc/packet.h | 2 --
net/rxrpc/ar-internal.h | 2 +-
net/rxrpc/misc.c | 2 +-
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/rxrpc/packet.h b/include/rxrpc/packet.h
index 9ebab3a8cf0a..b2017440b765 100644
--- a/include/rxrpc/packet.h
+++ b/include/rxrpc/packet.h
@@ -68,8 +68,6 @@ struct rxrpc_wire_header {
} __packed;
-extern const char *rxrpc_pkts[];
-
#define RXRPC_SUPPORTED_PACKET_TYPES ( \
(1 << RXRPC_PACKET_TYPE_DATA) | \
(1 << RXRPC_PACKET_TYPE_ACK) | \
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 24126d954f38..eeb829e837e1 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -637,7 +637,7 @@ extern unsigned int rxrpc_rx_window_size;
extern unsigned int rxrpc_rx_mtu;
extern unsigned int rxrpc_rx_jumbo_max;
-extern const char *rxrpc_pkts[];
+extern const char *const rxrpc_pkts[];
extern const s8 rxrpc_ack_priority[];
extern const char *rxrpc_acks(u8 reason);
diff --git a/net/rxrpc/misc.c b/net/rxrpc/misc.c
index 8ebeec3384e1..1afe9876e79f 100644
--- a/net/rxrpc/misc.c
+++ b/net/rxrpc/misc.c
@@ -58,7 +58,7 @@ unsigned int rxrpc_rx_mtu = 5692;
*/
unsigned int rxrpc_rx_jumbo_max = 4;
-const char *rxrpc_pkts[] = {
+const char *const rxrpc_pkts[] = {
"?00",
"DATA", "ACK", "BUSY", "ABORT", "ACKALL", "CHALL", "RESP", "DEBUG",
"?09", "?10", "?11", "?12", "VERSION", "?14", "?15"
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/9] RxRPC: 2nd rewrite part 1 David Howells <dhowells@redhat.com> - 2016-04-07 18:30 +0200
[PATCH 6/9] rxrpc: Don't pass gfp around in incoming call handling functions David Howells <dhowells@redhat.com> - 2016-04-07 18:30 +0200
[PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Howells <dhowells@redhat.com> - 2016-04-07 18:30 +0200
Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. Joe Perches <joe@perches.com> - 2016-04-07 18:40 +0200
Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Howells <dhowells@redhat.com> - 2016-04-07 19:10 +0200
Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. Joe Perches <joe@perches.com> - 2016-04-07 19:20 +0200
Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Howells <dhowells@redhat.com> - 2016-04-07 21:50 +0200
Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. Joe Perches <joe@perches.com> - 2016-04-07 22:30 +0200
Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Howells <dhowells@redhat.com> - 2016-04-07 22:50 +0200
Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Miller <davem@davemloft.net> - 2016-04-07 19:40 +0200
Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Howells <dhowells@redhat.com> - 2016-04-07 21:50 +0200
Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Miller <davem@davemloft.net> - 2016-04-07 22:40 +0200
Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Howells <dhowells@redhat.com> - 2016-04-07 22:50 +0200
Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Miller <davem@davemloft.net> - 2016-04-07 23:00 +0200
Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Howells <dhowells@redhat.com> - 2016-04-07 23:30 +0200
[PATCH 4/9] rxrpc: Static arrays of strings should be const char *const[] David Howells <dhowells@redhat.com> - 2016-04-07 18:30 +0200
[PATCH 5/9] rxrpc: Differentiate local and remote abort codes in structs David Howells <dhowells@redhat.com> - 2016-04-07 18:30 +0200
[PATCH 1/9] afs: Wait for outstanding async calls before closing rxrpc socket David Howells <dhowells@redhat.com> - 2016-04-07 18:30 +0200
[PATCH 9/9] rxrpc: Create a null security type and get rid of conditional calls David Howells <dhowells@redhat.com> - 2016-04-07 18:30 +0200
Re: [PATCH 0/9] RxRPC: 2nd rewrite part 1 David Miller <davem@davemloft.net> - 2016-04-11 21:40 +0200
Re: [PATCH 0/9] RxRPC: 2nd rewrite part 1 David Howells <dhowells@redhat.com> - 2016-04-11 22:40 +0200
Re: [PATCH 0/9] RxRPC: 2nd rewrite part 1 David Howells <dhowells@redhat.com> - 2016-04-12 00:10 +0200
Re: [PATCH 0/9] RxRPC: 2nd rewrite part 1 David Howells <dhowells@redhat.com> - 2016-04-12 00:40 +0200
Re: [PATCH 0/9] RxRPC: 2nd rewrite part 1 David Miller <davem@davemloft.net> - 2016-04-12 03:30 +0200
csiph-web