xfrm: checkpatch errors with space
authorWeilong Chen <chenweilong@huawei.com>
Tue, 24 Dec 2013 01:43:46 +0000 (09:43 +0800)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 2 Jan 2014 06:48:48 +0000 (07:48 +0100)
This patch cleanup some space errors.

Signed-off-by: Weilong Chen <chenweilong@huawei.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_proc.c
net/xfrm/xfrm_state.c
net/xfrm/xfrm_user.c

index a7487f34e813c5ad6a3d3e4550a487c2a340ee65..8a2b9d8e1d58aa761162eaedc74a71b798216040 100644 (file)
@@ -1286,7 +1286,7 @@ xfrm_tmpl_resolve_one(struct xfrm_policy *policy, const struct flowi *fl,
        xfrm_address_t *saddr = xfrm_flowi_saddr(fl, family);
        xfrm_address_t tmp;
 
-       for (nx=0, i = 0; i < policy->xfrm_nr; i++) {
+       for (nx = 0, i = 0; i < policy->xfrm_nr; i++) {
                struct xfrm_state *x;
                xfrm_address_t *remote = daddr;
                xfrm_address_t *local  = saddr;
@@ -1326,7 +1326,7 @@ xfrm_tmpl_resolve_one(struct xfrm_policy *policy, const struct flowi *fl,
        return nx;
 
 fail:
-       for (nx--; nx>=0; nx--)
+       for (nx--; nx >= 0; nx--)
                xfrm_state_put(xfrm[nx]);
        return error;
 }
@@ -1363,7 +1363,7 @@ xfrm_tmpl_resolve(struct xfrm_policy **pols, int npols, const struct flowi *fl,
        return cnx;
 
  fail:
-       for (cnx--; cnx>=0; cnx--)
+       for (cnx--; cnx >= 0; cnx--)
                xfrm_state_put(tpp[cnx]);
        return error;
 
@@ -2332,7 +2332,7 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb,
        if (skb->sp) {
                int i;
 
-               for (i=skb->sp->len-1; i>=0; i--) {
+               for (i = skb->sp->len-1; i >= 0; i--) {
                        struct xfrm_state *x = skb->sp->xvec[i];
                        if (!xfrm_selector_match(&x->sel, &fl, family)) {
                                XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATEMISMATCH);
@@ -2987,7 +2987,7 @@ static void xfrm_audit_common_policyinfo(struct xfrm_policy *xp,
                audit_log_format(audit_buf, " sec_alg=%u sec_doi=%u sec_obj=%s",
                                 ctx->ctx_alg, ctx->ctx_doi, ctx->ctx_str);
 
-       switch(sel->family) {
+       switch (sel->family) {
        case AF_INET:
                audit_log_format(audit_buf, " src=%pI4", &sel->saddr.a4);
                if (sel->prefixlen_s != 32)
index 80cd1e55b834260e484d0c7842fc8d827e0803ca..fc5abd0b456f3a3abf8163821f22577b8d700f6f 100644 (file)
@@ -52,7 +52,7 @@ static int xfrm_statistics_seq_show(struct seq_file *seq, void *v)
 {
        struct net *net = seq->private;
        int i;
-       for (i=0; xfrm_mib_list[i].name; i++)
+       for (i = 0; xfrm_mib_list[i].name; i++)
                seq_printf(seq, "%-24s\t%lu\n", xfrm_mib_list[i].name,
                           snmp_fold_field((void __percpu **)
                                           net->mib.xfrm_statistics,
index a62c25ea3631614963826df0b9184fb21b9cd0c0..5fe79b42561d83424f0f514a8d08296c6c9b6587 100644 (file)
@@ -448,7 +448,7 @@ static enum hrtimer_restart xfrm_timer_handler(struct hrtimer * me)
        if (warn)
                km_state_expired(x, 0, 0);
 resched:
-       if (next != LONG_MAX){
+       if (next != LONG_MAX) {
                tasklet_hrtimer_start(&x->mtimer, ktime_set(next, 0), HRTIMER_MODE_REL);
        }
 
@@ -1348,7 +1348,7 @@ int xfrm_state_check_expire(struct xfrm_state *x)
        if (x->curlft.bytes >= x->lft.hard_byte_limit ||
            x->curlft.packets >= x->lft.hard_packet_limit) {
                x->km.state = XFRM_STATE_EXPIRED;
-               tasklet_hrtimer_start(&x->mtimer, ktime_set(0,0), HRTIMER_MODE_REL);
+               tasklet_hrtimer_start(&x->mtimer, ktime_set(0, 0), HRTIMER_MODE_REL);
                return -EINVAL;
        }
 
@@ -1542,7 +1542,7 @@ int xfrm_alloc_spi(struct xfrm_state *x, u32 low, u32 high)
                x->id.spi = minspi;
        } else {
                u32 spi = 0;
-               for (h=0; h<high-low+1; h++) {
+               for (h = 0; h < high-low+1; h++) {
                        spi = low + net_random()%(high-low+1);
                        x0 = xfrm_state_lookup(net, mark, &x->id.daddr, htonl(spi), x->id.proto, x->props.family);
                        if (x0 == NULL) {
@@ -2079,7 +2079,7 @@ static void xfrm_audit_helper_sainfo(struct xfrm_state *x,
                audit_log_format(audit_buf, " sec_alg=%u sec_doi=%u sec_obj=%s",
                                 ctx->ctx_alg, ctx->ctx_doi, ctx->ctx_str);
 
-       switch(x->props.family) {
+       switch (x->props.family) {
        case AF_INET:
                audit_log_format(audit_buf, " src=%pI4 dst=%pI4",
                                 &x->props.saddr.a4, &x->id.daddr.a4);
@@ -2109,7 +2109,7 @@ static void xfrm_audit_helper_pktinfo(struct sk_buff *skb, u16 family,
                iph6 = ipv6_hdr(skb);
                audit_log_format(audit_buf,
                                 " src=%pI6 dst=%pI6 flowlbl=0x%x%02x%02x",
-                                &iph6->saddr,&iph6->daddr,
+                                &iph6->saddr, &iph6->daddr,
                                 iph6->flow_lbl[0] & 0x0f,
                                 iph6->flow_lbl[1],
                                 iph6->flow_lbl[2]);
index 97681a39040210556bfd70bb0a472a426490929b..e50be4275c6c1b90afd95bff1b1b0f5b89395701 100644 (file)
@@ -1731,11 +1731,11 @@ static int build_aevent(struct sk_buff *skb, struct xfrm_state *x, const struct
                return -EMSGSIZE;
 
        id = nlmsg_data(nlh);
-       memcpy(&id->sa_id.daddr, &x->id.daddr,sizeof(x->id.daddr));
+       memcpy(&id->sa_id.daddr, &x->id.daddr, sizeof(x->id.daddr));
        id->sa_id.spi = x->id.spi;
        id->sa_id.family = x->props.family;
        id->sa_id.proto = x->id.proto;
-       memcpy(&id->saddr, &x->props.saddr,sizeof(x->props.saddr));
+       memcpy(&id->saddr, &x->props.saddr, sizeof(x->props.saddr));
        id->reqid = x->props.reqid;
        id->flags = c->data.aevent;