[openib-general] [PATCH][SDP][4/33] Fix comment style in sdp_buff.c

Tom Duffy Tom.Duffy at Sun.COM
Thu Feb 17 14:09:11 PST 2005


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

--- drivers/infiniband/ulp/sdp-orig/sdp_buff.c	2005-02-11 08:02:05.883004000 -0800
+++ drivers/infiniband/ulp/sdp/sdp_buff.c	2005-02-17 10:27:46.250000000 -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_buff.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"
 
@@ -27,8 +38,10 @@ static struct sdpc_buff_root *main_pool 
 /*
  * data buffers managment API
  */
-/* ========================================================================= */
-/*.._sdp_buff_q_get - Get a buffer from a specific pool */
+
+/*
+ * _sdp_buff_q_get - Get a buffer from a specific pool
+ */
 static __inline__ struct sdpc_buff *_sdp_buff_q_get
 (
 	struct sdpc_buff_q *pool,
@@ -84,8 +97,9 @@ static __inline__ struct sdpc_buff *_sdp
 	return buff;
 } /* _sdp_buff_q_get */
 
-/* ========================================================================= */
-/*.._sdp_buff_q_put - Place a buffer into a specific pool */
+/*
+ * _sdp_buff_q_put - Place a buffer into a specific pool
+ */
 static __inline__ int _sdp_buff_q_put(struct sdpc_buff_q *pool,
 				      struct sdpc_buff *buff,
 				      int fifo)
@@ -124,8 +138,9 @@ static __inline__ int _sdp_buff_q_put(st
 	return 0;
 } /* _sdp_buff_q_put */
 
-/* ========================================================================= */
-/*.._sdp_buff_q_look - look at a buffer from a specific pool */
+/*
+ * _sdp_buff_q_look - look at a buffer from a specific pool
+ */
 static __inline__ struct sdpc_buff *_sdp_buff_q_look(struct sdpc_buff_q *pool,
 						     int fifo)
 {
@@ -141,8 +156,9 @@ static __inline__ struct sdpc_buff *_sdp
 	}
 } /* _sdp_buff_q_look */
 
-/* ========================================================================= */
-/*.._sdp_buff_q_remove - remove a specific buffer from a specific pool */
+/*
+ * _sdp_buff_q_remove - remove a specific buffer from a specific pool
+ */
 static __inline__ int _sdp_buff_q_remove(struct sdpc_buff_q *pool, 
 					 struct sdpc_buff *buff)
 {
@@ -186,8 +202,9 @@ static __inline__ int _sdp_buff_q_remove
 	return 0;
 } /* _sdp_buff_q_remove */
 
-/* ========================================================================= */
-/*..sdp_buff_q_init - Init a pool drawing its buffers from the main pool */
+/*
+ * sdp_buff_q_init - Init a pool drawing its buffers from the main pool
+ */
 int sdp_buff_q_init(struct sdpc_buff_q *pool, u32 size)
 {
 	int counter;
@@ -215,8 +232,9 @@ error:
 	return result;
 } /* sdp_buff_q_init */
 
