Skip to content

Commit

Permalink
crypto: user - constify netlink dispatch table
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Mathias Krause <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
minipli authored and herbertx committed Mar 10, 2013
1 parent 918731f commit a84fb79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crypto/crypto_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ static const struct nla_policy crypto_policy[CRYPTOCFGA_MAX+1] = {

#undef MSGSIZE

static struct crypto_link {
static const struct crypto_link {
int (*doit)(struct sk_buff *, struct nlmsghdr *, struct nlattr **);
int (*dump)(struct sk_buff *, struct netlink_callback *);
int (*done)(struct netlink_callback *);
Expand All @@ -456,7 +456,7 @@ static struct crypto_link {
static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
{
struct nlattr *attrs[CRYPTOCFGA_MAX+1];
struct crypto_link *link;
const struct crypto_link *link;
int type, err;

type = nlh->nlmsg_type;
Expand Down

0 comments on commit a84fb79

Please sign in to comment.