]> err.no Git - linux-2.6/commitdiff
[NET] AX25: Fix whitespace errors.
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Fri, 9 Feb 2007 14:24:31 +0000 (23:24 +0900)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 11 Feb 2007 07:19:18 +0000 (23:19 -0800)
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ax25/af_ax25.c
net/ax25/ax25_addr.c
net/ax25/ax25_ip.c
net/ax25/ax25_route.c
net/ax25/ax25_std_timer.c
net/ax25/ax25_subr.c
net/ax25/ax25_uid.c

index 42233df2b09939ea835016f0050e68a90c4eaf26..9a0b677d1e7fdafd94f8aecc61741b104be461f8 100644 (file)
@@ -263,9 +263,9 @@ static void ax25_destroy_timer(unsigned long data)
 {
        ax25_cb *ax25=(ax25_cb *)data;
        struct sock *sk;
-       
+
        sk=ax25->sk;
-       
+
        bh_lock_sock(sk);
        sock_hold(sk);
        ax25_destroy_socket(ax25);
@@ -369,57 +369,57 @@ static int ax25_ctl_ioctl(const unsigned int cmd, void __user *arg)
                ax25_disconnect(ax25, ENETRESET);
                break;
 
-       case AX25_WINDOW:
-               if (ax25->modulus == AX25_MODULUS) {
-                       if (ax25_ctl.arg < 1 || ax25_ctl.arg > 7)
-                               return -EINVAL;
-               } else {
-                       if (ax25_ctl.arg < 1 || ax25_ctl.arg > 63)
-                               return -EINVAL;
-               }
-               ax25->window = ax25_ctl.arg;
-               break;
-
-       case AX25_T1:
+       case AX25_WINDOW:
+               if (ax25->modulus == AX25_MODULUS) {
+                       if (ax25_ctl.arg < 1 || ax25_ctl.arg > 7)
+                               return -EINVAL;
+               } else {
+                       if (ax25_ctl.arg < 1 || ax25_ctl.arg > 63)
+                               return -EINVAL;
+               }
+               ax25->window = ax25_ctl.arg;
+               break;
+
+       case AX25_T1:
                if (ax25_ctl.arg < 1)
-                       return -EINVAL;
-               ax25->rtt = (ax25_ctl.arg * HZ) / 2;
-               ax25->t1  = ax25_ctl.arg * HZ;
-               break;
-
-       case AX25_T2:
-               if (ax25_ctl.arg < 1)
-                       return -EINVAL;
-               ax25->t2 = ax25_ctl.arg * HZ;
-               break;
-
-       case AX25_N2:
-               if (ax25_ctl.arg < 1 || ax25_ctl.arg > 31)
                        return -EINVAL;
-               ax25->n2count = 0;
-               ax25->n2 = ax25_ctl.arg;
-               break;
-
-       case AX25_T3:
-               if (ax25_ctl.arg < 0)
-                       return -EINVAL;
-               ax25->t3 = ax25_ctl.arg * HZ;
-               break;
-
-       case AX25_IDLE:
-               if (ax25_ctl.arg < 0)
-                       return -EINVAL;
-               ax25->idle = ax25_ctl.arg * 60 * HZ;
-               break;
-
-       case AX25_PACLEN:
-               if (ax25_ctl.arg < 16 || ax25_ctl.arg > 65535)
-                       return -EINVAL;
-               ax25->paclen = ax25_ctl.arg;
-               break;
-
-       default:
-               return -EINVAL;
+               ax25->rtt = (ax25_ctl.arg * HZ) / 2;
+               ax25->t1  = ax25_ctl.arg * HZ;
+               break;
+
+       case AX25_T2:
+               if (ax25_ctl.arg < 1)
+                       return -EINVAL;
+               ax25->t2 = ax25_ctl.arg * HZ;
+               break;
+
+       case AX25_N2:
+               if (ax25_ctl.arg < 1 || ax25_ctl.arg > 31)
+                       return -EINVAL;
+               ax25->n2count = 0;
+               ax25->n2 = ax25_ctl.arg;
+               break;
+
+       case AX25_T3:
+               if (ax25_ctl.arg < 0)
+                       return -EINVAL;
+               ax25->t3 = ax25_ctl.arg * HZ;
+               break;
+
+       case AX25_IDLE:
+               if (ax25_ctl.arg < 0)
+                       return -EINVAL;
+               ax25->idle = ax25_ctl.arg * 60 * HZ;
+               break;
+
+       case AX25_PACLEN:
+               if (ax25_ctl.arg < 16 || ax25_ctl.arg > 65535)
+                       return -EINVAL;
+               ax25->paclen = ax25_ctl.arg;
+               break;
+
+       default:
+               return -EINVAL;
          }
 
        return 0;
