diff options
author | David S. Miller <davem@davemloft.net> | 2011-02-24 00:28:01 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-24 02:07:41 -0500 |
commit | 183cad12785ffc036571c4b789dc084ec61a1bad (patch) | |
tree | 85cdd5f0952b9404c24dcfae77f2f2158e19c8ad /net/xfrm | |
parent | dd701754e7d230330adc0e212b94106bbfd34841 (diff) |
xfrm: Const'ify pointer args to km_migrate() and implementations.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_state.c | 6 | ||||
-rw-r--r-- | net/xfrm/xfrm_user.c | 24 |
2 files changed, 15 insertions, 15 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 7028f063f093..555beddb63f0 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -1819,9 +1819,9 @@ void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid) | |||
1819 | EXPORT_SYMBOL(km_policy_expired); | 1819 | EXPORT_SYMBOL(km_policy_expired); |
1820 | 1820 | ||
1821 | #ifdef CONFIG_XFRM_MIGRATE | 1821 | #ifdef CONFIG_XFRM_MIGRATE |
1822 | int km_migrate(struct xfrm_selector *sel, u8 dir, u8 type, | 1822 | int km_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, |
1823 | struct xfrm_migrate *m, int num_migrate, | 1823 | const struct xfrm_migrate *m, int num_migrate, |
1824 | struct xfrm_kmaddress *k) | 1824 | const struct xfrm_kmaddress *k) |
1825 | { | 1825 | { |
1826 | int err = -EINVAL; | 1826 | int err = -EINVAL; |
1827 | int ret; | 1827 | int ret; |
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 2cc9dab29887..b43c1b1240d4 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -1986,7 +1986,7 @@ static int xfrm_do_migrate(struct sk_buff *skb, struct nlmsghdr *nlh, | |||
1986 | #endif | 1986 | #endif |
1987 | 1987 | ||
1988 | #ifdef CONFIG_XFRM_MIGRATE | 1988 | #ifdef CONFIG_XFRM_MIGRATE |
1989 | static int copy_to_user_migrate(struct xfrm_migrate *m, struct sk_buff *skb) | 1989 | static int copy_to_user_migrate(const struct xfrm_migrate *m, struct sk_buff *skb) |
1990 | { | 1990 | { |
1991 | struct xfrm_user_migrate um; | 1991 | struct xfrm_user_migrate um; |
1992 | 1992 | ||
@@ -2004,7 +2004,7 @@ static int copy_to_user_migrate(struct xfrm_migrate *m, struct sk_buff *skb) | |||
2004 | return nla_put(skb, XFRMA_MIGRATE, sizeof(um), &um); | 2004 | return nla_put(skb, XFRMA_MIGRATE, sizeof(um), &um); |
2005 | } | 2005 | } |
2006 | 2006 | ||
2007 | static int copy_to_user_kmaddress(struct xfrm_kmaddress *k, struct sk_buff *skb) | 2007 | static int copy_to_user_kmaddress(const struct xfrm_kmaddress *k, struct sk_buff *skb) |
2008 | { | 2008 | { |
2009 | struct xfrm_user_kmaddress uk; | 2009 | struct xfrm_user_kmaddress uk; |
2010 | 2010 | ||
@@ -2025,11 +2025,11 @@ static inline size_t xfrm_migrate_msgsize(int num_migrate, int with_kma) | |||
2025 | + userpolicy_type_attrsize(); | 2025 | + userpolicy_type_attrsize(); |
2026 | } | 2026 | } |
2027 | 2027 | ||
2028 | static int build_migrate(struct sk_buff *skb, struct xfrm_migrate *m, | 2028 | static int build_migrate(struct sk_buff *skb, const struct xfrm_migrate *m, |
2029 | int num_migrate, struct xfrm_kmaddress *k, | 2029 | int num_migrate, const struct xfrm_kmaddress *k, |
2030 | struct xfrm_selector *sel, u8 dir, u8 type) | 2030 | const struct xfrm_selector *sel, u8 dir, u8 type) |
2031 | { | 2031 | { |
2032 | struct xfrm_migrate *mp; | 2032 | const struct xfrm_migrate *mp; |
2033 | struct xfrm_userpolicy_id *pol_id; | 2033 | struct xfrm_userpolicy_id *pol_id; |
2034 | struct nlmsghdr *nlh; | 2034 | struct nlmsghdr *nlh; |
2035 | int i; | 2035 | int i; |
@@ -2061,9 +2061,9 @@ nlmsg_failure: | |||
2061 | return -EMSGSIZE; | 2061 | return -EMSGSIZE; |
2062 | } | 2062 | } |
2063 | 2063 | ||
2064 | static int xfrm_send_migrate(struct xfrm_selector *sel, u8 dir, u8 type, | 2064 | static int xfrm_send_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, |
2065 | struct xfrm_migrate *m, int num_migrate, | 2065 | const struct xfrm_migrate *m, int num_migrate, |
2066 | struct xfrm_kmaddress *k) | 2066 | const struct xfrm_kmaddress *k) |
2067 | { | 2067 | { |
2068 | struct net *net = &init_net; | 2068 | struct net *net = &init_net; |
2069 | struct sk_buff *skb; | 2069 | struct sk_buff *skb; |
@@ -2079,9 +2079,9 @@ static int xfrm_send_migrate(struct xfrm_selector *sel, u8 dir, u8 type, | |||
2079 | return nlmsg_multicast(net->xfrm.nlsk, skb, 0, XFRMNLGRP_MIGRATE, GFP_ATOMIC); | 2079 | return nlmsg_multicast(net->xfrm.nlsk, skb, 0, XFRMNLGRP_MIGRATE, GFP_ATOMIC); |
2080 | } | 2080 | } |
2081 | #else | 2081 | #else |
2082 | static int xfrm_send_migrate(struct xfrm_selector *sel, u8 dir, u8 type, | 2082 | static int xfrm_send_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, |
2083 | struct xfrm_migrate *m, int num_migrate, | 2083 | const struct xfrm_migrate *m, int num_migrate, |
2084 | struct xfrm_kmaddress *k) | 2084 | const struct xfrm_kmaddress *k) |
2085 | { | 2085 | { |
2086 | return -ENOPROTOOPT; | 2086 | return -ENOPROTOOPT; |
2087 | } | 2087 | } |