-/* ========================================================================= */
-/*..sdp_buff_q_remove - remove a specific buffer from a specific pool */
+/*
+ * sdp_buff_q_remove - remove a specific buffer from a specific pool
+ */
 int sdp_buff_q_remove(struct sdpc_buff *buff)
 {
 	struct sdpc_buff_q *pool;
@@ -232,8 +250,9 @@ int sdp_buff_q_remove(struct sdpc_buff *
 	return result;
 } /* sdp_buff_q_remove */
 
-/* ========================================================================= */
-/*..sdp_buff_q_get - Get a buffer from a specific pool */
+/*
+ * sdp_buff_q_get - Get a buffer from a specific pool
+ */
 struct sdpc_buff *sdp_buff_q_get(struct sdpc_buff_q *pool)
 {
 	struct sdpc_buff *buff;
@@ -243,8 +262,9 @@ struct sdpc_buff *sdp_buff_q_get(struct 
 	return buff;
 } /* sdp_buff_q_get */
 
-/* ========================================================================= */
-/*..sdp_buff_q_get_head - Get the buffer at the front of the pool */
+/*
+ * sdp_buff_q_get_head - Get the buffer at the front of the pool
+ */
 struct sdpc_buff *sdp_buff_q_get_head(struct sdpc_buff_q *pool)
 {
 	struct sdpc_buff *buff;
@@ -254,8 +274,9 @@ struct sdpc_buff *sdp_buff_q_get_head(st
 	return buff;
 } /* sdp_buff_q_get_head */
 
-/* ========================================================================= */
-/*..sdp_buff_q_get_tail - Get the buffer at the end of the pool */
+/*
+ * sdp_buff_q_get_tail - Get the buffer at the end of the pool
+ */
 struct sdpc_buff *sdp_buff_q_get_tail(struct sdpc_buff_q *pool)
 {
 	struct sdpc_buff *buff;
@@ -265,8 +286,9 @@ struct sdpc_buff *sdp_buff_q_get_tail(st
 	return buff;
 } /* sdp_buff_q_get_tail */
 
-/* ========================================================================= */
-/*..sdp_buff_q_look_head - look at the buffer at the front of the pool */
+/*
+ * sdp_buff_q_look_head - look at the buffer at the front of the pool
+ */
 struct sdpc_buff *sdp_buff_q_look_head(struct sdpc_buff_q *pool)
 {
 	struct sdpc_buff *buff;
@@ -276,8 +298,9 @@ struct sdpc_buff *sdp_buff_q_look_head(s
 	return buff;
 } /* sdp_buff_q_look_head */
 
-/* ========================================================================= */
-/*..sdp_buff_q_look_tail - look at the buffer at the end of the pool */
+/*
+ * sdp_buff_q_look_tail - look at the buffer at the end of the pool
+ */
 struct sdpc_buff *sdp_buff_q_look_tail(struct sdpc_buff_q *pool)
 {
 	struct sdpc_buff *buff;
@@ -287,8 +310,9 @@ struct sdpc_buff *sdp_buff_q_look_tail(s
 	return buff;
 } /* sdp_buff_q_look_tail */
 
-/* ========================================================================= */
-/*..sdp_buff_q_fetch_head - Get the pools first buffer, if the test passes */
+/*
+ * sdp_buff_q_fetch_head - Get the pools first buffer, if the test passes
+ */
 struct sdpc_buff *sdp_buff_q_fetch_head(struct sdpc_buff_q *pool,
 					int (*test)(struct sdpc_buff *buff,
 						    void *arg),
@@ -301,8 +325,9 @@ struct sdpc_buff *sdp_buff_q_fetch_head(
 	return buff;
 } /* sdp_buff_q_fetch_head */
 
-/* ========================================================================= */
-/*..sdp_buff_q_fetch_tail - Get the pools last buffer, if the test passes */
+/*
+ * sdp_buff_q_fetch_tail - Get the pools last buffer, if the test passes
+ */
 struct sdpc_buff *sdp_buff_q_fetch_tail(struct sdpc_buff_q *pool,
 					int (*test)(struct sdpc_buff *buff,
 						    void *arg),
@@ -315,8 +340,9 @@ struct sdpc_buff *sdp_buff_q_fetch_tail(
 	return buff;
 } /* sdp_buff_q_fetch_tail */
 
-/* ========================================================================= */
-/*..sdp_buff_q_fetch - Get the first matching buffer from the pool */
+/*
+ * sdp_buff_q_fetch - Get the first matching buffer from the pool
+ */
 struct sdpc_buff *sdp_buff_q_fetch(struct sdpc_buff_q *pool,
 				   int (*test)(struct sdpc_buff *buff,
 					       void *arg),
@@ -356,8 +382,9 @@ struct sdpc_buff *sdp_buff_q_fetch(struc
 	return NULL;
 } /* sdp_buff_q_fetch_head */
 
-/* ========================================================================= */
-/*..sdp_buff_q_trav_tail - traverse buffers in pool,from the tail */
+/*
+ * sdp_buff_q_trav_tail - traverse buffers in pool,from the tail
+ */
 int sdp_buff_q_trav_tail(struct sdpc_buff_q *pool,
 			 int (*trav_func)(struct sdpc_buff *buff,
 					  void *arg),
@@ -390,8 +417,9 @@ int sdp_buff_q_trav_tail(struct sdpc_buf
 	return result;
 } /* sdp_buff_q_trav_tail */
 
-/* ========================================================================= */
-/*..sdp_buff_q_trav_head - traverse buffers in pool, from the head */
+/*
+ * sdp_buff_q_trav_head - traverse buffers in pool, from the head
+ */
 int sdp_buff_q_trav_head(struct sdpc_buff_q *pool,
 			 int (*trav_func)(struct sdpc_buff *buff,
 					  void *arg),
@@ -424,8 +452,9 @@ int sdp_buff_q_trav_head(struct sdpc_buf
 	return result;
 } /* sdp_buff_q_trav_head */
 
-/* ========================================================================= */
-/*..sdp_buff_q_put - Place a buffer into a specific pool */
+/*
+ * sdp_buff_q_put - Place a buffer into a specific pool
+ */
 int sdp_buff_q_put(struct sdpc_buff_q *pool,
 		   struct sdpc_buff *buff)
 {
@@ -436,8 +465,9 @@ int sdp_buff_q_put(struct sdpc_buff_q *p
 	return result;
 } /* sdp_buff_q_put */
 
-/* ========================================================================= */
-/*..sdp_buff_q_put_head - Place a buffer into the head of a specific pool */
+/*
+ * sdp_buff_q_put_head - Place a buffer into the head of a specific pool
+ */
 int sdp_buff_q_put_head(struct sdpc_buff_q *pool,
 			struct sdpc_buff *buff)
 {
@@ -448,8 +478,9 @@ int sdp_buff_q_put_head(struct sdpc_buff
 	return result;
 } /* sdp_buff_q_put_head */
 
-/* ========================================================================= */
-/*..sdp_buff_q_put_tail - Place a buffer into the tail of a specific pool */
+/*
+ * sdp_buff_q_put_tail - Place a buffer into the tail of a specific pool
+ */
 int sdp_buff_q_put_tail(struct sdpc_buff_q *pool,
 			struct sdpc_buff *buff)
 {
@@ -460,8 +491,9 @@ int sdp_buff_q_put_tail(struct sdpc_buff
 	return result;
 } /* sdp_buff_q_put_tail */
 
-/* ========================================================================= */
-/*..sdp_buff_q_clear_unmap - clear the buffers out of a specific buffer pool */
+/*
+ * sdp_buff_q_clear_unmap - clear the buffers out of a specific buffer pool
+ */
 int sdp_buff_q_clear_unmap(struct sdpc_buff_q *pool,
 			   struct device *dev,
 			   int direction)
@@ -491,14 +523,13 @@ int sdp_buff_q_clear_unmap(struct sdpc_b
 	return 0;
 } /* sdp_buff_q_clear */
 
-/* --------------------------------------------------------------------- */
-/*                                                                       */
-/* internal data buffer pool manager                                     */
-/*                                                                       */
-/* --------------------------------------------------------------------- */
+/*
+ * internal data buffer pool manager
+ */
 
-/* ========================================================================= */
-/*.._sdp_buff_pool_release -- release allocated buffers from the main pool */
+/*
+ * _sdp_buff_pool_release - release allocated buffers from the main pool
+ */
 static int _sdp_buff_pool_release(struct sdpc_buff_root *m_pool, int count)
 {
 	struct sdpc_buff *buff;
@@ -526,8 +557,9 @@ static int _sdp_buff_pool_release(struct
 	return 0;
 } /* _sdp_buff_pool_release */
 
-/* ========================================================================= */
-/*.._sdp_buff_pool_release_check -- check for buffer release from main pool */
+/*
+ * _sdp_buff_pool_release_check - check for buffer release from main pool
+ */
 static __inline__ int _sdp_buff_pool_release_check
 (
 	struct sdpc_buff_root *m_pool
@@ -556,8 +588,9 @@ static __inline__ int _sdp_buff_pool_rel
 	}
 } /* _sdp_buff_pool_release_check */
 
-/* ========================================================================= */
-/*.._sdp_buff_pool_alloc -- allocate more buffers for the main pool */
+/*
+ * _sdp_buff_pool_alloc - allocate more buffers for the main pool
+ */
 static int _sdp_buff_pool_alloc(struct sdpc_buff_root *m_pool)
 {
 	struct sdpc_buff *buff;
@@ -628,8 +661,9 @@ static int _sdp_buff_pool_alloc(struct s
 	return 0;
 } /* _sdp_buff_pool_alloc */
 
-/* ========================================================================= */
-/*..sdp_buff_pool_init - Initialize the main buffer pool of memory */
+/*
+ * sdp_buff_pool_init - Initialize the main buffer pool of memory
+ */
 int sdp_buff_pool_init(int buff_min, 
 		       int buff_max,
 		       int alloc_inc,
@@ -725,8 +759,9 @@ done:
 	return result;
 } /* sdp_buff_pool_init */
 
-/* ========================================================================= */
-/*..sdp_buff_pool_destroy - Destroy the main buffer pool and free its memory */
+/*
+ * sdp_buff_pool_destroy - Destroy the main buffer pool and free its memory
+ */
 void sdp_buff_pool_destroy(void)
 {
 	if (NULL == main_pool) {
@@ -764,8 +799,9 @@ void sdp_buff_pool_destroy(void)
 	return;
 } /* sdp_buff_pool_destroy */
 
-/* ========================================================================= */
-/*..sdp_buff_pool_get - Get a buffer from the main buffer pool */
+/*
+ * sdp_buff_pool_get - Get a buffer from the main buffer pool
+ */
 struct sdpc_buff *sdp_buff_pool_get(void)
 {
 	struct sdpc_buff *buff;
@@ -823,8 +859,9 @@ struct sdpc_buff *sdp_buff_pool_get(void
 	return buff;
 } /* sdp_buff_pool_get */
 
-/* ========================================================================= */
-/*..sdp_buff_pool_put - Return a buffer to the main buffer pool */
+/*
+ * sdp_buff_pool_put - Return a buffer to the main buffer pool
+ */
 int sdp_buff_pool_put(struct sdpc_buff *buff)
 {
 	unsigned long flags;
@@ -873,8 +910,9 @@ int sdp_buff_pool_put(struct sdpc_buff *
 	return 0;
 } /* sdp_buff_pool_put */
 
-/* ========================================================================= */
-/*..sdp_buff_pool_chain_link - create chain of buffers which can be returned */
+/*
+ * sdp_buff_pool_chain_link - create chain of buffers which can be returned
+ */
 int sdp_buff_pool_chain_link(struct sdpc_buff *head, struct sdpc_buff *buff)
 {
 	SDP_CHECK_NULL(main_pool, -EINVAL);
@@ -901,8 +939,9 @@ int sdp_buff_pool_chain_link(struct sdpc
 	return 0;
 } /* sdp_buff_pool_chain_link */
 
-/* ========================================================================= */
-/*..sdp_buff_pool_chain_put - Return a buffer to the main buffer pool */
+/*
+ * sdp_buff_pool_chain_put - Return a buffer to the main buffer pool
+ */
 int sdp_buff_pool_chain_put(struct sdpc_buff *buff, u32 count)
 {
 	unsigned long flags;
@@ -948,8 +987,9 @@ int sdp_buff_pool_chain_put(struct sdpc_
 	return 0;
 } /* sdp_buff_pool_chain_put */
 
-/* ========================================================================= */
-/*..sdp_buff_pool_size - number of elements in the main buffer pool */
+/*
+ * sdp_buff_pool_size - number of elements in the main buffer pool
+ */
 int sdp_buff_pool_size(void)
 {
 	unsigned long flags;
@@ -967,8 +1007,9 @@ int sdp_buff_pool_size(void)
 	return size;
 } /* sdp_buff_pool_size */
 
-/* ========================================================================= */
-/*..sdp_buff_pool_buff_size - return the size of buffers in the main pool */
+/*
+ * sdp_buff_pool_buff_size - return the size of buffers in the main pool
+ */
 int sdp_buff_pool_buff_size(void)
 {
 	int result;
@@ -985,8 +1026,9 @@ int sdp_buff_pool_buff_size(void)
 	return result;
 } /* sdp_buff_pool_buff_size */
 
-/* ========================================================================= */
-/*..sdp_proc_dump_buff_pool -- write the buffer pool stats to a file (/proc) */
+/*
+ * sdp_proc_dump_buff_pool - write the buffer pool stats to a file (/proc)
+ */
 int sdp_proc_dump_buff_pool(char *buffer,
 			    int   max_size,
 			    off_t start_index,




More information about the general mailing list