diff options
author | Weilong Chen <chenweilong@huawei.com> | 2013-12-23 20:43:46 -0500 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2014-01-02 01:48:48 -0500 |
commit | 9b7a787d0da7db3127f6e04f8f8159632da50a36 (patch) | |
tree | 427accc0c9da12031fc5ed286eca2e0a3d2dc9c9 /net/xfrm | |
parent | 852ad5e631967ae2203cb08c5b6b42c26011ed63 (diff) |
xfrm: checkpatch errors with space
This patch cleanup some space errors.
Signed-off-by: Weilong Chen <chenweilong@huawei.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 10 | ||||
-rw-r--r-- | net/xfrm/xfrm_proc.c | 2 | ||||
-rw-r--r-- | net/xfrm/xfrm_state.c | 10 | ||||
-rw-r--r-- | net/xfrm/xfrm_user.c | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index a7487f34e813..8a2b9d8e1d58 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -1286,7 +1286,7 @@ xfrm_tmpl_resolve_one(struct xfrm_policy *policy, const struct flowi *fl, | |||
1286 | xfrm_address_t *saddr = xfrm_flowi_saddr(fl, family); | 1286 | xfrm_address_t *saddr = xfrm_flowi_saddr(fl, family); |
1287 | xfrm_address_t tmp; | 1287 | xfrm_address_t tmp; |
1288 | 1288 | ||
1289 | for (nx=0, i = 0; i < policy->xfrm_nr; i++) { | 1289 | for (nx = 0, i = 0; i < policy->xfrm_nr; i++) { |
1290 | struct xfrm_state *x; | 1290 | struct xfrm_state *x; |
1291 | xfrm_address_t *remote = daddr; | 1291 | xfrm_address_t *remote = daddr; |
1292 | xfrm_address_t *local = saddr; | 1292 | xfrm_address_t *local = saddr; |
@@ -1326,7 +1326,7 @@ xfrm_tmpl_resolve_one(struct xfrm_policy *policy, const struct flowi *fl, | |||
1326 | return nx; | 1326 | return nx; |
1327 | 1327 | ||
1328 | fail: | 1328 | fail: |
1329 | for (nx--; nx>=0; nx--) | 1329 | for (nx--; nx >= 0; nx--) |
1330 | xfrm_state_put(xfrm[nx]); | 1330 | xfrm_state_put(xfrm[nx]); |
1331 | return error; | 1331 | return error; |
1332 | } | 1332 | } |
@@ -1363,7 +1363,7 @@ xfrm_tmpl_resolve(struct xfrm_policy **pols, int npols, const struct flowi *fl, | |||
1363 | return cnx; | 1363 | return cnx; |
1364 | 1364 | ||
1365 | fail: | 1365 | fail: |
1366 | for (cnx--; cnx>=0; cnx--) | 1366 | for (cnx--; cnx >= 0; cnx--) |
1367 | xfrm_state_put(tpp[cnx]); | 1367 | xfrm_state_put(tpp[cnx]); |
1368 | return error; | 1368 | return error; |
1369 | 1369 | ||
@@ -2332,7 +2332,7 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, | |||
2332 | if (skb->sp) { | 2332 | if (skb->sp) { |
2333 | int i; | 2333 | int i; |
2334 | 2334 | ||
2335 | for (i=skb->sp->len-1; i>=0; i--) { | 2335 | for (i = skb->sp->len-1; i >= 0; i--) { |
2336 | struct xfrm_state *x = skb->sp->xvec[i]; | 2336 | struct xfrm_state *x = skb->sp->xvec[i]; |
2337 | if (!xfrm_selector_match(&x->sel, &fl, family)) { | 2337 | if (!xfrm_selector_match(&x->sel, &fl, family)) { |
2338 | XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATEMISMATCH); | 2338 | XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATEMISMATCH); |
@@ -2987,7 +2987,7 @@ static void xfrm_audit_common_policyinfo(struct xfrm_policy *xp, | |||
2987 | audit_log_format(audit_buf, " sec_alg=%u sec_doi=%u sec_obj=%s", | 2987 | audit_log_format(audit_buf, " sec_alg=%u sec_doi=%u sec_obj=%s", |
2988 | ctx->ctx_alg, ctx->ctx_doi, ctx->ctx_str); | 2988 | ctx->ctx_alg, ctx->ctx_doi, ctx->ctx_str); |
2989 | 2989 | ||
2990 | switch(sel->family) { | 2990 | switch (sel->family) { |
2991 | case AF_INET: | 2991 | case AF_INET: |
2992 | audit_log_format(audit_buf, " src=%pI4", &sel->saddr.a4); | 2992 | audit_log_format(audit_buf, " src=%pI4", &sel->saddr.a4); |
2993 | if (sel->prefixlen_s != 32) | 2993 | if (sel->prefixlen_s != 32) |
diff --git a/net/xfrm/xfrm_proc.c b/net/xfrm/xfrm_proc.c index 80cd1e55b834..fc5abd0b456f 100644 --- a/net/xfrm/xfrm_proc.c +++ b/net/xfrm/xfrm_proc.c | |||
@@ -52,7 +52,7 @@ static int xfrm_statistics_seq_show(struct seq_file *seq, void *v) | |||
52 | { | 52 | { |
53 | struct net *net = seq->private; | 53 | struct net *net = seq->private; |
54 | int i; | 54 | int i; |
55 | for (i=0; xfrm_mib_list[i].name; i++) | 55 | for (i = 0; xfrm_mib_list[i].name; i++) |
56 | seq_printf(seq, "%-24s\t%lu\n", xfrm_mib_list[i].name, | 56 | seq_printf(seq, "%-24s\t%lu\n", xfrm_mib_list[i].name, |
57 | snmp_fold_field((void __percpu **) | 57 | snmp_fold_field((void __percpu **) |
58 | net->mib.xfrm_statistics, | 58 | net->mib.xfrm_statistics, |
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index a62c25ea3631..5fe79b42561d 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -448,7 +448,7 @@ static enum hrtimer_restart xfrm_timer_handler(struct hrtimer * me) | |||
448 | if (warn) | 448 | if (warn) |
449 | km_state_expired(x, 0, 0); | 449 | km_state_expired(x, 0, 0); |
450 | resched: | 450 | resched: |
451 | if (next != LONG_MAX){ | 451 | if (next != LONG_MAX) { |
452 | tasklet_hrtimer_start(&x->mtimer, ktime_set(next, 0), HRTIMER_MODE_REL); | 452 | tasklet_hrtimer_start(&x->mtimer, ktime_set(next, 0), HRTIMER_MODE_REL); |
453 | } | 453 | } |
454 | 454 | ||
@@ -1348,7 +1348,7 @@ int xfrm_state_check_expire(struct xfrm_state *x) | |||
1348 | if (x->curlft.bytes >= x->lft.hard_byte_limit || | 1348 | if (x->curlft.bytes >= x->lft.hard_byte_limit || |
1349 | x->curlft.packets >= x->lft.hard_packet_limit) { | 1349 | x->curlft.packets >= x->lft.hard_packet_limit) { |
1350 | x->km.state = XFRM_STATE_EXPIRED; | 1350 | x->km.state = XFRM_STATE_EXPIRED; |
1351 | tasklet_hrtimer_start(&x->mtimer, ktime_set(0,0), HRTIMER_MODE_REL); | 1351 | tasklet_hrtimer_start(&x->mtimer, ktime_set(0, 0), HRTIMER_MODE_REL); |
1352 | return -EINVAL; | 1352 | return -EINVAL; |
1353 | } | 1353 | } |
1354 | 1354 | ||
@@ -1542,7 +1542,7 @@ int xfrm_alloc_spi(struct xfrm_state *x, u32 low, u32 high) | |||
1542 | x->id.spi = minspi; | 1542 | x->id.spi = minspi; |
1543 | } else { | 1543 | } else { |
1544 | u32 spi = 0; | 1544 | u32 spi = 0; |
1545 | for (h=0; h<high-low+1; h++) { | 1545 | for (h = 0; h < high-low+1; h++) { |
1546 | spi = low + net_random()%(high-low+1); | 1546 | spi = low + net_random()%(high-low+1); |
1547 | x0 = xfrm_state_lookup(net, mark, &x->id.daddr, htonl(spi), x->id.proto, x->props.family); | 1547 | x0 = xfrm_state_lookup(net, mark, &x->id.daddr, htonl(spi), x->id.proto, x->props.family); |
1548 | if (x0 == NULL) { | 1548 | if (x0 == NULL) { |
@@ -2079,7 +2079,7 @@ static void xfrm_audit_helper_sainfo(struct xfrm_state *x, | |||
2079 | audit_log_format(audit_buf, " sec_alg=%u sec_doi=%u sec_obj=%s", | 2079 | audit_log_format(audit_buf, " sec_alg=%u sec_doi=%u sec_obj=%s", |
2080 | ctx->ctx_alg, ctx->ctx_doi, ctx->ctx_str); | 2080 | ctx->ctx_alg, ctx->ctx_doi, ctx->ctx_str); |
2081 | 2081 | ||
2082 | switch(x->props.family) { | 2082 | switch (x->props.family) { |
2083 | case AF_INET: | 2083 | case AF_INET: |
2084 | audit_log_format(audit_buf, " src=%pI4 dst=%pI4", | 2084 | audit_log_format(audit_buf, " src=%pI4 dst=%pI4", |
2085 | &x->props.saddr.a4, &x->id.daddr.a4); | 2085 | &x->props.saddr.a4, &x->id.daddr.a4); |
@@ -2109,7 +2109,7 @@ static void xfrm_audit_helper_pktinfo(struct sk_buff *skb, u16 family, | |||
2109 | iph6 = ipv6_hdr(skb); | 2109 | iph6 = ipv6_hdr(skb); |
2110 | audit_log_format(audit_buf, | 2110 | audit_log_format(audit_buf, |
2111 | " src=%pI6 dst=%pI6 flowlbl=0x%x%02x%02x", | 2111 | " src=%pI6 dst=%pI6 flowlbl=0x%x%02x%02x", |
2112 | &iph6->saddr,&iph6->daddr, | 2112 | &iph6->saddr, &iph6->daddr, |
2113 | iph6->flow_lbl[0] & 0x0f, | 2113 | iph6->flow_lbl[0] & 0x0f, |
2114 | iph6->flow_lbl[1], | 2114 | iph6->flow_lbl[1], |
2115 | iph6->flow_lbl[2]); | 2115 | iph6->flow_lbl[2]); |
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 97681a390402..e50be4275c6c 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -1731,11 +1731,11 @@ static int build_aevent(struct sk_buff *skb, struct xfrm_state *x, const struct | |||
1731 | return -EMSGSIZE; | 1731 | return -EMSGSIZE; |
1732 | 1732 | ||
1733 | id = nlmsg_data(nlh); | 1733 | id = nlmsg_data(nlh); |
1734 | memcpy(&id->sa_id.daddr, &x->id.daddr,sizeof(x->id.daddr)); | 1734 | memcpy(&id->sa_id.daddr, &x->id.daddr, sizeof(x->id.daddr)); |
1735 | id->sa_id.spi = x->id.spi; | 1735 | id->sa_id.spi = x->id.spi; |
1736 | id->sa_id.family = x->props.family; | 1736 | id->sa_id.family = x->props.family; |
1737 | id->sa_id.proto = x->id.proto; | 1737 | id->sa_id.proto = x->id.proto; |
1738 | memcpy(&id->saddr, &x->props.saddr,sizeof(x->props.saddr)); | 1738 | memcpy(&id->saddr, &x->props.saddr, sizeof(x->props.saddr)); |
1739 | id->reqid = x->props.reqid; | 1739 | id->reqid = x->props.reqid; |
1740 | id->flags = c->data.aevent; | 1740 | id->flags = c->data.aevent; |
1741 | 1741 | ||