diff options
Diffstat (limited to 'net/rose')
-rw-r--r-- | net/rose/af_rose.c | 12 | ||||
-rw-r--r-- | net/rose/rose_route.c | 36 | ||||
-rw-r--r-- | net/rose/sysctl_net_rose.c | 20 |
3 files changed, 34 insertions, 34 deletions
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 9e279464c9d..7a81a8ee854 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c @@ -1351,7 +1351,7 @@ static void *rose_info_start(struct seq_file *seq, loff_t *pos) spin_lock_bh(&rose_list_lock); if (*pos == 0) return SEQ_START_TOKEN; - + i = 1; sk_for_each(s, node, &rose_list) { if (i == *pos) @@ -1365,10 +1365,10 @@ static void *rose_info_next(struct seq_file *seq, void *v, loff_t *pos) { ++*pos; - return (v == SEQ_START_TOKEN) ? sk_head(&rose_list) + return (v == SEQ_START_TOKEN) ? sk_head(&rose_list) : sk_next((struct sock *)v); } - + static void rose_info_stop(struct seq_file *seq, void *v) { spin_unlock_bh(&rose_list_lock); @@ -1379,7 +1379,7 @@ static int rose_info_show(struct seq_file *seq, void *v) char buf[11]; if (v == SEQ_START_TOKEN) - seq_puts(seq, + seq_puts(seq, "dest_addr dest_call src_addr src_call dev lci neigh st vs vr va t t1 t2 t3 hb idle Snd-Q Rcv-Q inode\n"); else { @@ -1392,7 +1392,7 @@ static int rose_info_show(struct seq_file *seq, void *v) devname = "???"; else devname = dev->name; - + seq_printf(seq, "%-10s %-9s ", rose2asc(&rose->dest_addr), ax2asc(buf, &rose->dest_call)); @@ -1520,7 +1520,7 @@ static int __init rose_proto_init(void) char name[IFNAMSIZ]; sprintf(name, "rose%d", i); - dev = alloc_netdev(sizeof(struct net_device_stats), + dev = alloc_netdev(sizeof(struct net_device_stats), name, rose_setup); if (!dev) { printk(KERN_ERR "ROSE: rose_proto_init - unable to allocate memory\n"); diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index 8028c0d425d..0dcca4289ee 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c @@ -66,7 +66,7 @@ static int __must_check rose_add_node(struct rose_route_struct *rose_route, while (rose_node != NULL) { if ((rose_node->mask == rose_route->mask) && (rosecmpm(&rose_route->address, &rose_node->address, - rose_route->mask) == 0)) + rose_route->mask) == 0)) break; rose_node = rose_node->next; } @@ -300,7 +300,7 @@ static int rose_del_node(struct rose_route_struct *rose_route, while (rose_node != NULL) { if ((rose_node->mask == rose_route->mask) && (rosecmpm(&rose_route->address, &rose_node->address, - rose_route->mask) == 0)) + rose_route->mask) == 0)) break; rose_node = rose_node->next; } @@ -1070,7 +1070,7 @@ static void *rose_node_start(struct seq_file *seq, loff_t *pos) if (*pos == 0) return SEQ_START_TOKEN; - for (rose_node = rose_node_list; rose_node && i < *pos; + for (rose_node = rose_node_list; rose_node && i < *pos; rose_node = rose_node->next, ++i); return (i == *pos) ? rose_node : NULL; @@ -1079,8 +1079,8 @@ static void *rose_node_start(struct seq_file *seq, loff_t *pos) static void *rose_node_next(struct seq_file *seq, void *v, loff_t *pos) { ++*pos; - - return (v == SEQ_START_TOKEN) ? rose_node_list + + return (v == SEQ_START_TOKEN) ? rose_node_list : ((struct rose_node *)v)->next; } @@ -1146,7 +1146,7 @@ static void *rose_neigh_start(struct seq_file *seq, loff_t *pos) if (*pos == 0) return SEQ_START_TOKEN; - for (rose_neigh = rose_neigh_list; rose_neigh && i < *pos; + for (rose_neigh = rose_neigh_list; rose_neigh && i < *pos; rose_neigh = rose_neigh->next, ++i); return (i == *pos) ? rose_neigh : NULL; @@ -1155,8 +1155,8 @@ static void *rose_neigh_start(struct seq_file *seq, loff_t *pos) static void *rose_neigh_next(struct seq_file *seq, void *v, loff_t *pos) { ++*pos; - - return (v == SEQ_START_TOKEN) ? rose_neigh_list + + return (v == SEQ_START_TOKEN) ? rose_neigh_list : ((struct rose_neigh *)v)->next; } @@ -1171,7 +1171,7 @@ static int rose_neigh_show(struct seq_file *seq, void *v) int i; if (v == SEQ_START_TOKEN) - seq_puts(seq, + seq_puts(seq, "addr callsign dev count use mode restart t0 tf digipeaters\n"); else { struct rose_neigh *rose_neigh = v; @@ -1229,7 +1229,7 @@ static void *rose_route_start(struct seq_file *seq, loff_t *pos) if (*pos == 0) return SEQ_START_TOKEN; - for (rose_route = rose_route_list; rose_route && i < *pos; + for (rose_route = rose_route_list; rose_route && i < *pos; rose_route = rose_route->next, ++i); return (i == *pos) ? rose_route : NULL; @@ -1238,8 +1238,8 @@ static void *rose_route_start(struct seq_file *seq, loff_t *pos) static void *rose_route_next(struct seq_file *seq, void *v, loff_t *pos) { ++*pos; - - return (v == SEQ_START_TOKEN) ? rose_route_list + + return (v == SEQ_START_TOKEN) ? rose_route_list : ((struct rose_route *)v)->next; } @@ -1253,30 +1253,30 @@ static int rose_route_show(struct seq_file *seq, void *v) char buf[11]; if (v == SEQ_START_TOKEN) - seq_puts(seq, + seq_puts(seq, "lci address callsign neigh <-> lci address callsign neigh\n"); else { struct rose_route *rose_route = v; - if (rose_route->neigh1) + if (rose_route->neigh1) seq_printf(seq, "%3.3X %-10s %-9s %05d ", rose_route->lci1, rose2asc(&rose_route->src_addr), ax2asc(buf, &rose_route->src_call), rose_route->neigh1->number); - else - seq_puts(seq, + else + seq_puts(seq, "000 * * 00000 "); - if (rose_route->neigh2) + if (rose_route->neigh2) seq_printf(seq, "%3.3X %-10s %-9s %05d\n", rose_route->lci2, rose2asc(&rose_route->dest_addr), ax2asc(buf, &rose_route->dest_call), rose_route->neigh2->number); - else + else seq_puts(seq, "000 * * 00000\n"); } diff --git a/net/rose/sysctl_net_rose.c b/net/rose/sysctl_net_rose.c index 8548c7cf564..27a452bc5b8 100644 --- a/net/rose/sysctl_net_rose.c +++ b/net/rose/sysctl_net_rose.c @@ -25,7 +25,7 @@ static int min_window[] = {1}, max_window[] = {7}; static struct ctl_table_header *rose_table_header; static ctl_table rose_table[] = { - { + { .ctl_name = NET_ROSE_RESTART_REQUEST_TIMEOUT, .procname = "restart_request_timeout", .data = &sysctl_rose_restart_request_timeout, @@ -36,7 +36,7 @@ static ctl_table rose_table[] = { .extra1 = &min_timer, .extra2 = &max_timer }, - { + { .ctl_name = NET_ROSE_CALL_REQUEST_TIMEOUT, .procname = "call_request_timeout", .data = &sysctl_rose_call_request_timeout, @@ -47,7 +47,7 @@ static ctl_table rose_table[] = { .extra1 = &min_timer, .extra2 = &max_timer }, - { + { .ctl_name = NET_ROSE_RESET_REQUEST_TIMEOUT, .procname = "reset_request_timeout", .data = &sysctl_rose_reset_request_timeout, @@ -58,7 +58,7 @@ static ctl_table rose_table[] = { .extra1 = &min_timer, .extra2 = &max_timer }, - { + { .ctl_name = NET_ROSE_CLEAR_REQUEST_TIMEOUT, .procname = "clear_request_timeout", .data = &sysctl_rose_clear_request_timeout, @@ -69,7 +69,7 @@ static ctl_table rose_table[] = { .extra1 = &min_timer, .extra2 = &max_timer }, - { + { .ctl_name = NET_ROSE_NO_ACTIVITY_TIMEOUT, .procname = "no_activity_timeout", .data = &sysctl_rose_no_activity_timeout, @@ -80,7 +80,7 @@ static ctl_table rose_table[] = { .extra1 = &min_idle, .extra2 = &max_idle }, - { + { .ctl_name = NET_ROSE_ACK_HOLD_BACK_TIMEOUT, .procname = "acknowledge_hold_back_timeout", .data = &sysctl_rose_ack_hold_back_timeout, @@ -91,7 +91,7 @@ static ctl_table rose_table[] = { .extra1 = &min_timer, .extra2 = &max_timer }, - { + { .ctl_name = NET_ROSE_ROUTING_CONTROL, .procname = "routing_control", .data = &sysctl_rose_routing_control, @@ -102,7 +102,7 @@ static ctl_table rose_table[] = { .extra1 = &min_route, .extra2 = &max_route }, - { + { .ctl_name = NET_ROSE_LINK_FAIL_TIMEOUT, .procname = "link_fail_timeout", .data = &sysctl_rose_link_fail_timeout, @@ -113,7 +113,7 @@ static ctl_table rose_table[] = { .extra1 = &min_ftimer, .extra2 = &max_ftimer }, - { + { .ctl_name = NET_ROSE_MAX_VCS, .procname = "maximum_virtual_circuits", .data = &sysctl_rose_maximum_vcs, @@ -124,7 +124,7 @@ static ctl_table rose_table[] = { .extra1 = &min_maxvcs, .extra2 = &max_maxvcs }, - { + { .ctl_name = NET_ROSE_WINDOW_SIZE, .procname = "window_size", .data = &sysctl_rose_window_size, |