sctp: fix checkpatch errors with open brace '{' and trailing statements
authorwangweidong <wangweidong1@huawei.com>
Mon, 23 Dec 2013 04:16:53 +0000 (12:16 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Dec 2013 18:47:48 +0000 (13:47 -0500)
fix checkpatch errors below:
ERROR: that open brace { should be on the previous line
ERROR: open brace '{' following function declarations go on the next line
ERROR: trailing statements should be on next line

Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/auth.c
net/sctp/input.c
net/sctp/protocol.c
net/sctp/socket.c
net/sctp/ulpqueue.c

index a594b3ca583473ba727b532db29cd5c451385268..683c7d1b13060adb328b683b3b3d608d9dde5834 100644 (file)
@@ -499,8 +499,7 @@ void sctp_auth_destroy_hmacs(struct crypto_hash *auth_hmacs[])
        if (!auth_hmacs)
                return;
 
-       for (i = 0; i < SCTP_AUTH_NUM_HMACS; i++)
-       {
+       for (i = 0; i < SCTP_AUTH_NUM_HMACS; i++) {
                if (auth_hmacs[i])
                        crypto_free_hash(auth_hmacs[i]);
        }
index b67e3d83b48afb2926bd2233232e9ec3c4d0241c..1f4eeb43fbd60e4bde0c9afb93110c9e62056ad3 100644 (file)
@@ -180,8 +180,7 @@ int sctp_rcv(struct sk_buff *skb)
         * If a frame arrives on an interface and the receiving socket is
         * bound to another interface, via SO_BINDTODEVICE, treat it as OOTB
         */
-       if (sk->sk_bound_dev_if && (sk->sk_bound_dev_if != af->skb_iif(skb)))
-       {
+       if (sk->sk_bound_dev_if && (sk->sk_bound_dev_if != af->skb_iif(skb))) {
                if (asoc) {
                        sctp_association_put(asoc);
                        asoc = NULL;
@@ -610,8 +609,7 @@ void sctp_v4_err(struct sk_buff *skb, __u32 info)
                if (ICMP_FRAG_NEEDED == code) {
                        sctp_icmp_frag_needed(sk, asoc, transport, info);
                        goto out_unlock;
-               }
-               else {
+               } else {
                        if (ICMP_PROT_UNREACH == code) {
                                sctp_icmp_proto_unreachable(sk, asoc,
                                                            transport);
index 19bd4c5bdae9c55658ed1a99758691a6948a13f6..34b7726bcd7ff472da4603fea6010bc39f467440 100644 (file)
@@ -1065,8 +1065,8 @@ static struct sctp_af sctp_af_inet = {
 #endif
 };
 
-struct sctp_pf *sctp_get_pf_specific(sa_family_t family) {
-
+struct sctp_pf *sctp_get_pf_specific(sa_family_t family)
+{
        switch (family) {
        case PF_INET:
                return sctp_pf_inet_specific;
index 9f42c605bfa87e2383459e026dbc9748b27ce8eb..2df55647d4ab09d2cf79141c9a44d05e1cf8945e 100644 (file)
@@ -5443,7 +5443,8 @@ static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len,
                return -EFAULT;
 num:
        len = sizeof(struct sctp_authchunks) + num_chunks;
-       if (put_user(len, optlen)) return -EFAULT;
+       if (put_user(len, optlen))
+               return -EFAULT;
        if (put_user(num_chunks, &p->gauth_number_of_chunks))
                return -EFAULT;
        return 0;
index c700369d11f758b4fc8c3d8da7cb4f209e0ae7d7..5dc94117e9d42d7e1eb24be6d8015c89feae7b6d 100644 (file)
@@ -336,7 +336,8 @@ static struct sctp_ulpevent *sctp_make_reassembled_event(struct net *net,
                pos = f_frag->next;
 
        /* Get the last skb in the f_frag's frag_list if present. */
-       for (last = list; list; last = list, list = list->next);
+       for (last = list; list; last = list, list = list->next)
+               ;
 
        /* Add the list of remaining fragments to the first fragments
         * frag_list.