aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_user.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-02-24 00:02:38 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-24 02:07:37 -0500
commit214e005bc32c7045b8554f9f0fb07b3fcce2cd42 (patch)
tree19549e83718646b6ec942f9c4aaf8ce5645cb0d0 /net/xfrm/xfrm_user.c
parent55ae22d08fc9b531bc8a88b7306004e7053bb425 (diff)
xfrm: Pass km_event pointers around as const when possible.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r--net/xfrm/xfrm_user.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 61291965c5f6..2cc9dab29887 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -1582,7 +1582,7 @@ static inline size_t xfrm_aevent_msgsize(void)
1582 + nla_total_size(4); /* XFRM_AE_ETHR */ 1582 + nla_total_size(4); /* XFRM_AE_ETHR */
1583} 1583}
1584 1584
1585static int build_aevent(struct sk_buff *skb, struct xfrm_state *x, struct km_event *c) 1585static int build_aevent(struct sk_buff *skb, struct xfrm_state *x, const struct km_event *c)
1586{ 1586{
1587 struct xfrm_aevent_id *id; 1587 struct xfrm_aevent_id *id;
1588 struct nlmsghdr *nlh; 1588 struct nlmsghdr *nlh;
@@ -2220,7 +2220,7 @@ static inline size_t xfrm_expire_msgsize(void)
2220 + nla_total_size(sizeof(struct xfrm_mark)); 2220 + nla_total_size(sizeof(struct xfrm_mark));
2221} 2221}
2222 2222
2223static int build_expire(struct sk_buff *skb, struct xfrm_state *x, struct km_event *c) 2223static int build_expire(struct sk_buff *skb, struct xfrm_state *x, const struct km_event *c)
2224{ 2224{
2225 struct xfrm_user_expire *ue; 2225 struct xfrm_user_expire *ue;
2226 struct nlmsghdr *nlh; 2226 struct nlmsghdr *nlh;
@@ -2242,7 +2242,7 @@ nla_put_failure:
2242 return -EMSGSIZE; 2242 return -EMSGSIZE;
2243} 2243}
2244 2244
2245static int xfrm_exp_state_notify(struct xfrm_state *x, struct km_event *c) 2245static int xfrm_exp_state_notify(struct xfrm_state *x, const struct km_event *c)
2246{ 2246{
2247 struct net *net = xs_net(x); 2247 struct net *net = xs_net(x);
2248 struct sk_buff *skb; 2248 struct sk_buff *skb;
@@ -2259,7 +2259,7 @@ static int xfrm_exp_state_notify(struct xfrm_state *x, struct km_event *c)
2259 return nlmsg_multicast(net->xfrm.nlsk, skb, 0, XFRMNLGRP_EXPIRE, GFP_ATOMIC); 2259 return nlmsg_multicast(net->xfrm.nlsk, skb, 0, XFRMNLGRP_EXPIRE, GFP_ATOMIC);
2260} 2260}
2261 2261
2262static int xfrm_aevent_state_notify(struct xfrm_state *x, struct km_event *c) 2262static int xfrm_aevent_state_notify(struct xfrm_state *x, const struct km_event *c)
2263{ 2263{
2264 struct net *net = xs_net(x); 2264 struct net *net = xs_net(x);
2265 struct sk_buff *skb; 2265 struct sk_buff *skb;
@@ -2274,7 +2274,7 @@ static int xfrm_aevent_state_notify(struct xfrm_state *x, struct km_event *c)
2274 return nlmsg_multicast(net->xfrm.nlsk, skb, 0, XFRMNLGRP_AEVENTS, GFP_ATOMIC); 2274 return nlmsg_multicast(net->xfrm.nlsk, skb, 0, XFRMNLGRP_AEVENTS, GFP_ATOMIC);
2275} 2275}
2276 2276
2277static int xfrm_notify_sa_flush(struct km_event *c) 2277static int xfrm_notify_sa_flush(const struct km_event *c)
2278{ 2278{
2279 struct net *net = c->net; 2279 struct net *net = c->net;
2280 struct xfrm_usersa_flush *p; 2280 struct xfrm_usersa_flush *p;
@@ -2330,7 +2330,7 @@ static inline size_t xfrm_sa_len(struct xfrm_state *x)
2330 return l; 2330 return l;
2331} 2331}
2332 2332
2333static int xfrm_notify_sa(struct xfrm_state *x, struct km_event *c) 2333static int xfrm_notify_sa(struct xfrm_state *x, const struct km_event *c)
2334{ 2334{
2335 struct net *net = xs_net(x); 2335 struct net *net = xs_net(x);
2336 struct xfrm_usersa_info *p; 2336 struct xfrm_usersa_info *p;
@@ -2387,7 +2387,7 @@ nla_put_failure:
2387 return -1; 2387 return -1;
2388} 2388}
2389 2389
2390static int xfrm_send_state_notify(struct xfrm_state *x, struct km_event *c) 2390static int xfrm_send_state_notify(struct xfrm_state *x, const struct km_event *c)
2391{ 2391{
2392 2392
2393 switch (c->event) { 2393 switch (c->event) {
@@ -2546,7 +2546,7 @@ static inline size_t xfrm_polexpire_msgsize(struct xfrm_policy *xp)
2546} 2546}
2547 2547
2548static int build_polexpire(struct sk_buff *skb, struct xfrm_policy *xp, 2548static int build_polexpire(struct sk_buff *skb, struct xfrm_policy *xp,
2549 int dir, struct km_event *c) 2549 int dir, const struct km_event *c)
2550{ 2550{
2551 struct xfrm_user_polexpire *upe; 2551 struct xfrm_user_polexpire *upe;
2552 struct nlmsghdr *nlh; 2552 struct nlmsghdr *nlh;
@@ -2576,7 +2576,7 @@ nlmsg_failure:
2576 return -EMSGSIZE; 2576 return -EMSGSIZE;
2577} 2577}
2578 2578
2579static int xfrm_exp_policy_notify(struct xfrm_policy *xp, int dir, struct km_event *c) 2579static int xfrm_exp_policy_notify(struct xfrm_policy *xp, int dir, const struct km_event *c)
2580{ 2580{
2581 struct net *net = xp_net(xp); 2581 struct net *net = xp_net(xp);
2582 struct sk_buff *skb; 2582 struct sk_buff *skb;
@@ -2591,7 +2591,7 @@ static int xfrm_exp_policy_notify(struct xfrm_policy *xp, int dir, struct km_eve
2591 return nlmsg_multicast(net->xfrm.nlsk, skb, 0, XFRMNLGRP_EXPIRE, GFP_ATOMIC); 2591 return nlmsg_multicast(net->xfrm.nlsk, skb, 0, XFRMNLGRP_EXPIRE, GFP_ATOMIC);
2592} 2592}
2593 2593
2594static int xfrm_notify_policy(struct xfrm_policy *xp, int dir, struct km_event *c) 2594static int xfrm_notify_policy(struct xfrm_policy *xp, int dir, const struct km_event *c)
2595{ 2595{
2596 struct net *net = xp_net(xp); 2596 struct net *net = xp_net(xp);
2597 struct xfrm_userpolicy_info *p; 2597 struct xfrm_userpolicy_info *p;
@@ -2656,7 +2656,7 @@ nlmsg_failure:
2656 return -1; 2656 return -1;
2657} 2657}
2658 2658
2659static int xfrm_notify_policy_flush(struct km_event *c) 2659static int xfrm_notify_policy_flush(const struct km_event *c)
2660{ 2660{
2661 struct net *net = c->net; 2661 struct net *net = c->net;
2662 struct nlmsghdr *nlh; 2662 struct nlmsghdr *nlh;
@@ -2681,7 +2681,7 @@ nlmsg_failure:
2681 return -1; 2681 return -1;
2682} 2682}
2683 2683
2684static int xfrm_send_policy_notify(struct xfrm_policy *xp, int dir, struct km_event *c) 2684static int xfrm_send_policy_notify(struct xfrm_policy *xp, int dir, const struct km_event *c)
2685{ 2685{
2686 2686
2687 switch (c->event) { 2687 switch (c->event) {