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
@@ -213,7 +213,7 @@ static int dccp_feat_default_value(u8 feat_num)
|
||||
*/
|
||||
static const char *dccp_feat_fname(const u8 feat)
|
||||
{
|
||||
static const char *feature_names[] = {
|
||||
static const char *const feature_names[] = {
|
||||
[DCCPF_RESERVED] = "Reserved",
|
||||
[DCCPF_CCID] = "CCID",
|
||||
[DCCPF_SHORT_SEQNOS] = "Allow Short Seqnos",
|
||||
@@ -236,8 +236,9 @@ static const char *dccp_feat_fname(const u8 feat)
|
||||
return feature_names[feat];
|
||||
}
|
||||
|
||||
static const char *dccp_feat_sname[] = { "DEFAULT", "INITIALISING", "CHANGING",
|
||||
"UNSTABLE", "STABLE" };
|
||||
static const char *const dccp_feat_sname[] = {
|
||||
"DEFAULT", "INITIALISING", "CHANGING", "UNSTABLE", "STABLE",
|
||||
};
|
||||
|
||||
#ifdef CONFIG_IP_DCCP_DEBUG
|
||||
static const char *dccp_feat_oname(const u8 opt)
|
||||
|
Reference in New Issue
Block a user