diff options
author | Mathias Krause <minipli@googlemail.com> | 2013-02-24 08:09:12 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-03-10 04:46:43 -0400 |
commit | a84fb791cb467851772a9196c05531be4abaf1bb (patch) | |
tree | 6051c137013541d944115a7b4c67da0bc8c393b5 /crypto | |
parent | 918731fa2808352387a872799d96f1e293e5f658 (diff) |
crypto: user - constify netlink dispatch table
There is no need to modify the netlink dispatch table at runtime and
making it const even makes the resulting object file slightly smaller.
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/crypto_user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c index dfd511fb39ee..1512e41cd93d 100644 --- a/crypto/crypto_user.c +++ b/crypto/crypto_user.c | |||
@@ -440,7 +440,7 @@ static const struct nla_policy crypto_policy[CRYPTOCFGA_MAX+1] = { | |||
440 | 440 | ||
441 | #undef MSGSIZE | 441 | #undef MSGSIZE |
442 | 442 | ||
443 | static struct crypto_link { | 443 | static const struct crypto_link { |
444 | int (*doit)(struct sk_buff *, struct nlmsghdr *, struct nlattr **); | 444 | int (*doit)(struct sk_buff *, struct nlmsghdr *, struct nlattr **); |
445 | int (*dump)(struct sk_buff *, struct netlink_callback *); | 445 | int (*dump)(struct sk_buff *, struct netlink_callback *); |
446 | int (*done)(struct netlink_callback *); | 446 | int (*done)(struct netlink_callback *); |
@@ -456,7 +456,7 @@ static struct crypto_link { | |||
456 | static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | 456 | static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) |
457 | { | 457 | { |
458 | struct nlattr *attrs[CRYPTOCFGA_MAX+1]; | 458 | struct nlattr *attrs[CRYPTOCFGA_MAX+1]; |
459 | struct crypto_link *link; | 459 | const struct crypto_link *link; |
460 | int type, err; | 460 | int type, err; |
461 | 461 | ||
462 | type = nlh->nlmsg_type; | 462 | type = nlh->nlmsg_type; |