[openib-general] [PATCH][SDP][11/33] Fix comment style in sdp_inet.c

Tom Duffy Tom.Duffy at Sun.COM
Thu Feb 17 14:10:22 PST 2005


Signed-off-by: Tom Duffy <tduffy at sun.com>

--- drivers/infiniband/ulp/sdp-orig/sdp_inet.c	2005-02-11 17:50:31.980000000 -0800
+++ drivers/infiniband/ulp/sdp/sdp_inet.c	2005-02-17 10:51:06.250001000 -0800
@@ -1,29 +1,41 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  <http://www.fsf.org/copyleft/gpl.html>, or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  <http://openib.org/license.html>.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_inet.c 994 2004-10-14 05:38:39Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
-#include "sdp_main.h"
 #include <linux/tcp.h>
 #include <asm/ioctls.h>
+#include "sdp_main.h"
+
 /*
  * list of connections waiting for an incomming connection
  */
@@ -79,13 +91,14 @@ module_param(debug_level, int, 0);
  *    unsigned short     max_ack_backlog; (accept max backlog)
  * };
  */
-/* --------------------------------------------------------------------- */
-/*                                                                       */
-/* Notification of significant events.                                   */
-/*                                                                       */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*..sdp_inet_wake_send -- test, set, and notify socket of write space */
+
+/*
+ * Notification of significant events
+ */
+
+/*
+ * sdp_inet_wake_send - test, set, and notify socket of write space
+ */
 void sdp_inet_wake_send(struct sock *sk)
 {
 	struct sdp_opt *conn;
@@ -118,8 +131,9 @@ void sdp_inet_wake_send(struct sock *sk)
 	return;
 } /* sdp_inet_wake_send */
 
-/* ========================================================================= */
-/*..sdp_inet_wake_generic -- wake up a socket */
+/*
+ * sdp_inet_wake_generic - wake up a socket
+ */
 void sdp_inet_wake_generic(struct sock *sk)
 {
 	if (NULL != sk) {
@@ -138,8 +152,9 @@ void sdp_inet_wake_generic(struct sock *
 	return;
 } /* sdp_inet_wake_generic */
 
-/* ========================================================================= */
-/*..sdp_inet_wake_recv -- wake up a socket for read */
+/*
+ * sdp_inet_wake_recv - wake up a socket for read
+ */
 void sdp_inet_wake_recv(struct sock *sk, int len)
 {
 	if (NULL != sk) {
@@ -157,8 +172,9 @@ void sdp_inet_wake_recv(struct sock *sk,
 	return;
 } /* sdp_inet_wake_recv */
 
-/* ========================================================================= */
-/*..sdp_inet_wake_error -- wake up a socket for error */
+/*
+ * sdp_inet_wake_error - wake up a socket for error
+ */
 void sdp_inet_wake_error(struct sock *sk)
 {
 	if (NULL != sk) {
@@ -176,8 +192,9 @@ void sdp_inet_wake_error(struct sock *sk
 	return;
 } /* sdp_inet_wake_error */
 
-/* ========================================================================= */
-/*..sdp_inet_wake_urg -- wake up a socket for urgent data */
+/*
+ * sdp_inet_wake_urg - wake up a socket for urgent data
+ */
 void sdp_inet_wake_urg(struct sock *sk)
 {
 	/*
@@ -191,14 +208,13 @@ void sdp_inet_wake_urg(struct sock *sk)
 	return;
 } /* sdp_inet_wake_urg */
 
-/* --------------------------------------------------------------------- */
-/*                                                                       */
-/* internal socket/handle managment functions                            */
-/*                                                                       */
-/* --------------------------------------------------------------------- */
+/*
+ * internal socket/handle managment functions
+ */
 
-/* ========================================================================= */
-/*.._sdp_inet_abort -- abort an existing connection. */
+/*
+ * _sdp_inet_abort - abort an existing connection
+ */
 static int _sdp_inet_abort(struct sdp_opt *conn)
 {
 	int result;
@@ -250,8 +266,9 @@ static int _sdp_inet_abort(struct sdp_op
 	return result;
 } /* _sdp_inet_abort */
 
-/* ========================================================================= */
-/*.._sdp_inet_disconnect -- disconnect a connection. */
+/*
+ * _sdp_inet_disconnect - disconnect a connection
+ */
 static int _sdp_inet_disconnect(struct sdp_opt *conn)
 {
 	int result = 0;
@@ -322,13 +339,13 @@ static int _sdp_inet_disconnect(struct s
 	return result;
 } /* _sdp_inet_disconnect */
 
-/* --------------------------------------------------------------------- */
-/*                                                                       */
-/* Linux SOCKET interface, module specific functions                     */
-/*                                                                       */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*.._sdp_inet_release -- release/close a socket */
+/*
+ * Linux SOCKET interface, module specific functions
+ */
+
+/*
+ * _sdp_inet_release - release/close a socket
+ */
 static int _sdp_inet_release(struct socket *sock)
 {
 	struct sdp_opt *conn;
@@ -488,11 +505,11 @@ done:
 	return 0;
 } /* _sdp_inet_release */
 
-/* ========================================================================= */
-/*.._sdp_inet_bind -- bind a socket to an address/interface */
-static int _sdp_inet_bind(struct socket *sock,
-			     struct sockaddr *uaddr,
-			     int size)
+/*
+ * _sdp_inet_bind - bind a socket to an address/interface
+ */
+static int _sdp_inet_bind(struct socket *sock, struct sockaddr *uaddr,
+			  int size)
 {
 	struct sockaddr_in *addr = (struct sockaddr_in *)uaddr;
 	struct sock *sk;
@@ -600,8 +617,9 @@ done:
 	return result;
 } /* _sdp_inet_bind */
 
-/* ========================================================================= */
-/*.._sdp_inet_connect -- connect a socket to a remote address */
+/*
+ * _sdp_inet_connect - connect a socket to a remote address
+ */
 static int _sdp_inet_connect(struct socket *sock,
 				struct sockaddr *uaddr,
 				int size,
@@ -791,8 +809,9 @@ done:
 	return result;
 } /* _sdp_inet_connect */
 
-/* ========================================================================= */
-/*.._sdp_inet_listen -- listen on a socket for incomming addresses. */
+/*
+ * _sdp_inet_listen - listen on a socket for incomming addresses
+ */
 static int _sdp_inet_listen(struct socket *sock, int backlog)
 {
 	struct sock *sk;
@@ -855,8 +874,9 @@ done:
 	return result;
 } /* _sdp_inet_listen */
 
-/* ========================================================================= */
-/*.._sdp_inet_accept -- accept a new socket from a listen socket. */
+/*
+ * _sdp_inet_accept - accept a new socket from a listen socket
+ */
 static int _sdp_inet_accept(struct socket *listen_sock,
 			       struct socket *accept_sock, 
 			       int flags)
@@ -1035,12 +1055,11 @@ listen_done:
 	return result;
 } /* _sdp_inet_accept */
 
-/* ========================================================================= */
-/*.._sdp_inet_getname -- return a sockets address information */
-static int _sdp_inet_getname(struct socket *sock,
-				struct sockaddr *uaddr,
-				int *size, 
-				int peer)
+/*
+ * _sdp_inet_getname - return a sockets address information
+ */
+static int _sdp_inet_getname(struct socket *sock, struct sockaddr *uaddr,
+			     int *size, int peer)
 {
 	struct sockaddr_in *addr = (struct sockaddr_in *)uaddr;
 	struct sock *sk;
@@ -1083,8 +1102,9 @@ static int _sdp_inet_getname(struct sock
 	return 0;
 } /* _sdp_inet_getname */
 
-/* ========================================================================= */
-/*.._sdp_inet_poll -- poll a socket for activity */
+/*
+ * _sdp_inet_poll - poll a socket for activity
+ */
 static unsigned int _sdp_inet_poll(struct file *file,
 				   struct socket *sock,
 				   poll_table *wait)
@@ -1184,11 +1204,11 @@ static unsigned int _sdp_inet_poll(struc
 	return mask;
 } /* _sdp_inet_poll */
 
-/* ========================================================================= */
-/*.._sdp_inet_ioctl -- serivce an ioctl request on a socket */
-static int _sdp_inet_ioctl(struct socket *sock,
-			      unsigned int cmd,
-			      unsigned long arg)
+/*
+ * _sdp_inet_ioctl - serivce an ioctl request on a socket
+ */
+static int _sdp_inet_ioctl(struct socket *sock, unsigned int cmd,
+			   unsigned long arg)
 {
 	struct sock *sk;
 	struct sdp_opt *conn;
@@ -1329,13 +1349,11 @@ static int _sdp_inet_ioctl(struct socket
 	return result;
 } /* _sdp_inet_ioctl */
 
-/* ========================================================================= */
-/*.._sdp_inet_setopt -- set a socket option. */
-static int _sdp_inet_setopt(struct socket *sock,
-			       int level, 
-			       int optname, 
-			       char __user *optval, 
-			       int optlen)
+/*
+ * _sdp_inet_setopt - set a socket option
+ */
+static int _sdp_inet_setopt(struct socket *sock, int level, int optname, 
+			    char __user *optval, int optlen)
 {
 	struct sock *sk;
 	struct sdp_opt *conn;
@@ -1417,13 +1435,11 @@ static int _sdp_inet_setopt(struct socke
 	return result;
 } /* _sdp_inet_setopt */
 
-/* ========================================================================= */
-/*.._sdp_inet_getopt -- get a socket option. */
-static int _sdp_inet_getopt(struct socket *sock,
-			       int level,
-			       int optname,
-			       char __user *optval,
-			       int __user *optlen)
+/*
+ * _sdp_inet_getopt - get a socket option
+ */
+static int _sdp_inet_getopt(struct socket *sock, int level, int optname,
+			    char __user *optval, int __user *optlen)
 {
 	struct sock *sk;
 	struct sdp_opt *conn;
@@ -1503,8 +1519,9 @@ static int _sdp_inet_getopt(struct socke
 	return 0;
 } /* _sdp_inet_getopt */
 
-/* ========================================================================= */
-/*.._sdp_inet_shutdown -- shutdown a socket. */
+/*
+ * _sdp_inet_shutdown - shutdown a socket
+ */
 static int _sdp_inet_shutdown(struct socket *sock, int flag)
 {
 	int result = 0;
@@ -1616,11 +1633,9 @@ static int _sdp_inet_shutdown(struct soc
 	return result;
 } /* _sdp_inet_shutdown */
 
-/* --------------------------------------------------------------------- */
-/*                                                                       */
-/* Primary socket initialization                                         */
-/*                                                                       */
-/* --------------------------------------------------------------------- */
+/*
+ * Primary socket initialization
+ */
 struct proto_ops _lnx_stream_ops = {
 	.family     =  AF_INET_SDP,
 	.release    = _sdp_inet_release,
@@ -1642,9 +1657,9 @@ struct proto_ops _lnx_stream_ops = {
 	.owner      =  THIS_MODULE,
 }; /* _lnx_stream_ops */
 
-
-/* ========================================================================= */
-/*.._sdp_inet_create -- create a socket */
+/*
+ * _sdp_inet_create - create a socket
+ */
 static int _sdp_inet_create(struct socket *sock, int protocol)
 {
 	struct sdp_opt *conn;
@@ -1689,24 +1704,22 @@ static int _sdp_inet_create(struct socke
 	return 0;
 } /* _sdp_inet_create */
 
-/* --------------------------------------------------------------------- */
-/*                                                                       */
-/* INET module initialization functions                                  */
-/*                                                                       */
-/* --------------------------------------------------------------------- */
+/*
+ * INET module initialization functions
+ */
 static struct net_proto_family _sdp_proto = {
 	.family =  AF_INET_SDP,
 	.create = _sdp_inet_create,
 	.owner  =  THIS_MODULE,
 }; /* _pf_family */
 
-/* --------------------------------------------------------------------- */
-/*                                                                       */
-/* SDP host module load/unload functions                                 */
-/*                                                                       */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*..sdp_init -- initialize the sdp host module */
+/*
+ * SDP host module load/unload functions
+ */
+
+/*
+ * sdp_init - initialize the sdp host module
+ */
 static int __init sdp_init(void)
 {
 	int result = 0;
@@ -1810,8 +1823,9 @@ error_proc:
 	return result;		/* success */
 } /* sdp_init */
 
-/* ========================================================================= */
-/*..sdp_exit -- cleanup the sdp host module */
+/*
+ * sdp_exit - cleanup the sdp host module
+ */
 static void __exit sdp_exit(void)
 {
 	sdp_dbg_init("INIT: SDP module unload.");




More information about the general mailing list