@@ -1209,7 +1209,7 @@ static int __must_check ax25_connect(struct socket *sock,
 
        if (sk->sk_type == SOCK_SEQPACKET &&
            (ax25t=ax25_find_cb(&ax25->source_addr, &fsa->fsa_ax25.sax25_call, digi,
-                        ax25->ax25_dev->dev))) {
+                        ax25->ax25_dev->dev))) {
                kfree(digi);
                err = -EADDRINUSE;              /* Already such a connection */
                ax25_cb_put(ax25t);
@@ -1456,7 +1456,7 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
                err = -EMSGSIZE;
                goto out;
        }
-               
+
        if (usax != NULL) {
                if (usax->sax25_family != AF_AX25) {
                        err = -EINVAL;
@@ -1470,8 +1470,8 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
                else if (addr_len != sizeof(struct full_sockaddr_ax25)) {
                        /* support for old structure may go away some time */
                        if ((addr_len < sizeof(struct sockaddr_ax25) + sizeof(ax25_address) * 6) ||
-                           (addr_len > sizeof(struct full_sockaddr_ax25))) {
-                               err = -EINVAL;
+                           (addr_len > sizeof(struct full_sockaddr_ax25))) {
+                               err = -EINVAL;
                                goto out;
                        }
 
@@ -1624,7 +1624,7 @@ static int ax25_recvmsg(struct kiocb *iocb, struct socket *sock,
 
        /* Now we can treat all alike */
        skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT,
-                               flags & MSG_DONTWAIT, &err);
+                               flags & MSG_DONTWAIT, &err);
        if (skb == NULL)
                goto out;
 
@@ -1869,7 +1869,7 @@ static void *ax25_info_next(struct seq_file *seq, void *v, loff_t *pos)
        return hlist_entry( ((struct ax25_cb *)v)->ax25_node.next,
                            struct ax25_cb, ax25_node);
 }
-       
+
 static void ax25_info_stop(struct seq_file *seq, void *v)
 {
        spin_unlock_bh(&ax25_list_lock);
index 97a49c79c6050df6caf43543caaff4d8bd07b3fc..419e7188d5a770da0f8e0b4aab4f226d01762955 100644 (file)
@@ -126,10 +126,10 @@ int ax25cmp(const ax25_address *a, const ax25_address *b)
                ct++;
        }
 
-       if ((a->ax25_call[ct] & 0x1E) == (b->ax25_call[ct] & 0x1E))     /* SSID without control bit */
-               return 0;
+       if ((a->ax25_call[ct] & 0x1E) == (b->ax25_call[ct] & 0x1E))     /* SSID without control bit */
+               return 0;
 
-       return 2;                       /* Partial match */
+       return 2;                       /* Partial match */
 }
 
 EXPORT_SYMBOL(ax25cmp);
index 136c3aefa9dec10983d1543c4cead6a876675019..8d62d86816150b9d814f1edc469f065c48a48b80 100644 (file)
@@ -55,46 +55,46 @@ int ax25_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short
        if (type == ETH_P_AX25)
                return 0;
 
-       /* header is an AX.25 UI frame from us to them */
-       buff = skb_push(skb, AX25_HEADER_LEN);
-       *buff++ = 0x00; /* KISS DATA */
+       /* header is an AX.25 UI frame from us to them */
+       buff = skb_push(skb, AX25_HEADER_LEN);
+       *buff++ = 0x00; /* KISS DATA */
 
        if (daddr != NULL)
                memcpy(buff, daddr, dev->addr_len);     /* Address specified */
 
