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>
This commit is contained in:

committed by
David S. Miller

parent
db71789c01
commit
36cbd3dcc1
@@ -69,14 +69,14 @@ static int eth; /* Use "eth" or "irlan" name for devices */
|
||||
static int access = ACCESS_PEER; /* PEER, DIRECT or HOSTED */
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
static const char *irlan_access[] = {
|
||||
static const char *const irlan_access[] = {
|
||||
"UNKNOWN",
|
||||
"DIRECT",
|
||||
"PEER",
|
||||
"HOSTED"
|
||||
};
|
||||
|
||||
static const char *irlan_media[] = {
|
||||
static const char *const irlan_media[] = {
|
||||
"UNKNOWN",
|
||||
"802.3",
|
||||
"802.5"
|
||||
|
Reference in New Issue
Block a user