]> Pileus Git - ~andy/linux/commitdiff
xfrm: checkpatch errors with foo * bar
authorWeilong Chen <chenweilong@huawei.com>
Tue, 24 Dec 2013 01:43:47 +0000 (09:43 +0800)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 2 Jan 2014 06:48:49 +0000 (07:48 +0100)
This patch clean up some checkpatch errors like this:
ERROR: "foo * bar" should be "foo *bar"
ERROR: "(foo*)" should be "(foo *)"

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

index 88843996f9359ec0ef90bc34dd3806ce3e8cedbf..6c7ac016ce3a7e780bf4f6361c61189d0d9b9f9e 100644 (file)
@@ -67,7 +67,7 @@ int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 *seq)
        case IPPROTO_COMP:
                if (!pskb_may_pull(skb, sizeof(struct ip_comp_hdr)))
                        return -EINVAL;
-               *spi = htonl(ntohs(*(__be16*)(skb_transport_header(skb) + 2)));
+               *spi = htonl(ntohs(*(__be16 *)(skb_transport_header(skb) + 2)));
                *seq = 0;
                return 0;
        default:
@@ -77,8 +77,8 @@ int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 *seq)
        if (!pskb_may_pull(skb, hlen))
                return -EINVAL;
 
-       *spi = *(__be32*)(skb_transport_header(skb) + offset);
-       *seq = *(__be32*)(skb_transport_header(skb) + offset_seq);
+       *spi = *(__be32 *)(skb_transport_header(skb) + offset);
+       *seq = *(__be32 *)(skb_transport_header(skb) + offset_seq);
        return 0;
 }
 
index 8a2b9d8e1d58aa761162eaedc74a71b798216040..dc8bd1ba4b3e2f32428182100b5c8fffdbdb6257 100644 (file)
@@ -171,7 +171,7 @@ static inline unsigned long make_jiffies(long secs)
 
 static void xfrm_policy_timer(unsigned long data)
 {
-       struct xfrm_policy *xp = (struct xfrm_policy*)data;
+       struct xfrm_policy *xp = (struct xfrm_policy *)data;
        unsigned long now = get_seconds();
        long next = LONG_MAX;
        int warn = 0;
@@ -1758,7 +1758,7 @@ xfrm_resolve_and_create_bundle(struct xfrm_policy **pols, int num_pols,
        }
 
        xdst->num_pols = num_pols;
-       memcpy(xdst->pols, pols, sizeof(struct xfrm_policy*) * num_pols);
+       memcpy(xdst->pols, pols, sizeof(struct xfrm_policy *) * num_pols);
        xdst->policy_genid = atomic_read(&pols[0]->genid);
 
        return xdst;
@@ -2027,7 +2027,7 @@ make_dummy_bundle:
        }
        xdst->num_pols = num_pols;
        xdst->num_xfrms = num_xfrms;
-       memcpy(xdst->pols, pols, sizeof(struct xfrm_policy*) * num_pols);
+       memcpy(xdst->pols, pols, sizeof(struct xfrm_policy *) * num_pols);
 
        dst_hold(&xdst->u.dst);
        return &xdst->flo;
@@ -2136,7 +2136,7 @@ struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig,
 
                num_pols = xdst->num_pols;
                num_xfrms = xdst->num_xfrms;
-               memcpy(pols, xdst->pols, sizeof(struct xfrm_policy*) * num_pols);
+               memcpy(pols, xdst->pols, sizeof(struct xfrm_policy *) * num_pols);
                route = xdst->route;
        }
 
@@ -3064,8 +3064,8 @@ static bool xfrm_migrate_selector_match(const struct xfrm_selector *sel_cmp,
        return false;
 }
 
-static struct xfrm_policy * xfrm_migrate_policy_find(const struct xfrm_selector *sel,
-                                                    u8 dir, u8 type, struct net *net)
+static struct xfrm_policy *xfrm_migrate_policy_find(const struct xfrm_selector *sel,
+                                                   u8 dir, u8 type, struct net *net)
 {
        struct xfrm_policy *pol, *ret = NULL;
        struct hlist_head *chain;
index 5fe79b42561d83424f0f514a8d08296c6c9b6587..9e6a4d6a9d8f569edefc8291e93907c5f92d7bf1 100644 (file)
@@ -382,7 +382,7 @@ static inline unsigned long make_jiffies(long secs)
                return secs*HZ;
 }
 
-static enum hrtimer_restart xfrm_timer_handler(struct hrtimer * me)
+static enum hrtimer_restart xfrm_timer_handler(struct hrtimer *me)
 {
        struct tasklet_hrtimer *thr = container_of(me, struct tasklet_hrtimer, timer);
        struct xfrm_state *x = container_of(thr, struct xfrm_state, mtimer);
@@ -1237,8 +1237,8 @@ struct xfrm_state *xfrm_migrate_state_find(struct xfrm_migrate *m, struct net *n
 }
 EXPORT_SYMBOL(xfrm_migrate_state_find);
 
-struct xfrm_state * xfrm_state_migrate(struct xfrm_state *x,
-                                      struct xfrm_migrate *m)
+struct xfrm_state *xfrm_state_migrate(struct xfrm_state *x,
+                                     struct xfrm_migrate *m)
 {
        struct xfrm_state *xc;
        int err;
@@ -1630,7 +1630,7 @@ EXPORT_SYMBOL(xfrm_state_walk_done);
 
 static void xfrm_replay_timer_handler(unsigned long data)
 {
-       struct xfrm_state *x = (struct xfrm_state*)data;
+       struct xfrm_state *x = (struct xfrm_state *)data;
 
        spin_lock(&x->lock);