-       buff[6] &= ~AX25_CBIT;
-       buff[6] &= ~AX25_EBIT;
-       buff[6] |= AX25_SSSID_SPARE;
-       buff    += AX25_ADDR_LEN;
-
-       if (saddr != NULL)
-               memcpy(buff, saddr, dev->addr_len);
-       else
-               memcpy(buff, dev->dev_addr, dev->addr_len);
-
-       buff[6] &= ~AX25_CBIT;
-       buff[6] |= AX25_EBIT;
-       buff[6] |= AX25_SSSID_SPARE;
-       buff    += AX25_ADDR_LEN;
-
-       *buff++  = AX25_UI;     /* UI */
-
-       /* Append a suitable AX.25 PID */
-       switch (type) {
-       case ETH_P_IP:
-               *buff++ = AX25_P_IP;
-               break;
-       case ETH_P_ARP:
-               *buff++ = AX25_P_ARP;
-               break;
-       default:
-               printk(KERN_ERR "AX.25: ax25_hard_header - wrong protocol type 0x%2.2x\n", type);
-               *buff++ = 0;
-               break;
-       }
+       buff[6] &= ~AX25_CBIT;
+       buff[6] &= ~AX25_EBIT;
+       buff[6] |= AX25_SSSID_SPARE;
+       buff    += AX25_ADDR_LEN;
+
+       if (saddr != NULL)
+               memcpy(buff, saddr, dev->addr_len);
+       else
+               memcpy(buff, dev->dev_addr, dev->addr_len);
+
+       buff[6] &= ~AX25_CBIT;
+       buff[6] |= AX25_EBIT;
+       buff[6] |= AX25_SSSID_SPARE;
+       buff    += AX25_ADDR_LEN;
+
+       *buff++  = AX25_UI;     /* UI */
+
+       /* Append a suitable AX.25 PID */
+       switch (type) {
+       case ETH_P_IP:
+               *buff++ = AX25_P_IP;
+               break;
+       case ETH_P_ARP:
+               *buff++ = AX25_P_ARP;
+               break;
+       default:
+               printk(KERN_ERR "AX.25: ax25_hard_header - wrong protocol type 0x%2.2x\n", type);
+               *buff++ = 0;
+               break;
+       }
 
        if (daddr != NULL)
-               return AX25_HEADER_LEN;
+               return AX25_HEADER_LEN;
 
        return -AX25_HEADER_LEN;        /* Unfinished header */
 }
@@ -114,8 +114,8 @@ int ax25_rebuild_header(struct sk_buff *skb)
        dst = (ax25_address *)(bp + 1);
        src = (ax25_address *)(bp + 8);
 
-       if (arp_find(bp + 1, skb))
-               return 1;
+       if (arp_find(bp + 1, skb))
+               return 1;
 
        route = ax25_get_route(dst, NULL);
        if (route) {
@@ -127,8 +127,8 @@ int ax25_rebuild_header(struct sk_buff *skb)
        if (dev == NULL)
                dev = skb->dev;
 
-        if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) {
-                goto put;
+       if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) {
+               goto put;
        }
 
        if (bp[16] == AX25_P_IP) {
@@ -175,8 +175,8 @@ int ax25_rebuild_header(struct sk_buff *skb)
                        ourskb->nh.raw = ourskb->data;
 
                        ax25=ax25_send_frame(
-                           ourskb, 
-                           ax25_dev->values[AX25_VALUES_PACLEN], 
+                           ourskb,
+                           ax25_dev->values[AX25_VALUES_PACLEN],
                            &src_c,
                            &dst_c, digipeat, dev);
                        if (ax25) {
@@ -186,13 +186,13 @@ int ax25_rebuild_header(struct sk_buff *skb)
                }
        }
 
-       bp[7]  &= ~AX25_CBIT;
-       bp[7]  &= ~AX25_EBIT;
-       bp[7]  |= AX25_SSSID_SPARE;
+       bp[7]  &= ~AX25_CBIT;
+       bp[7]  &= ~AX25_EBIT;
+       bp[7]  |= AX25_SSSID_SPARE;
 
