diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2015-06-16 04:47:06 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2019-04-02 23:43:53 +0200 |
commit | eaa2f3ac1e9eb710304baa22894965944119ee7a (patch) | |
tree | 23f5560289b590658f682045b7f65f0bd8ffe3d5 | |
parent | c04c5d30cc10b60bfc778ad9b3c348e5c7463aee (diff) |
NET: ROSE: Sanely format comments in particular no tabs following blanks.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | net/rose/af_rose.c | 80 | ||||
-rw-r--r-- | net/rose/rose_link.c | 14 | ||||
-rw-r--r-- | net/rose/rose_out.c | 4 | ||||
-rw-r--r-- | net/rose/rose_route.c | 72 | ||||
-rw-r--r-- | net/rose/rose_subr.c | 8 |
5 files changed, 94 insertions, 84 deletions
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index b13cfb0df15c..576846eaee1d 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c @@ -91,7 +91,7 @@ static void rose_set_lockdep_key(struct net_device *dev) } /* - * Convert a ROSE address into text. + * Convert a ROSE address into text. */ char *rose2asc(char *buf, const rose_address *addr) { @@ -123,7 +123,7 @@ int rose_address_is_valid(const rose_address *addr) } /* - * Compare two ROSE addresses, 0 == equal. + * Compare two ROSE addresses, 0 == equal. */ int rosecmp(rose_address *addr1, rose_address *addr2) { @@ -137,7 +137,7 @@ int rosecmp(rose_address *addr1, rose_address *addr2) } /* - * Compare two ROSE addresses for only mask digits, 0 == equal. + * Compare two ROSE addresses for only mask digits, 0 == equal. */ int rosecmpm(rose_address *addr1, rose_address *addr2, unsigned short mask) { @@ -162,7 +162,7 @@ int rosecmpm(rose_address *addr1, rose_address *addr2, unsigned short mask) } /* - * Socket removal during an interrupt is now safe. + * Socket removal during an interrupt is now safe. */ static void rose_remove_socket(struct sock *sk) { @@ -172,8 +172,8 @@ static void rose_remove_socket(struct sock *sk) } /* - * Kill all bound sockets on a broken link layer connection to a - * particular neighbour. + * Kill all bound sockets on a broken link layer connection to a + * particular neighbour. */ void rose_kill_by_neigh(struct rose_neigh *neigh) { @@ -193,7 +193,7 @@ void rose_kill_by_neigh(struct rose_neigh *neigh) } /* - * Kill all bound sockets on a dropped device. + * Kill all bound sockets on a dropped device. */ static void rose_kill_by_device(struct net_device *dev) { @@ -214,7 +214,7 @@ static void rose_kill_by_device(struct net_device *dev) } /* - * Handle device status changes. + * Handle device status changes. */ static int rose_device_event(struct notifier_block *this, unsigned long event, void *ptr) @@ -241,7 +241,7 @@ static int rose_device_event(struct notifier_block *this, } /* - * Add a socket to the bound sockets list. + * Add a socket to the bound sockets list. */ static void rose_insert_socket(struct sock *sk) { @@ -252,8 +252,7 @@ static void rose_insert_socket(struct sock *sk) } /* - * Find a socket that wants to accept the Call Request we just - * received. + * Find a socket that wants to accept the Call Request we just received. */ static struct sock *rose_find_listener(rose_address *addr, ax25_address *call) { @@ -284,7 +283,7 @@ found: } /* - * Find a connected ROSE socket given my LCI and device. + * Find a connected ROSE socket given my LCI and device. */ struct sock *rose_find_socket(unsigned int lci, struct rose_neigh *neigh) { @@ -304,7 +303,7 @@ found: } /* - * Find a unique LCI for a given device. + * Find a unique LCI for a given device. */ unsigned int rose_new_lci(struct rose_neigh *neigh) { @@ -324,11 +323,11 @@ unsigned int rose_new_lci(struct rose_neigh *neigh) } /* - * Deferred destroy. + * Deferred destroy. */ /* - * Handler for deferred kills. + * Handler for deferred kills. */ static void rose_destroy_timer(struct timer_list *t) { @@ -338,10 +337,10 @@ static void rose_destroy_timer(struct timer_list *t) } /* - * This is called from user mode and the timers. Thus it protects itself - * against interrupt users but doesn't worry about being called during - * work. Once it is removed from the queue no interrupt or bottom half - * will touch it and we are (fairly 8-) ) safe. + * This is called from user mode and the timers. Thus it protects itself + * against interrupt users but doesn't worry about being called during + * work. Once it is removed from the queue no interrupt or bottom half + * will touch it and we are (fairly 8-) ) safe. */ void rose_destroy_socket(struct sock *sk) { @@ -356,7 +355,9 @@ void rose_destroy_socket(struct sock *sk) while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) { if (skb->sk != sk) { /* A pending connection */ - /* Queue the unaccepted socket for death */ + /* + * Queue the unaccepted socket for death + */ sock_set_flag(skb->sk, SOCK_DEAD); rose_start_heartbeat(skb->sk); rose_sk(skb->sk)->state = ROSE_STATE_0; @@ -375,8 +376,8 @@ void rose_destroy_socket(struct sock *sk) } /* - * Handling for system calls applied via the various interfaces to a - * ROSE socket object. + * Handling for system calls applied via the various interfaces to a + * ROSE socket object. */ static int rose_setsockopt(struct socket *sock, int level, int optname, @@ -751,14 +752,18 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le if ((unsigned int) addr->srose_ndigis > ROSE_MAX_DIGIS) return -EINVAL; - /* Source + Destination digis should not exceed ROSE_MAX_DIGIS */ + /* + * Source + Destination digis should not exceed ROSE_MAX_DIGIS + */ if ((rose->source_ndigis + addr->srose_ndigis) > ROSE_MAX_DIGIS) return -EINVAL; lock_sock(sk); if (sk->sk_state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) { - /* Connect completed during a ERESTARTSYS event */ + /* + * Connect completed during a ERESTARTSYS event + */ sock->state = SS_CONNECTED; goto out_release; } @@ -770,7 +775,9 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le } if (sk->sk_state == TCP_ESTABLISHED) { - /* No reconnect on a seqpacket socket */ + /* + * No reconnect on a seqpacket socket + */ err = -EISCONN; goto out_release; } @@ -791,7 +798,10 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le goto out_release; } - if (sock_flag(sk, SOCK_ZAPPED)) { /* Must bind first - autobinding in this may or may not work */ + if (sock_flag(sk, SOCK_ZAPPED)) { + /* + * Must bind first - autobinding in this may or may not work + */ sock_reset_flag(sk, SOCK_ZAPPED); dev = rose_dev_first(); @@ -828,7 +838,9 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le rose->dest_digis[0] = addr->srose_digi; } - /* Move to connecting socket, start sending Connect Requests */ + /* + * Move to connecting socket, start sending Connect Requests + */ sock->state = SS_CONNECTING; sk->sk_state = TCP_SYN_SENT; @@ -912,8 +924,8 @@ static int rose_accept(struct socket *sock, struct socket *newsock, int flags, } /* - * The write queue this time is holding sockets ready to use - * hooked into the SABM we saved + * The write queue this time is holding sockets ready to use + * hooked into the SABM we saved */ for (;;) { prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); @@ -994,7 +1006,7 @@ int rose_rx_call_request(struct sk_buff *skb, struct net_device *dev, struct ros skb->sk = NULL; /* Initially we don't know who it's for */ /* - * skb->data points to the rose frame start + * skb->data points to the rose frame start */ memset(&facilities, 0x00, sizeof(struct rose_facilities_struct)); @@ -1138,7 +1150,7 @@ static int rose_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) skb_reserve(skb, AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN); /* - * Put the data on the end + * Put the data on the end */ skb_reset_transport_header(skb); @@ -1151,8 +1163,8 @@ static int rose_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) } /* - * If the Q BIT Include socket option is in force, the first - * byte of the user data is the logical value of the Q Bit. + * If the Q BIT Include socket option is in force, the first + * byte of the user data is the logical value of the Q Bit. */ if (rose->qbitincl) { qbit = skb->data[0]; @@ -1160,7 +1172,7 @@ static int rose_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) } /* - * Push down the ROSE header + * Push down the ROSE header */ asmptr = skb_push(skb, ROSE_MIN_LEN); diff --git a/net/rose/rose_link.c b/net/rose/rose_link.c index aa5861230785..f3b65122b1ee 100644 --- a/net/rose/rose_link.c +++ b/net/rose/rose_link.c @@ -91,9 +91,8 @@ static void rose_t0timer_expiry(struct timer_list *t) } /* - * Interface to ax25_send_frame. Changes my level 2 callsign depending - * on whether we have a global ROSE callsign or use the default port - * callsign. + * Interface to ax25_send_frame. Changes my level 2 callsign depending on + * whether we have a global ROSE callsign or use the default port callsign. */ static int rose_send_frame(struct sk_buff *skb, struct rose_neigh *neigh) { @@ -114,9 +113,8 @@ static int rose_send_frame(struct sk_buff *skb, struct rose_neigh *neigh) } /* - * Interface to ax25_link_up. Changes my level 2 callsign depending - * on whether we have a global ROSE callsign or use the default port - * callsign. + * Interface to ax25_link_up. Changes my level 2 callsign depending on whether + * we have a global ROSE callsign or use the default port callsign. */ static int rose_link_up(struct rose_neigh *neigh) { @@ -137,7 +135,7 @@ static int rose_link_up(struct rose_neigh *neigh) } /* - * This handles all restart and diagnostic frames. + * This handles all restart and diagnostic frames. */ void rose_link_rx_restart(struct sk_buff *skb, struct rose_neigh *neigh, unsigned short frametype) { @@ -174,7 +172,7 @@ void rose_link_rx_restart(struct sk_buff *skb, struct rose_neigh *neigh, unsigne } /* - * This routine is called when a Restart Request is needed + * This routine is called when a Restart Request is needed */ static void rose_transmit_restart_request(struct rose_neigh *neigh) { diff --git a/net/rose/rose_out.c b/net/rose/rose_out.c index 9ed098417989..06211c9d087c 100644 --- a/net/rose/rose_out.c +++ b/net/rose/rose_out.c @@ -27,8 +27,8 @@ #include <net/rose.h> /* - * This procedure is passed a buffer descriptor for an iframe. It builds - * the rest of the control part of the frame and then writes it out. + * This procedure is passed a buffer descriptor for an iframe. It builds + * the rest of the control part of the frame and then writes it out. */ static void rose_send_iframe(struct sock *sk, struct sk_buff *skb) { diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index f8a0373b221d..edad1a14205a 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c @@ -49,8 +49,8 @@ static DEFINE_SPINLOCK(rose_route_list_lock); struct rose_neigh *rose_loopback_neigh; /* - * Add a new route to a node, and in the process add the node and the - * neighbour if it is new. + * Add a new route to a node, and in the process add the node and the + * neighbour if it is new. */ static int __must_check rose_add_node(struct rose_route_struct *rose_route, struct net_device *dev) @@ -293,8 +293,8 @@ static void rose_remove_route(struct rose_route *rose_route) } /* - * "Delete" a node. Strictly speaking remove a route to a node. The node - * is only deleted if no routes are left to it. + * "Delete" a node. Strictly speaking remove a route to a node. The node + * is only deleted if no routes are left to it. */ static int rose_del_node(struct rose_route_struct *rose_route, struct net_device *dev) @@ -371,7 +371,7 @@ out: } /* - * Add the loopback neighbour. + * Add the loopback neighbour. */ void rose_add_loopback_neigh(void) { @@ -405,7 +405,7 @@ void rose_add_loopback_neigh(void) } /* - * Add a loopback node. + * Add a loopback node. */ int rose_add_loopback_node(rose_address *address) { @@ -451,7 +451,7 @@ out: } /* - * Delete a loopback node. + * Delete a loopback node. */ void rose_del_loopback_node(rose_address *address) { @@ -480,7 +480,7 @@ out: } /* - * A device has been removed. Remove its routes and neighbours. + * A device has been removed. Remove its routes and neighbours. */ void rose_rt_device_down(struct net_device *dev) { @@ -533,7 +533,7 @@ void rose_rt_device_down(struct net_device *dev) #if 0 /* Currently unused */ /* - * A device has been removed. Remove its links. + * A device has been removed. Remove its links. */ void rose_route_device_down(struct net_device *dev) { @@ -553,9 +553,9 @@ void rose_route_device_down(struct net_device *dev) #endif /* - * Clear all nodes and neighbours out, except for neighbours with - * active connections going through them. - * Do not clear loopback neighbour and nodes. + * Clear all nodes and neighbours out, except for neighbours with + * active connections going through them. + * Do not clear loopback neighbour and nodes. */ static int rose_clear_routes(void) { @@ -592,8 +592,8 @@ static int rose_clear_routes(void) } /* - * Check that the device given is a valid AX.25 interface that is "up". - * called with RTNL + * Check that the device given is a valid AX.25 interface that is "up". + * called with RTNL */ static struct net_device *rose_ax25_dev_find(char *devname) { @@ -610,7 +610,7 @@ static struct net_device *rose_ax25_dev_find(char *devname) } /* - * Find the first active ROSE device, usually "rose0". + * Find the first active ROSE device, usually "rose0". */ struct net_device *rose_dev_first(void) { @@ -628,7 +628,7 @@ struct net_device *rose_dev_first(void) } /* - * Find the ROSE device for the given address. + * Find the ROSE device for the given address. */ struct net_device *rose_dev_get(rose_address *addr) { @@ -678,7 +678,7 @@ struct rose_route *rose_route_free_lci(unsigned int lci, struct rose_neigh *neig } /* - * Find a neighbour or a route given a ROSE address. + * Find a neighbour or a route given a ROSE address. */ struct rose_neigh *rose_get_neigh(rose_address *addr, unsigned char *cause, unsigned char *diagnostic, int route_frame) @@ -730,7 +730,7 @@ out: } /* - * Handle the ioctls that control the routing functions. + * Handle the ioctls that control the routing functions. */ int rose_rt_ioctl(unsigned int cmd, void __user *arg) { @@ -816,9 +816,9 @@ static void rose_del_route_by_neigh(struct rose_neigh *rose_neigh) } /* - * A level 2 link has timed out, therefore it appears to be a poor link, - * then don't use that neighbour until it is reset. Blow away all through - * routes and connections using this route. + * A level 2 link has timed out, therefore it appears to be a poor link, + * then don't use that neighbour until it is reset. Blow away all through + * routes and connections using this route. */ void rose_link_failed(ax25_cb *ax25, int reason) { @@ -843,8 +843,8 @@ void rose_link_failed(ax25_cb *ax25, int reason) } /* - * A device has been "downed" remove its link status. Blow away all - * through routes and connections that use this device. + * A device has been "downed" remove its link status. Blow away all + * through routes and connections that use this device. */ void rose_link_device_down(struct net_device *dev) { @@ -859,8 +859,8 @@ void rose_link_device_down(struct net_device *dev) } /* - * Route a frame to an appropriate AX.25 connection. - * A NULL ax25_cb indicates an internally generated frame. + * Route a frame to an appropriate AX.25 connection. + * A NULL ax25_cb indicates an internally generated frame. */ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25) { @@ -910,13 +910,13 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25) } /* - * Obviously the link is working, halt the ftimer. + * Obviously the link is working, halt the ftimer. */ rose_stop_ftimer(rose_neigh); /* - * LCI of zero is always for us, and its always a restart - * frame. + * LCI of zero is always for us, and its always a restart + * frame. */ if (lci == 0) { rose_link_rx_restart(skb, rose_neigh, frametype); @@ -924,7 +924,7 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25) } /* - * Find an existing socket. + * Find an existing socket. */ sk = rose_find_socket(lci, rose_neigh); if (sk != NULL) { @@ -954,7 +954,7 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25) } /* - * Is is a Call Request and is it for us ? + * Is is a Call Request and is it for us ? */ if (frametype == ROSE_CALL_REQUEST) { dev = rose_dev_get(dest_addr); @@ -971,7 +971,7 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25) } /* - * Route it to the next in line if we have an entry for it. + * Route it to the next in line if we have an entry for it. */ rose_route = rose_route_list; while (rose_route != NULL) { @@ -1021,9 +1021,9 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25) } /* - * We know that: - * 1. The frame isn't for us, - * 2. It isn't "owned" by any existing route. + * We know that: + * 1. The frame isn't for us, + * 2. It isn't "owned" by any existing route. */ if (frametype != ROSE_CALL_REQUEST) { /* XXX */ res = 0; @@ -1040,7 +1040,7 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25) } /* - * Check for routing loops. + * Check for routing loops. */ rose_route = rose_route_list; while (rose_route != NULL) { @@ -1315,7 +1315,7 @@ struct seq_operations rose_route_seqops = { #endif /* CONFIG_PROC_FS */ /* - * Release all memory associated with ROSE routing structures. + * Release all memory associated with ROSE routing structures. */ void __exit rose_rt_free(void) { diff --git a/net/rose/rose_subr.c b/net/rose/rose_subr.c index 153165aac203..83ac80ee00ab 100644 --- a/net/rose/rose_subr.c +++ b/net/rose/rose_subr.c @@ -30,7 +30,7 @@ static int rose_create_facilities(unsigned char *buffer, struct rose_sock *rose); /* - * This routine purges all of the queues of frames. + * This routine purges all of the queues of frames. */ void rose_clear_queues(struct sock *sk) { @@ -79,8 +79,8 @@ void rose_requeue_frames(struct sock *sk) } /* - * Validate that the value of nr is between va and vs. Return true or - * false for testing. + * Validate that the value of nr is between va and vs. Return true or + * false for testing. */ int rose_validate_nr(struct sock *sk, unsigned short nr) { @@ -129,7 +129,7 @@ void rose_write_internal(struct sock *sk, int frametype) return; /* - * Space for AX.25 header and PID. + * Space for AX.25 header and PID. */ skb_reserve(skb, AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + 1); |