aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-01-26 06:40:05 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-27 00:15:58 -0500
commite956ea1b7de1df5ae4d6dc3e7460ed9e140803cd (patch)
tree8f3efa93a7eb0864a6943dd075875db98bca8794 /net/atm
parent641d729eb6236db0ce33e2b07a7f93193e60ea5a (diff)
net/atm/clip.c: checkpatch cleanups
Convert #include <asm... to #include <linux... Spacing cleanups Move labels to column 1 Move logical continuation tests to end of previous line Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm')
-rw-r--r--net/atm/clip.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/net/atm/clip.c b/net/atm/clip.c
index d7939fd58cd3..ebfa022008f7 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -32,10 +32,10 @@
32#include <linux/jhash.h> 32#include <linux/jhash.h>
33#include <net/route.h> /* for struct rtable and routing */ 33#include <net/route.h> /* for struct rtable and routing */
34#include <net/icmp.h> /* icmp_send */ 34#include <net/icmp.h> /* icmp_send */
35#include <asm/param.h> /* for HZ */ 35#include <linux/param.h> /* for HZ */
36#include <linux/uaccess.h>
36#include <asm/byteorder.h> /* for htons etc. */ 37#include <asm/byteorder.h> /* for htons etc. */
37#include <asm/system.h> /* save/restore_flags */ 38#include <asm/system.h> /* save/restore_flags */
38#include <asm/uaccess.h>
39#include <asm/atomic.h> 39#include <asm/atomic.h>
40 40
41#include "common.h" 41#include "common.h"
@@ -56,10 +56,10 @@ static int to_atmarpd(enum atmarp_ctrl_type type, int itf, __be32 ip)
56 pr_debug("(%d)\n", type); 56 pr_debug("(%d)\n", type);
57 if (!atmarpd) 57 if (!atmarpd)
58 return -EUNATCH; 58 return -EUNATCH;
59 skb = alloc_skb(sizeof(struct atmarp_ctrl),GFP_ATOMIC); 59 skb = alloc_skb(sizeof(struct atmarp_ctrl), GFP_ATOMIC);
60 if (!skb) 60 if (!skb)
61 return -ENOMEM; 61 return -ENOMEM;
62 ctrl = (struct atmarp_ctrl *) skb_put(skb,sizeof(struct atmarp_ctrl)); 62 ctrl = (struct atmarp_ctrl *)skb_put(skb, sizeof(struct atmarp_ctrl));
63 ctrl->type = type; 63 ctrl->type = type;
64 ctrl->itf_num = itf; 64 ctrl->itf_num = itf;
65 ctrl->ip = ip; 65 ctrl->ip = ip;
@@ -111,7 +111,7 @@ static void unlink_clip_vcc(struct clip_vcc *clip_vcc)
111 goto out; 111 goto out;
112 } 112 }
113 pr_crit("ATMARP: failed (entry %p, vcc 0x%p)\n", entry, clip_vcc); 113 pr_crit("ATMARP: failed (entry %p, vcc 0x%p)\n", entry, clip_vcc);
114 out: 114out:
115 netif_tx_unlock_bh(entry->neigh->dev); 115 netif_tx_unlock_bh(entry->neigh->dev);
116} 116}
117 117
@@ -205,12 +205,12 @@ static void clip_push(struct atm_vcc *vcc, struct sk_buff *skb)
205 } 205 }
206 ATM_SKB(skb)->vcc = vcc; 206 ATM_SKB(skb)->vcc = vcc;
207 skb_reset_mac_header(skb); 207 skb_reset_mac_header(skb);
208 if (!clip_vcc->encap 208 if (!clip_vcc->encap ||
209 || skb->len < RFC1483LLC_LEN 209 skb->len < RFC1483LLC_LEN ||
210 || memcmp(skb->data, llc_oui, sizeof (llc_oui))) 210 memcmp(skb->data, llc_oui, sizeof(llc_oui)))
211 skb->protocol = htons(ETH_P_IP); 211 skb->protocol = htons(ETH_P_IP);
212 else { 212 else {
213 skb->protocol = ((__be16 *) skb->data)[3]; 213 skb->protocol = ((__be16 *)skb->data)[3];
214 skb_pull(skb, RFC1483LLC_LEN); 214 skb_pull(skb, RFC1483LLC_LEN);
215 if (skb->protocol == htons(ETH_P_ARP)) { 215 if (skb->protocol == htons(ETH_P_ARP)) {
216 skb->dev->stats.rx_packets++; 216 skb->dev->stats.rx_packets++;
@@ -644,7 +644,6 @@ static int clip_inet_event(struct notifier_block *this, unsigned long event,
644 return clip_device_event(this, NETDEV_CHANGE, in_dev->dev); 644 return clip_device_event(this, NETDEV_CHANGE, in_dev->dev);
645} 645}
646 646
647
648static struct notifier_block clip_dev_notifier = { 647static struct notifier_block clip_dev_notifier = {
649 .notifier_call = clip_device_event, 648 .notifier_call = clip_device_event,
650}; 649};
@@ -670,7 +669,6 @@ static void atmarpd_close(struct atm_vcc *vcc)
670 module_put(THIS_MODULE); 669 module_put(THIS_MODULE);
671} 670}
672 671
673
674static struct atmdev_ops atmarpd_dev_ops = { 672static struct atmdev_ops atmarpd_dev_ops = {
675 .close = atmarpd_close 673 .close = atmarpd_close
676}; 674};
@@ -692,11 +690,11 @@ static int atm_init_atmarp(struct atm_vcc *vcc)
692 return -EADDRINUSE; 690 return -EADDRINUSE;
693 } 691 }
694 692
695 mod_timer(&idle_timer, jiffies+CLIP_CHECK_INTERVAL*HZ); 693 mod_timer(&idle_timer, jiffies + CLIP_CHECK_INTERVAL * HZ);
696 694
697 atmarpd = vcc; 695 atmarpd = vcc;
698 set_bit(ATM_VF_META,&vcc->flags); 696 set_bit(ATM_VF_META, &vcc->flags);
699 set_bit(ATM_VF_READY,&vcc->flags); 697 set_bit(ATM_VF_READY, &vcc->flags);
700 /* allow replies and avoid getting closed if signaling dies */ 698 /* allow replies and avoid getting closed if signaling dies */
701 vcc->dev = &atmarpd_dev; 699 vcc->dev = &atmarpd_dev;
702 vcc_insert_socket(sk_atm(vcc)); 700 vcc_insert_socket(sk_atm(vcc));