-       bp[14] &= ~AX25_CBIT;
-       bp[14] |= AX25_EBIT;
-       bp[14] |= AX25_SSSID_SPARE;
+       bp[14] &= ~AX25_CBIT;
+       bp[14] |= AX25_EBIT;
+       bp[14] |= AX25_SSSID_SPARE;
 
        skb_pull(skb, AX25_KISS_HEADER_LEN);
 
@@ -211,7 +211,7 @@ put:
        if (route)
                ax25_put_route(route);
 
-       return 1;
+       return 1;
 }
 
 #else  /* INET */
index 0a0381622b1cb16ce7d630ae8c18d54938a8c3b2..7078861a738510b549d7d160c1c060886e0a32cf 100644 (file)
@@ -87,7 +87,7 @@ static int __must_check ax25_rt_add(struct ax25_routes_struct *route)
        ax25_rt = ax25_route_list;
        while (ax25_rt != NULL) {
                if (ax25cmp(&ax25_rt->callsign, &route->dest_addr) == 0 &&
-                           ax25_rt->dev == ax25_dev->dev) {
+                           ax25_rt->dev == ax25_dev->dev) {
                        kfree(ax25_rt->digipeat);
                        ax25_rt->digipeat = NULL;
                        if (route->digi_count != 0) {
@@ -252,8 +252,8 @@ static void *ax25_rt_seq_start(struct seq_file *seq, loff_t *pos)
 {
        struct ax25_route *ax25_rt;
        int i = 1;
-       read_lock(&ax25_route_lock);
+
+       read_lock(&ax25_route_lock);
        if (*pos == 0)
                return SEQ_START_TOKEN;
 
@@ -269,7 +269,7 @@ static void *ax25_rt_seq_start(struct seq_file *seq, loff_t *pos)
 static void *ax25_rt_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 {
        ++*pos;
-       return (v == SEQ_START_TOKEN) ? ax25_route_list : 
+       return (v == SEQ_START_TOKEN) ? ax25_route_list :
                ((struct ax25_route *) v)->next;
 }
 
index a29c480a4dc1f992f7f339c44f4b3d0ca9184526..e3528b1a7802b61b3f0caa5da791c84235f87fc2 100644 (file)
@@ -34,7 +34,7 @@
 void ax25_std_heartbeat_expiry(ax25_cb *ax25)
 {
        struct sock *sk=ax25->sk;
-       
+
        if (sk)
                bh_lock_sock(sk);
 
index c41dbe5fadee53867d98e24967ce96f942a32c18..85c58c49b4d0bd2873abfc76167102c0dfa4e7a6 100644 (file)
@@ -56,7 +56,7 @@ void ax25_frames_acked(ax25_cb *ax25, unsigned short nr)
         */
        if (ax25->va != nr) {
                while (skb_peek(&ax25->ack_queue) != NULL && ax25->va != nr) {
-                       skb = skb_dequeue(&ax25->ack_queue);
+                       skb = skb_dequeue(&ax25->ack_queue);
                        kfree_skb(skb);
                        ax25->va = (ax25->va + 1) % ax25->modulus;
                }
@@ -65,7 +65,7 @@ void ax25_frames_acked(ax25_cb *ax25, unsigned short nr)
 
 void ax25_requeue_frames(ax25_cb *ax25)
 {
-        struct sk_buff *skb, *skb_prev = NULL;
+       struct sk_buff *skb, *skb_prev = NULL;
 
        /*
         * Requeue all the un-ack-ed frames on the output queue to be picked
index 5e9a81e8b214fe4fa96a7977be12c1fbe9378a05..7f4c294b36f111a2bb866129a0d66dcf2397deed 100644 (file)
@@ -164,7 +164,7 @@ static void *ax25_uid_seq_next(struct seq_file *seq, void *v, loff_t *pos)
        ++*pos;
 
        return hlist_entry(((ax25_uid_assoc *)v)->uid_node.next,
-                          ax25_uid_assoc, uid_node);
+                          ax25_uid_assoc, uid_node);
 }
 
 static void ax25_uid_seq_stop(struct seq_file *seq, void *v)