aboutsummaryrefslogtreecommitdiffstats
path: root/net/netrom
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-02-09 09:25:09 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-11 02:20:00 -0500
commit5f8f59d6641a3726985593f3e52430daa90c7933 (patch)
tree6f00c19b414285b3d5d494a383ea0b8e806d51d9 /net/netrom
parent746fac4dcd82864c6ecd85d3f09cc173db9b1870 (diff)
[NET] NETROM: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netrom')
-rw-r--r--net/netrom/af_netrom.c38
-rw-r--r--net/netrom/nr_route.c18
-rw-r--r--net/netrom/nr_subr.c2
-rw-r--r--net/netrom/nr_timer.c2
-rw-r--r--net/netrom/sysctl_net_netrom.c26
5 files changed, 43 insertions, 43 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 43bbe2c9e49a..799b76806bc3 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -110,7 +110,7 @@ static int nr_device_event(struct notifier_block *this, unsigned long event, voi
110 110
111 nr_kill_by_device(dev); 111 nr_kill_by_device(dev);
112 nr_rt_device_down(dev); 112 nr_rt_device_down(dev);
113 113
114 return NOTIFY_DONE; 114 return NOTIFY_DONE;
115} 115}
116 116
@@ -137,7 +137,7 @@ static struct sock *nr_find_listener(ax25_address *addr)
137 sk_for_each(s, node, &nr_list) 137 sk_for_each(s, node, &nr_list)
138 if (!ax25cmp(&nr_sk(s)->source_addr, addr) && 138 if (!ax25cmp(&nr_sk(s)->source_addr, addr) &&
139 s->sk_state == TCP_LISTEN) { 139 s->sk_state == TCP_LISTEN) {
140 bh_lock_sock(s); 140 bh_lock_sock(s);
141 goto found; 141 goto found;
142 } 142 }
143 s = NULL; 143 s = NULL;
@@ -157,7 +157,7 @@ static struct sock *nr_find_socket(unsigned char index, unsigned char id)
157 spin_lock_bh(&nr_list_lock); 157 spin_lock_bh(&nr_list_lock);
158 sk_for_each(s, node, &nr_list) { 158 sk_for_each(s, node, &nr_list) {
159 struct nr_sock *nr = nr_sk(s); 159 struct nr_sock *nr = nr_sk(s);
160 160
161 if (nr->my_index == index && nr->my_id == id) { 161 if (nr->my_index == index && nr->my_id == id) {
162 bh_lock_sock(s); 162 bh_lock_sock(s);
163 goto found; 163 goto found;
@@ -181,10 +181,10 @@ static struct sock *nr_find_peer(unsigned char index, unsigned char id,
181 spin_lock_bh(&nr_list_lock); 181 spin_lock_bh(&nr_list_lock);
182 sk_for_each(s, node, &nr_list) { 182 sk_for_each(s, node, &nr_list) {
183 struct nr_sock *nr = nr_sk(s); 183 struct nr_sock *nr = nr_sk(s);
184 184
185 if (nr->your_index == index && nr->your_id == id && 185 if (nr->your_index == index && nr->your_id == id &&
186 !ax25cmp(&nr->dest_addr, dest)) { 186 !ax25cmp(&nr->dest_addr, dest)) {
187 bh_lock_sock(s); 187 bh_lock_sock(s);
188 goto found; 188 goto found;
189 } 189 }
190 } 190 }
@@ -341,17 +341,17 @@ static int nr_getsockopt(struct socket *sock, int level, int optname,
341 struct sock *sk = sock->sk; 341 struct sock *sk = sock->sk;
342 struct nr_sock *nr = nr_sk(sk); 342 struct nr_sock *nr = nr_sk(sk);
343 int val = 0; 343 int val = 0;
344 int len; 344 int len;
345 345
346 if (level != SOL_NETROM) 346 if (level != SOL_NETROM)
347 return -ENOPROTOOPT; 347 return -ENOPROTOOPT;
348 348
349 if (get_user(len, optlen)) 349 if (get_user(len, optlen))
350 return -EFAULT; 350 return -EFAULT;
351 351
352 if (len < 0) 352 if (len < 0)
353 return -EINVAL; 353 return -EINVAL;
354 354
355 switch (optname) { 355 switch (optname) {
356 case NETROM_T1: 356 case NETROM_T1:
357 val = nr->t1 / HZ; 357 val = nr->t1 / HZ;
@@ -537,7 +537,7 @@ static int nr_release(struct socket *sock)
537 break; 537 break;
538 } 538 }
539 539
540 sock->sk = NULL; 540 sock->sk = NULL;
541 release_sock(sk); 541 release_sock(sk);
542 sock_put(sk); 542 sock_put(sk);
543 543
@@ -644,7 +644,7 @@ static int nr_connect(struct socket *sock, struct sockaddr *uaddr,
644 return -EISCONN; /* No reconnect on a seqpacket socket */ 644 return -EISCONN; /* No reconnect on a seqpacket socket */
645 } 645 }
646 646
647 sk->sk_state = TCP_CLOSE; 647 sk->sk_state = TCP_CLOSE;
648 sock->state = SS_UNCONNECTED; 648 sock->state = SS_UNCONNECTED;
649 649
650 if (addr_len != sizeof(struct sockaddr_ax25) && addr_len != sizeof(struct full_sockaddr_ax25)) { 650 if (addr_len != sizeof(struct sockaddr_ax25) && addr_len != sizeof(struct full_sockaddr_ax25)) {
@@ -710,7 +710,7 @@ static int nr_connect(struct socket *sock, struct sockaddr *uaddr,
710 release_sock(sk); 710 release_sock(sk);
711 return -EINPROGRESS; 711 return -EINPROGRESS;
712 } 712 }
713 713
714 /* 714 /*
715 * A Connect Ack with Choke or timeout or failed routing will go to 715 * A Connect Ack with Choke or timeout or failed routing will go to
716 * closed. 716 * closed.
@@ -848,7 +848,7 @@ static int nr_getname(struct socket *sock, struct sockaddr *uaddr,
848int nr_rx_frame(struct sk_buff *skb, struct net_device *dev) 848int nr_rx_frame(struct sk_buff *skb, struct net_device *dev)
849{ 849{
850 struct sock *sk; 850 struct sock *sk;
851 struct sock *make; 851 struct sock *make;
852 struct nr_sock *nr_make; 852 struct nr_sock *nr_make;
853 ax25_address *src, *dest, *user; 853 ax25_address *src, *dest, *user;
854 unsigned short circuit_index, circuit_id; 854 unsigned short circuit_index, circuit_id;
@@ -1258,10 +1258,10 @@ static void *nr_info_next(struct seq_file *seq, void *v, loff_t *pos)
1258{ 1258{
1259 ++*pos; 1259 ++*pos;
1260 1260
1261 return (v == SEQ_START_TOKEN) ? sk_head(&nr_list) 1261 return (v == SEQ_START_TOKEN) ? sk_head(&nr_list)
1262 : sk_next((struct sock *)v); 1262 : sk_next((struct sock *)v);
1263} 1263}
1264 1264
1265static void nr_info_stop(struct seq_file *seq, void *v) 1265static void nr_info_stop(struct seq_file *seq, void *v)
1266{ 1266{
1267 spin_unlock_bh(&nr_list_lock); 1267 spin_unlock_bh(&nr_list_lock);
@@ -1291,7 +1291,7 @@ static int nr_info_show(struct seq_file *seq, void *v)
1291 1291
1292 seq_printf(seq, "%-9s ", ax2asc(buf, &nr->user_addr)); 1292 seq_printf(seq, "%-9s ", ax2asc(buf, &nr->user_addr));
1293 seq_printf(seq, "%-9s ", ax2asc(buf, &nr->dest_addr)); 1293 seq_printf(seq, "%-9s ", ax2asc(buf, &nr->dest_addr));
1294 seq_printf(seq, 1294 seq_printf(seq,
1295"%-9s %-3s %02X/%02X %02X/%02X %2d %3d %3d %3d %3lu/%03lu %2lu/%02lu %3lu/%03lu %3lu/%03lu %2d/%02d %3d %5d %5d %ld\n", 1295"%-9s %-3s %02X/%02X %02X/%02X %2d %3d %3d %3d %3lu/%03lu %2lu/%02lu %3lu/%03lu %3lu/%03lu %2d/%02d %3d %5d %5d %ld\n",
1296 ax2asc(buf, &nr->source_addr), 1296 ax2asc(buf, &nr->source_addr),
1297 devname, 1297 devname,
@@ -1329,12 +1329,12 @@ static struct seq_operations nr_info_seqops = {
1329 .stop = nr_info_stop, 1329 .stop = nr_info_stop,
1330 .show = nr_info_show, 1330 .show = nr_info_show,
1331}; 1331};
1332 1332
1333static int nr_info_open(struct inode *inode, struct file *file) 1333static int nr_info_open(struct inode *inode, struct file *file)
1334{ 1334{
1335 return seq_open(file, &nr_info_seqops); 1335 return seq_open(file, &nr_info_seqops);
1336} 1336}
1337 1337
1338static struct file_operations nr_info_fops = { 1338static struct file_operations nr_info_fops = {
1339 .owner = THIS_MODULE, 1339 .owner = THIS_MODULE,
1340 .open = nr_info_open, 1340 .open = nr_info_open,
@@ -1415,7 +1415,7 @@ static int __init nr_proto_init(void)
1415 printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device structure\n"); 1415 printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device structure\n");
1416 goto fail; 1416 goto fail;
1417 } 1417 }
1418 1418
1419 dev->base_addr = i; 1419 dev->base_addr = i;
1420 if (register_netdev(dev)) { 1420 if (register_netdev(dev)) {
1421 printk(KERN_ERR "NET/ROM: nr_proto_init - unable to register network device\n"); 1421 printk(KERN_ERR "NET/ROM: nr_proto_init - unable to register network device\n");
@@ -1430,7 +1430,7 @@ static int __init nr_proto_init(void)
1430 printk(KERN_ERR "NET/ROM: nr_proto_init - unable to register socket family\n"); 1430 printk(KERN_ERR "NET/ROM: nr_proto_init - unable to register socket family\n");
1431 goto fail; 1431 goto fail;
1432 } 1432 }
1433 1433
1434 register_netdevice_notifier(&nr_dev_notifier); 1434 register_netdevice_notifier(&nr_dev_notifier);
1435 1435
1436 ax25_register_pid(&nr_pid); 1436 ax25_register_pid(&nr_pid);
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index 8f88964099ef..e9909aeb43e9 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -781,8 +781,8 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25)
781 781
782 if (ax25 != NULL) { 782 if (ax25 != NULL) {
783 ret = nr_add_node(nr_src, "", &ax25->dest_addr, ax25->digipeat, 783 ret = nr_add_node(nr_src, "", &ax25->dest_addr, ax25->digipeat,
784 ax25->ax25_dev->dev, 0, 784 ax25->ax25_dev->dev, 0,
785 sysctl_netrom_obsolescence_count_initialiser); 785 sysctl_netrom_obsolescence_count_initialiser);
786 if (ret) 786 if (ret)
787 return ret; 787 return ret;
788 } 788 }
@@ -861,8 +861,8 @@ static void *nr_node_start(struct seq_file *seq, loff_t *pos)
861 struct nr_node *nr_node; 861 struct nr_node *nr_node;
862 struct hlist_node *node; 862 struct hlist_node *node;
863 int i = 1; 863 int i = 1;
864 864
865 spin_lock_bh(&nr_node_list_lock); 865 spin_lock_bh(&nr_node_list_lock);
866 if (*pos == 0) 866 if (*pos == 0)
867 return SEQ_START_TOKEN; 867 return SEQ_START_TOKEN;
868 868
@@ -879,8 +879,8 @@ static void *nr_node_next(struct seq_file *seq, void *v, loff_t *pos)
879{ 879{
880 struct hlist_node *node; 880 struct hlist_node *node;
881 ++*pos; 881 ++*pos;
882 882
883 node = (v == SEQ_START_TOKEN) 883 node = (v == SEQ_START_TOKEN)
884 ? nr_node_list.first 884 ? nr_node_list.first
885 : ((struct nr_node *)v)->node_node.next; 885 : ((struct nr_node *)v)->node_node.next;
886 886
@@ -963,8 +963,8 @@ static void *nr_neigh_next(struct seq_file *seq, void *v, loff_t *pos)
963{ 963{
964 struct hlist_node *node; 964 struct hlist_node *node;
965 ++*pos; 965 ++*pos;
966 966
967 node = (v == SEQ_START_TOKEN) 967 node = (v == SEQ_START_TOKEN)
968 ? nr_neigh_list.first 968 ? nr_neigh_list.first
969 : ((struct nr_neigh *)v)->neigh_node.next; 969 : ((struct nr_neigh *)v)->neigh_node.next;
970 970
@@ -997,7 +997,7 @@ static int nr_neigh_show(struct seq_file *seq, void *v)
997 997
998 if (nr_neigh->digipeat != NULL) { 998 if (nr_neigh->digipeat != NULL) {
999 for (i = 0; i < nr_neigh->digipeat->ndigi; i++) 999 for (i = 0; i < nr_neigh->digipeat->ndigi; i++)
1000 seq_printf(seq, " %s", 1000 seq_printf(seq, " %s",
1001 ax2asc(buf, &nr_neigh->digipeat->calls[i])); 1001 ax2asc(buf, &nr_neigh->digipeat->calls[i]));
1002 } 1002 }
1003 1003
diff --git a/net/netrom/nr_subr.c b/net/netrom/nr_subr.c
index bcb9946b4f56..cfab5721a608 100644
--- a/net/netrom/nr_subr.c
+++ b/net/netrom/nr_subr.c
@@ -57,7 +57,7 @@ void nr_frames_acked(struct sock *sk, unsigned short nr)
57 */ 57 */
58 if (nrom->va != nr) { 58 if (nrom->va != nr) {
59 while (skb_peek(&nrom->ack_queue) != NULL && nrom->va != nr) { 59 while (skb_peek(&nrom->ack_queue) != NULL && nrom->va != nr) {
60 skb = skb_dequeue(&nrom->ack_queue); 60 skb = skb_dequeue(&nrom->ack_queue);
61 kfree_skb(skb); 61 kfree_skb(skb);
62 nrom->va = (nrom->va + 1) % NR_MODULUS; 62 nrom->va = (nrom->va + 1) % NR_MODULUS;
63 } 63 }
diff --git a/net/netrom/nr_timer.c b/net/netrom/nr_timer.c
index ddba1c144260..6cfaad952c6c 100644
--- a/net/netrom/nr_timer.c
+++ b/net/netrom/nr_timer.c
@@ -43,7 +43,7 @@ void nr_init_timers(struct sock *sk)
43 init_timer(&nr->t1timer); 43 init_timer(&nr->t1timer);
44 nr->t1timer.data = (unsigned long)sk; 44 nr->t1timer.data = (unsigned long)sk;
45 nr->t1timer.function = &nr_t1timer_expiry; 45 nr->t1timer.function = &nr_t1timer_expiry;
46 46
47 init_timer(&nr->t2timer); 47 init_timer(&nr->t2timer);
48 nr->t2timer.data = (unsigned long)sk; 48 nr->t2timer.data = (unsigned long)sk;
49 nr->t2timer.function = &nr_t2timer_expiry; 49 nr->t2timer.function = &nr_t2timer_expiry;
diff --git a/net/netrom/sysctl_net_netrom.c b/net/netrom/sysctl_net_netrom.c
index 6bb8dda849dc..e4b27d7aae79 100644
--- a/net/netrom/sysctl_net_netrom.c
+++ b/net/netrom/sysctl_net_netrom.c
@@ -35,7 +35,7 @@ static int min_reset[] = {0}, max_reset[] = {1};
35static struct ctl_table_header *nr_table_header; 35static struct ctl_table_header *nr_table_header;
36 36
37static ctl_table nr_table[] = { 37static ctl_table nr_table[] = {
38 { 38 {
39 .ctl_name = NET_NETROM_DEFAULT_PATH_QUALITY, 39 .ctl_name = NET_NETROM_DEFAULT_PATH_QUALITY,
40 .procname = "default_path_quality", 40 .procname = "default_path_quality",
41 .data = &sysctl_netrom_default_path_quality, 41 .data = &sysctl_netrom_default_path_quality,
@@ -46,18 +46,18 @@ static ctl_table nr_table[] = {
46 .extra1 = &min_quality, 46 .extra1 = &min_quality,
47 .extra2 = &max_quality 47 .extra2 = &max_quality
48 }, 48 },
49 { 49 {
50 .ctl_name = NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER, 50 .ctl_name = NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER,
51 .procname = "obsolescence_count_initialiser", 51 .procname = "obsolescence_count_initialiser",
52 .data = &sysctl_netrom_obsolescence_count_initialiser, 52 .data = &sysctl_netrom_obsolescence_count_initialiser,
53 .maxlen = sizeof(int), 53 .maxlen = sizeof(int),
54 .mode = 0644, 54 .mode = 0644,
55 .proc_handler = &proc_dointvec_minmax, 55 .proc_handler = &proc_dointvec_minmax,
56 .strategy = &sysctl_intvec, 56 .strategy = &sysctl_intvec,
57 .extra1 = &min_obs, 57 .extra1 = &min_obs,
58 .extra2 = &max_obs 58 .extra2 = &max_obs
59 }, 59 },
60 { 60 {
61 .ctl_name = NET_NETROM_NETWORK_TTL_INITIALISER, 61 .ctl_name = NET_NETROM_NETWORK_TTL_INITIALISER,
62 .procname = "network_ttl_initialiser", 62 .procname = "network_ttl_initialiser",
63 .data = &sysctl_netrom_network_ttl_initialiser, 63 .data = &sysctl_netrom_network_ttl_initialiser,
@@ -68,7 +68,7 @@ static ctl_table nr_table[] = {
68 .extra1 = &min_ttl, 68 .extra1 = &min_ttl,
69 .extra2 = &max_ttl 69 .extra2 = &max_ttl
70 }, 70 },
71 { 71 {
72 .ctl_name = NET_NETROM_TRANSPORT_TIMEOUT, 72 .ctl_name = NET_NETROM_TRANSPORT_TIMEOUT,
73 .procname = "transport_timeout", 73 .procname = "transport_timeout",
74 .data = &sysctl_netrom_transport_timeout, 74 .data = &sysctl_netrom_transport_timeout,
@@ -79,7 +79,7 @@ static ctl_table nr_table[] = {
79 .extra1 = &min_t1, 79 .extra1 = &min_t1,
80 .extra2 = &max_t1 80 .extra2 = &max_t1
81 }, 81 },
82 { 82 {
83 .ctl_name = NET_NETROM_TRANSPORT_MAXIMUM_TRIES, 83 .ctl_name = NET_NETROM_TRANSPORT_MAXIMUM_TRIES,
84 .procname = "transport_maximum_tries", 84 .procname = "transport_maximum_tries",
85 .data = &sysctl_netrom_transport_maximum_tries, 85 .data = &sysctl_netrom_transport_maximum_tries,
@@ -90,7 +90,7 @@ static ctl_table nr_table[] = {
90 .extra1 = &min_n2, 90 .extra1 = &min_n2,
91 .extra2 = &max_n2 91 .extra2 = &max_n2
92 }, 92 },
93 { 93 {
94 .ctl_name = NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY, 94 .ctl_name = NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY,
95 .procname = "transport_acknowledge_delay", 95 .procname = "transport_acknowledge_delay",
96 .data = &sysctl_netrom_transport_acknowledge_delay, 96 .data = &sysctl_netrom_transport_acknowledge_delay,
@@ -101,7 +101,7 @@ static ctl_table nr_table[] = {
101 .extra1 = &min_t2, 101 .extra1 = &min_t2,
102 .extra2 = &max_t2 102 .extra2 = &max_t2
103 }, 103 },
104 { 104 {
105 .ctl_name = NET_NETROM_TRANSPORT_BUSY_DELAY, 105 .ctl_name = NET_NETROM_TRANSPORT_BUSY_DELAY,
106 .procname = "transport_busy_delay", 106 .procname = "transport_busy_delay",
107 .data = &sysctl_netrom_transport_busy_delay, 107 .data = &sysctl_netrom_transport_busy_delay,
@@ -112,7 +112,7 @@ static ctl_table nr_table[] = {
112 .extra1 = &min_t4, 112 .extra1 = &min_t4,
113 .extra2 = &max_t4 113 .extra2 = &max_t4
114 }, 114 },
115 { 115 {
116 .ctl_name = NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE, 116 .ctl_name = NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE,
117 .procname = "transport_requested_window_size", 117 .procname = "transport_requested_window_size",
118 .data = &sysctl_netrom_transport_requested_window_size, 118 .data = &sysctl_netrom_transport_requested_window_size,
@@ -123,7 +123,7 @@ static ctl_table nr_table[] = {
123 .extra1 = &min_window, 123 .extra1 = &min_window,
124 .extra2 = &max_window 124 .extra2 = &max_window
125 }, 125 },
126 { 126 {
127 .ctl_name = NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT, 127 .ctl_name = NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT,
128 .procname = "transport_no_activity_timeout", 128 .procname = "transport_no_activity_timeout",
129 .data = &sysctl_netrom_transport_no_activity_timeout, 129 .data = &sysctl_netrom_transport_no_activity_timeout,
@@ -134,7 +134,7 @@ static ctl_table nr_table[] = {
134 .extra1 = &min_idle, 134 .extra1 = &min_idle,
135 .extra2 = &max_idle 135 .extra2 = &max_idle
136 }, 136 },
137 { 137 {
138 .ctl_name = NET_NETROM_ROUTING_CONTROL, 138 .ctl_name = NET_NETROM_ROUTING_CONTROL,
139 .procname = "routing_control", 139 .procname = "routing_control",
140 .data = &sysctl_netrom_routing_control, 140 .data = &sysctl_netrom_routing_control,
@@ -145,7 +145,7 @@ static ctl_table nr_table[] = {
145 .extra1 = &min_route, 145 .extra1 = &min_route,
146 .extra2 = &max_route 146 .extra2 = &max_route
147 }, 147 },
148 { 148 {
149 .ctl_name = NET_NETROM_LINK_FAILS_COUNT, 149 .ctl_name = NET_NETROM_LINK_FAILS_COUNT,
150 .procname = "link_fails_count", 150 .procname = "link_fails_count",
151 .data = &sysctl_netrom_link_fails_count, 151 .data = &sysctl_netrom_link_fails_count,
@@ -156,7 +156,7 @@ static ctl_table nr_table[] = {
156 .extra1 = &min_fails, 156 .extra1 = &min_fails,
157 .extra2 = &max_fails 157 .extra2 = &max_fails
158 }, 158 },
159 { 159 {
160 .ctl_name = NET_NETROM_RESET, 160 .ctl_name = NET_NETROM_RESET,
161 .procname = "reset", 161 .procname = "reset",
162 .data = &sysctl_netrom_reset_circuit, 162 .data = &sysctl_netrom_reset_circuit,