Commit a84fb791 authored by Mathias Krause's avatar Mathias Krause Committed by Herbert Xu

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: default avatarMathias Krause <minipli@googlemail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 918731fa
...@@ -440,7 +440,7 @@ static const struct nla_policy crypto_policy[CRYPTOCFGA_MAX+1] = { ...@@ -440,7 +440,7 @@ static const struct nla_policy crypto_policy[CRYPTOCFGA_MAX+1] = {
#undef MSGSIZE #undef MSGSIZE
static struct crypto_link { static const struct crypto_link {
int (*doit)(struct sk_buff *, struct nlmsghdr *, struct nlattr **); int (*doit)(struct sk_buff *, struct nlmsghdr *, struct nlattr **);
int (*dump)(struct sk_buff *, struct netlink_callback *); int (*dump)(struct sk_buff *, struct netlink_callback *);
int (*done)(struct netlink_callback *); int (*done)(struct netlink_callback *);
...@@ -456,7 +456,7 @@ static struct crypto_link { ...@@ -456,7 +456,7 @@ static struct crypto_link {
static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
{ {
struct nlattr *attrs[CRYPTOCFGA_MAX+1]; struct nlattr *attrs[CRYPTOCFGA_MAX+1];
struct crypto_link *link; const struct crypto_link *link;
int type, err; int type, err;
type = nlh->nlmsg_type; type = nlh->nlmsg_type;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment