[openib-general] [PATCH][SDP][23/33] Fix comment style in sdp_proto.h

Tom Duffy Tom.Duffy at Sun.COM
Thu Feb 17 14:12:25 PST 2005


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

--- drivers/infiniband/ulp/sdp-orig/sdp_proto.h	2005-02-10 18:42:56.417024000 -0800
+++ drivers/infiniband/ulp/sdp/sdp_proto.h	2005-02-17 11:17:48.805008000 -0800
@@ -1,25 +1,36 @@
 /*
-  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_proto.h 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$
+ */
 
 #ifndef _SDP_PROTO_H
 #define _SDP_PROTO_H
@@ -34,9 +45,9 @@
 #include "sdp_iocb.h"
 #include "sdp_queue.h"
 
-/* --------------------------------------------------------------------- */
-/* Buffer managment                                                      */
-/* --------------------------------------------------------------------- */
+/*
+ * Buffer managment
+ */
 struct sdpc_buff *sdp_buff_pool_get(void);
 
 int sdp_buff_pool_put(struct sdpc_buff *buff);
@@ -115,9 +126,9 @@ int sdp_proc_dump_buff_pool(char *buffer
 			    off_t start_index,
 			    long *end_index);
 
-/* --------------------------------------------------------------------- */
-/* Wall between userspace protocol and SDP protocol proper               */
-/* --------------------------------------------------------------------- */
+/*
+ * Wall between userspace protocol and SDP protocol proper
+ */
 int sdp_wall_send_reject(struct sdp_opt *conn);
 
 int sdp_wall_send_close(struct sdp_opt *conn);
@@ -143,9 +154,10 @@ int sdp_wall_recv_drop(struct sdp_opt *c
 int sdp_wall_abort(struct sdp_opt *conn);
 
 int sdp_recv_buff(struct sdp_opt *conn, struct sdpc_buff *buff);
-/* --------------------------------------------------------------------- */
-/* Zcopy advertisment managment                                          */
-/* --------------------------------------------------------------------- */
+
+/*
+ * Zcopy advertisment managment
+ */
 int sdp_main_advt_init(void);
 
 int sdp_main_advt_cleanup(void);
@@ -167,9 +179,10 @@ struct sdpc_advt *sdp_advt_q_get(struct 
 struct sdpc_advt *sdp_advt_q_look(struct sdpc_advt_q *table);
 
 int sdp_advt_q_put(struct sdpc_advt_q *table, struct sdpc_advt *advt);
-/* --------------------------------------------------------------------- */
-/* Zcopy IOCB managment                                                  */
-/* --------------------------------------------------------------------- */
+
+/*
+ * Zcopy IOCB managment
+ */
 int sdp_main_iocb_init(void);
 
 int sdp_main_iocb_cleanup(void);
@@ -213,9 +226,10 @@ int sdp_iocb_complete(struct sdpc_iocb *
 int sdp_iocb_lock(struct sdpc_iocb *iocb);
 
 int sdp_iocb_unlock(struct sdpc_iocb *iocb);
-/* --------------------------------------------------------------------- */
-/* Generic object managment                                              */
-/* --------------------------------------------------------------------- */
+
+/*
+ * Generic object managment
+ */
 int sdp_desc_q_remove(struct sdpc_desc *element);
 
 struct sdpc_desc *sdp_desc_q_get_all(struct sdpc_desc_q *table);
@@ -265,15 +279,17 @@ int sdp_desc_q_destroy(struct sdpc_desc_
 int sdp_main_desc_init(void);
 
 int sdp_main_desc_cleanup(void);
-/* --------------------------------------------------------------------- */
-/* proc entry managment                                                  */
-/* --------------------------------------------------------------------- */
+
+/*
+ * proc entry managment
+ */
 int sdp_main_proc_init(void);
 
 int sdp_main_proc_cleanup(void);
-/* --------------------------------------------------------------------- */
-/* connection table                                                      */
-/* --------------------------------------------------------------------- */
+
+/*
+ * connection table
+ */
 int sdp_conn_table_init(int proto_family,
 			int conn_size,
 			int recv_post_max,
@@ -331,9 +347,10 @@ void sdp_inet_wake_recv(struct sock *sk,
 void sdp_inet_wake_error(struct sock *sk);
 
 void sdp_inet_wake_urg(struct sock *sk);
-/* --------------------------------------------------------------------- */
-/* port/queue managment                                                  */
-/* --------------------------------------------------------------------- */
+
+/*
+ * port/queue managment
+ */
 int sdp_inet_accept_q_put(struct sdp_opt *listen_conn,
 			  struct sdp_opt *accept_conn);
 
@@ -353,24 +370,24 @@ int sdp_inet_port_put(struct sdp_opt *co
 
 int sdp_inet_port_inherit(struct sdp_opt *parent, struct sdp_opt *child);
 
-/* --------------------------------------------------------------------- */
-/* active connect functions                                              */
-/* --------------------------------------------------------------------- */
+/*
+ * active connect functions
+ */
 int sdp_cm_connect(struct sdp_opt *conn);
 
 int sdp_cm_rep_handler(struct ib_cm_id *cm_id,
 		       struct ib_cm_event *event,
 		       struct sdp_opt *conn);
 
-/* --------------------------------------------------------------------- */
-/* passive connect functions                                             */
-/* --------------------------------------------------------------------- */
+/*
+ * passive connect functions
+ */
 int sdp_cm_req_handler(struct ib_cm_id *cm_id,
 		       struct ib_cm_event *event);
 
-/* --------------------------------------------------------------------- */
-/* post functions                                                        */
-/* --------------------------------------------------------------------- */
+/*
+ * post functions
+ */
 int sdp_cm_listen_start(struct sdev_root *dev_root);
 
 int sdp_cm_listen_stop(struct sdev_root *dev_root);
@@ -414,12 +431,13 @@ int sdp_send_ctrl_snk_cancel(struct sdp_
 
 int sdp_send_ctrl_snk_cancel_ack(struct sdp_opt *conn);
 
-/* --------------------------------------------------------------------- */
-/* inet functions                                                        */
-/* --------------------------------------------------------------------- */
-/* --------------------------------------------------------------------- */
-/* event functions                                                       */
-/* --------------------------------------------------------------------- */
+/*
+ * inet functions
+ */
+
+/*
+ * event functions
+ */
 int sdp_cq_event_locked(struct ib_wc *comp, struct sdp_opt *conn);
 
 void sdp_cq_event_handler(struct ib_cq *cq, void *arg);
@@ -435,9 +453,9 @@ int sdp_event_read(struct sdp_opt *conn,
 
 int sdp_event_write(struct sdp_opt *conn, struct ib_wc *comp);
 
-/* --------------------------------------------------------------------- */
-/* internal connection lock functions                                    */
-/* --------------------------------------------------------------------- */
+/*
+ * internal connection lock functions
+ */
 void sdp_conn_internal_lock(struct sdp_opt *conn, unsigned long *flags);
 
 void sdp_conn_internal_unlock(struct sdp_opt *conn);
@@ -446,9 +464,9 @@ void sdp_conn_internal_relock(struct sdp
 
 int sdp_conn_cq_drain(struct ib_cq *cq, struct sdp_opt *conn);
 
-/* --------------------------------------------------------------------- */
-/* DATA transport                                                        */
-/* --------------------------------------------------------------------- */
+/*
+ * DATA transport
+ */
 int sdp_inet_send(struct kiocb *iocb,
 		  struct socket *sock, 
 		  struct msghdr *msg,
@@ -465,9 +483,10 @@ int sdp_iocb_q_cancel_all_read(struct sd
 int sdp_iocb_q_cancel_all_write(struct sdp_opt *conn, ssize_t error);
 
 int sdp_iocb_q_cancel_all(struct sdp_opt *conn, ssize_t error);
-/* --------------------------------------------------------------------- */
-/* link address information                                              */
-/* --------------------------------------------------------------------- */
+
+/*
+ * link address information
+ */
 int sdp_link_path_lookup(u32 dst_addr,
 			 u32 src_addr,
 			 int bound_dev_if,
@@ -485,18 +504,20 @@ int sdp_link_path_lookup(u32 dst_addr,
 int sdp_link_addr_init(void);
 
 int sdp_link_addr_cleanup(void);
-/* --------------------------------------------------------------------- */
-/* Function types.                                                       */
-/* --------------------------------------------------------------------- */
+
+/*
+ * Function types
+ */
+
 /*
  * Event handling function, demultiplexed base on Message ID
  */
 typedef int (*sdp_event_cb_func)(struct sdp_opt *conn, 
 				 struct sdpc_buff *buff);
-/* --------------------------------------------------------------------- */
-/* trace macros.                                                         */
-/* --------------------------------------------------------------------- */
 
+/*
+ * trace macros
+ */
 extern int debug_level;
 #define __SDP_DEBUG_LEVEL 4
 
@@ -595,11 +616,14 @@ extern int debug_level;
 #define SDP_CHECK_NULL(value, result) \
         if (NULL == (value)) return (result);
 #endif
-/* --------------------------------------------------------------------- */
-/* Inline functions.                                                     */
-/* --------------------------------------------------------------------- */
-/* ====================================================================== */
-/*..__sdp_inet_write_space -- writable space on send side. */
+
+/*
+ * Inline functions
+ */
+
+/*
+ * __sdp_inet_write_space - writable space on send side
+ */
 static __inline__ int __sdp_inet_write_space(struct sdp_opt *conn, int urg)
 {
 	int size;
@@ -626,8 +650,9 @@ static __inline__ int __sdp_inet_write_s
 	}
 } /* __sdp_inet_write_space */
 
-/* ====================================================================== */
-/*..__sdp_inet_writable -- return non-zero if socket is writable. */
+/*
+ * __sdp_inet_writable - return non-zero if socket is writable
+ */
 static __inline__ int __sdp_inet_writable(struct sdp_opt *conn)
 {
 	SDP_CHECK_NULL(conn, -EINVAL);
@@ -643,8 +668,9 @@ static __inline__ int __sdp_inet_writabl
 	}
 } /* __sdp_inet_writable */
 
-/* ======================================================================== */
-/*..__sdp_conn_stat_dump -- dump stats to the log */
+/*
+ * __sdp_conn_stat_dump - dump stats to the log
+ */
 static __inline__ int __sdp_conn_stat_dump(struct sdp_opt *conn)
 {
 #ifdef _SDP_CONN_STATS_REC
@@ -668,8 +694,9 @@ static __inline__ int __sdp_conn_stat_du
 	return 0;
 } /* __sdp_conn_stat_dump */
 
-/* ======================================================================== */
-/*..__sdp_conn_state_dump -- dump state information to the log */
+/*
+ * __sdp_conn_state_dump - dump state information to the log
+ */
 static __inline__ int __sdp_conn_state_dump(struct sdp_opt *conn)
 {
 #ifdef _SDP_CONN_STATE_REC
@@ -700,15 +727,17 @@ static __inline__ int __sdp_conn_state_d
 	return 0;
 } /* __sdp_conn_state_dump */
 
-/* ======================================================================== */
-/*..__sdp_conn_hold -- increment reference count */
+/*
+ * __sdp_conn_hold - increment reference count
+ */
 static inline void __sdp_conn_hold(struct sdp_opt *conn)
 {
 	atomic_inc(&conn->refcnt);
 } /* __sdp_conn_hold */
 
-/* ======================================================================== */
-/*..__sdp_conn_put -- decrement reference count */
+/*
+ * __sdp_conn_put - decrement reference count
+ */
 static inline void __sdp_conn_put(struct sdp_opt *conn)
 {
 	if (atomic_dec_and_test(&conn->refcnt)) {
@@ -717,8 +746,9 @@ static inline void __sdp_conn_put(struct
 	}
 } /* __sdp_conn_hold */
 
-/* ======================================================================== */
-/*..__sdp_conn_error -- get the connections error value destructively. */
+/*
+ * __sdp_conn_error - get the connections error value destructively
+ */
 static inline int __sdp_conn_error(struct sdp_opt *conn)
 {
 	/*




More information about the general mailing list