aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorAllan Stephens <Allan.Stephens@windriver.com>2010-12-31 13:59:32 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-01 16:57:56 -0500
commit0e65967e33be61e5f67727edd4ea829b47676fc0 (patch)
tree1135d631e0cb88af3f8b060b8c32a130315542d8 /net/tipc/socket.c
parent25860c3bd5bd1db236d4fd5826d76127d677dc28 (diff)
tipc: cleanup various cosmetic whitespace issues
Cleans up TIPC's source code to eliminate deviations from generally accepted coding conventions relating to leading/trailing white space and white space around commas, braces, cases, and sizeof. These changes are purely cosmetic and do not alter the operation of TIPC in any way. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r--net/tipc/socket.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 1a2eb23c6223..e9fc5df79eb0 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -375,7 +375,7 @@ static int bind(struct socket *sock, struct sockaddr *uaddr, int uaddr_len)
375 * 375 *
376 * NOTE: This routine doesn't need to take the socket lock since it only 376 * NOTE: This routine doesn't need to take the socket lock since it only
377 * accesses socket information that is unchanging (or which changes in 377 * accesses socket information that is unchanging (or which changes in
378 * a completely predictable manner). 378 * a completely predictable manner).
379 */ 379 */
380 380
381static int get_name(struct socket *sock, struct sockaddr *uaddr, 381static int get_name(struct socket *sock, struct sockaddr *uaddr,
@@ -570,14 +570,12 @@ static int send_msg(struct kiocb *iocb, struct socket *sock,
570 dest->addr.name.domain, 570 dest->addr.name.domain,
571 m->msg_iovlen, 571 m->msg_iovlen,
572 m->msg_iov); 572 m->msg_iov);
573 } 573 } else if (dest->addrtype == TIPC_ADDR_ID) {
574 else if (dest->addrtype == TIPC_ADDR_ID) {
575 res = tipc_send2port(tport->ref, 574 res = tipc_send2port(tport->ref,
576 &dest->addr.id, 575 &dest->addr.id,
577 m->msg_iovlen, 576 m->msg_iovlen,
578 m->msg_iov); 577 m->msg_iov);
579 } 578 } else if (dest->addrtype == TIPC_ADDR_MCAST) {
580 else if (dest->addrtype == TIPC_ADDR_MCAST) {
581 if (needs_conn) { 579 if (needs_conn) {
582 res = -EOPNOTSUPP; 580 res = -EOPNOTSUPP;
583 break; 581 break;
@@ -812,8 +810,8 @@ static void set_orig_addr(struct msghdr *m, struct tipc_msg *msg)
812 addr->addrtype = TIPC_ADDR_ID; 810 addr->addrtype = TIPC_ADDR_ID;
813 addr->addr.id.ref = msg_origport(msg); 811 addr->addr.id.ref = msg_origport(msg);
814 addr->addr.id.node = msg_orignode(msg); 812 addr->addr.id.node = msg_orignode(msg);
815 addr->addr.name.domain = 0; /* could leave uninitialized */ 813 addr->addr.name.domain = 0; /* could leave uninitialized */
816 addr->scope = 0; /* could leave uninitialized */ 814 addr->scope = 0; /* could leave uninitialized */
817 m->msg_namelen = sizeof(struct sockaddr_tipc); 815 m->msg_namelen = sizeof(struct sockaddr_tipc);
818 } 816 }
819} 817}
@@ -1743,10 +1741,10 @@ static int getsockopt(struct socket *sock,
1743 value = jiffies_to_msecs(tipc_sk(sk)->conn_timeout); 1741 value = jiffies_to_msecs(tipc_sk(sk)->conn_timeout);
1744 /* no need to set "res", since already 0 at this point */ 1742 /* no need to set "res", since already 0 at this point */
1745 break; 1743 break;
1746 case TIPC_NODE_RECVQ_DEPTH: 1744 case TIPC_NODE_RECVQ_DEPTH:
1747 value = (u32)atomic_read(&tipc_queue_size); 1745 value = (u32)atomic_read(&tipc_queue_size);
1748 break; 1746 break;
1749 case TIPC_SOCK_RECVQ_DEPTH: 1747 case TIPC_SOCK_RECVQ_DEPTH:
1750 value = skb_queue_len(&sk->sk_receive_queue); 1748 value = skb_queue_len(&sk->sk_receive_queue);
1751 break; 1749 break;
1752 default: 1750 default:
@@ -1772,7 +1770,7 @@ static int getsockopt(struct socket *sock,
1772 */ 1770 */
1773 1771
1774static const struct proto_ops msg_ops = { 1772static const struct proto_ops msg_ops = {
1775 .owner = THIS_MODULE, 1773 .owner = THIS_MODULE,
1776 .family = AF_TIPC, 1774 .family = AF_TIPC,
1777 .release = release, 1775 .release = release,
1778 .bind = bind, 1776 .bind = bind,
@@ -1793,7 +1791,7 @@ static const struct proto_ops msg_ops = {
1793}; 1791};
1794 1792
1795static const struct proto_ops packet_ops = { 1793static const struct proto_ops packet_ops = {
1796 .owner = THIS_MODULE, 1794 .owner = THIS_MODULE,
1797 .family = AF_TIPC, 1795 .family = AF_TIPC,
1798 .release = release, 1796 .release = release,
1799 .bind = bind, 1797 .bind = bind,
@@ -1814,7 +1812,7 @@ static const struct proto_ops packet_ops = {
1814}; 1812};
1815 1813
1816static const struct proto_ops stream_ops = { 1814static const struct proto_ops stream_ops = {
1817 .owner = THIS_MODULE, 1815 .owner = THIS_MODULE,
1818 .family = AF_TIPC, 1816 .family = AF_TIPC,
1819 .release = release, 1817 .release = release,
1820 .bind = bind, 1818 .bind = bind,
@@ -1835,7 +1833,7 @@ static const struct proto_ops stream_ops = {
1835}; 1833};
1836 1834
1837static const struct net_proto_family tipc_family_ops = { 1835static const struct net_proto_family tipc_family_ops = {
1838 .owner = THIS_MODULE, 1836 .owner = THIS_MODULE,
1839 .family = AF_TIPC, 1837 .family = AF_TIPC,
1840 .create = tipc_create 1838 .create = tipc_create
1841}; 1839};