[openib-general] [PATCH][SDP][12/33] Fix comment style in sdp_iocb.c

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


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

--- drivers/infiniband/ulp/sdp-orig/sdp_iocb.c	2005-02-14 11:13:15.582961000 -0800
+++ drivers/infiniband/ulp/sdp/sdp_iocb.c	2005-02-17 12:21:44.892003000 -0800
@@ -1,42 +1,53 @@
 /*
-  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_iocb.c 696 2004-08-28 03:10:21Z 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"
 
 static kmem_cache_t *__sdp_iocb_cache = NULL;
 static kmem_cache_t *__sdp_iocb_table = NULL;
-/* --------------------------------------------------------------------- */
-/*                                                                       */
-/* memory locking functions                                              */
-/*                                                                       */
-/* --------------------------------------------------------------------- */
+
+/*
+ * memory locking functions
+ */
 #include <linux/utsname.h>
 
 typedef int (*do_mlock_ptr_t)(unsigned long, size_t, int);
 static do_mlock_ptr_t _mlock_ptr = NULL;
 
-/* ========================================================================= */
-/*.._sdp_iocb_unlock -- unlock the memory for an IOCB. */
+/*
+ * _sdp_iocb_unlock - unlock the memory for an IOCB
+ */
 static int _sdp_iocb_unlock(struct sdpc_iocb *iocb)
 {
 	struct vm_area_struct *vma;
@@ -91,8 +102,9 @@ static int _sdp_iocb_unlock(struct sdpc_
 	return 0;
 } /* _sdp_iocb_unlock */
 
-/* ========================================================================= */
-/*..sdp_iocb_unlock -- unlock the memory for an IOCB. */
+/*
+ * sdp_iocb_unlock - unlock the memory for an IOCB
+ */
 int sdp_iocb_unlock(struct sdpc_iocb *iocb)
 {
 	int result;
@@ -128,8 +140,9 @@ int sdp_iocb_unlock(struct sdpc_iocb *io
 	return result;
 } /* sdp_iocb_unlock */
 
-/* ========================================================================= */
-/*.._sdp_iocb_page_save -- save page information for an IOCB. */
+/*
+ * _sdp_iocb_page_save - save page information for an IOCB
+ */
 static int _sdp_iocb_page_save(struct sdpc_iocb *iocb)
 {
 	unsigned int counter;
@@ -241,8 +254,9 @@ err_addr:
 	return result;
 } /* _sdp_iocb_page_save */
 
-/* ========================================================================= */
-/*..sdp_iocb_lock -- lock the memory for an IOCB. */
+/*
+ * sdp_iocb_lock - lock the memory for an IOCB
+ */
 int sdp_iocb_lock(struct sdpc_iocb *iocb)
 {
 	struct vm_area_struct *vma;
@@ -367,11 +381,9 @@ err_lock:
 	return result;
 } /* sdp_iocb_lock */
 
-/* --------------------------------------------------------------------- */
-/*                                                                       */
-/* IOCB memory locking init functions                                    */
-/*                                                                       */
-/* --------------------------------------------------------------------- */
+/*
+ * IOCB memory locking init functions
+ */
 struct kallsym_iter
 {
   loff_t pos;
@@ -382,12 +394,10 @@ struct kallsym_iter
   char name[128];
 };
 
-/* ========================================================================= */
-/*.._sdp_mem_lock_init -- initialize the userspace memory locking. */
-static int _sdp_mem_lock_init
-(
- void
-)
+/*
+ * _sdp_mem_lock_init - initialize the userspace memory locking
+ */
+static int _sdp_mem_lock_init(void)
 {
 	struct file *kallsyms;
 	struct seq_file *seq;
@@ -436,12 +446,10 @@ done:
 	return ret;
 } /* _sdp_mem_lock_init */
 
-/* ========================================================================= */
-/*.._sdp_mem_lock_cleanup -- cleanup the memory locking tables. */
-static int _sdp_mem_lock_cleanup
-(
- void
-)
+/*
+ * _sdp_mem_lock_cleanup - cleanup the memory locking tables
+ */
+static int _sdp_mem_lock_cleanup(void)
 {
 	sdp_dbg_init("Memory Locking cleanup.");
 	/*
@@ -452,13 +460,13 @@ static int _sdp_mem_lock_cleanup
 	return 0;
 } /* _sdp_mem_lock_cleanup */
 
-/* --------------------------------------------------------------------- */
-/*                                                                       */
-/* IOCB memory registration functions                                    */
-/*                                                                       */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*..sdp_iocb_register -- register an IOCBs memory for advertisment */
+/*
+ * IOCB memory registration functions
+ */
+
+/*
+ * sdp_iocb_register - register an IOCBs memory for advertisment
+ */
 int sdp_iocb_register(struct sdpc_iocb *iocb, struct sdp_opt *conn)
 {
 	int result;
@@ -515,8 +523,9 @@ error:
 	return result;
 } /* sdp_iocb_register */
 
-/* ========================================================================= */
-/*..sdp_iocb_release -- unregister an IOCBs memory  */
+/*
+ * sdp_iocb_release - unregister an IOCBs memory
+ */
 int sdp_iocb_release(struct sdpc_iocb *iocb)
 {
 	int result;
@@ -540,8 +549,9 @@ int sdp_iocb_release(struct sdpc_iocb *i
 	return 0;
 } /* sdp_iocb_release */
 
-/* ========================================================================= */
-/*.._sdp_iocb_complete -- complete an IOCB for real in thread context */
+/*
+ * _sdp_iocb_complete - complete an IOCB for real in thread context
+ */
 static void _sdp_iocb_complete(void *arg)
 {
 	struct sdpc_iocb *iocb = (struct sdpc_iocb *)arg;
@@ -591,8 +601,9 @@ static void _sdp_iocb_complete(void *arg
 	return;
 } /* _sdp_iocb_complete */
 
-/* ========================================================================= */
-/*..sdp_iocb_complete -- complete an IOCB */
+/*
+ * sdp_iocb_complete - complete an IOCB
+ */
 int sdp_iocb_complete(struct sdpc_iocb *iocb, ssize_t status)
 {
 	SDP_CHECK_NULL(iocb, -EINVAL);
@@ -615,13 +626,13 @@ int sdp_iocb_complete(struct sdpc_iocb *
 	return 0;
 } /* sdp_iocb_complete */
 
-/* --------------------------------------------------------------------- */
-/*                                                                       */
-/* IOCB object managment                                                 */
-/*                                                                       */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*..sdp_iocb_q_remove - remove the object from the table */
+/*
+ * IOCB object managment
+ */
+
+/*
+ * sdp_iocb_q_remove - remove the object from the table
+ */
 int sdp_iocb_q_remove(struct sdpc_iocb *iocb)
 {
 	struct sdpc_iocb_q *table;
@@ -662,8 +673,9 @@ int sdp_iocb_q_remove(struct sdpc_iocb *
 	return 0;
 } /* sdp_iocb_q_remove */
 
-/* ========================================================================= */
-/*..sdp_iocb_q_lookup - find an iocb based on key, without removing */
+/*
+ * sdp_iocb_q_lookup - find an iocb based on key, without removing
+ */
 struct sdpc_iocb *sdp_iocb_q_lookup(struct sdpc_iocb_q *table, u32 key)
 {
 	struct sdpc_iocb *iocb = NULL;
@@ -684,8 +696,9 @@ struct sdpc_iocb *sdp_iocb_q_lookup(stru
 	return NULL;
 } /* sdp_iocb_q_lookup */
 
-/* ========================================================================= */
-/*..sdp_iocb_create - create an IOCB object */
+/*
+ * sdp_iocb_create - create an IOCB object
+ */
 struct sdpc_iocb *sdp_iocb_create(void)
 {
 	struct sdpc_iocb *iocb;
@@ -705,8 +718,9 @@ struct sdpc_iocb *sdp_iocb_create(void)
 	return iocb;
 } /* sdp_iocb_create */
 
-/* ========================================================================= */
-/*..sdp_iocb_destroy - destroy an IOCB object */
+/*
+ * sdp_iocb_destroy - destroy an IOCB object
+ */
 int sdp_iocb_destroy(struct sdpc_iocb *iocb)
 {
 	if (NULL == iocb) {
@@ -753,8 +767,9 @@ int sdp_iocb_destroy(struct sdpc_iocb *i
 	return 0;
 } /* sdp_iocb_destroy */
 
-/* ========================================================================= */
-/*..sdp_iocb_q_look - get, without removing, the object at the head */
+/*
+ * sdp_iocb_q_look - get, without removing, the object at the head
+ */
 struct sdpc_iocb *sdp_iocb_q_look(struct sdpc_iocb_q *table)
 {
 	SDP_CHECK_NULL(table, NULL);
@@ -762,8 +777,9 @@ struct sdpc_iocb *sdp_iocb_q_look(struct
 	return table->head;
 } /* sdp_iocb_q_look */
 
-/* ========================================================================= */
-/*..sdp_iocb_q_get_key - find an iocb based on key, and remove it */
+/*
+ * sdp_iocb_q_get_key - find an iocb based on key, and remove it
+ */
 struct sdpc_iocb *sdp_iocb_q_get_key(struct sdpc_iocb_q *table, u32 key)
 {
 	struct sdpc_iocb *iocb;
@@ -785,8 +801,9 @@ done:
 	return iocb;
 } /* sdp_iocb_q_get_key */
 
-/* ========================================================================= */
-/*.._sdp_iocb_q_get - get, and remove, the object at the tables head */
+/*
+ * _sdp_iocb_q_get - get, and remove, the object at the tables head
+ */
 static struct sdpc_iocb *_sdp_iocb_q_get(struct sdpc_iocb_q *table, int head)
 {
 	struct sdpc_iocb *iocb;
@@ -832,8 +849,9 @@ static struct sdpc_iocb *_sdp_iocb_q_get
 	return iocb;
 } /* _sdp_iocb_q_get */
 
-/* ========================================================================= */
-/*.._sdp_iocb_q_put - put the IOCB object at the tables tail */
+/*
+ * _sdp_iocb_q_put - put the IOCB object at the tables tail
+ */
 int _sdp_iocb_q_put(struct sdpc_iocb_q *table,
 			      struct sdpc_iocb *iocb,
 			      int head)
@@ -872,36 +890,41 @@ int _sdp_iocb_q_put(struct sdpc_iocb_q *
 	return 0;
 } /* _sdp_iocb_q_put */
 
-/* ========================================================================= */
-/*..sdp_iocb_q_get_tail - get an IOCB object from the tables tail */
+/*
+ * sdp_iocb_q_get_tail - get an IOCB object from the tables tail
+ */
 struct sdpc_iocb *sdp_iocb_q_get_tail(struct sdpc_iocb_q *table)
 {
 	return _sdp_iocb_q_get(table, 0);
 } /* sdp_iocb_q_get_tail */
 
-/* ========================================================================= */
-/*..sdp_iocb_q_get_head - get an IOCB object from the tables head */
+/*
+ * sdp_iocb_q_get_head - get an IOCB object from the tables head
+ */
 struct sdpc_iocb *sdp_iocb_q_get_head(struct sdpc_iocb_q *table)
 {
 	return _sdp_iocb_q_get(table, 1);
 } /* sdp_iocb_q_get_head */
 
-/* ========================================================================= */
-/*..sdp_iocb_q_put_tail - put the IOCB object at the tables tail */
+/*
+ * sdp_iocb_q_put_tail - put the IOCB object at the tables tail
+ */
 int sdp_iocb_q_put_tail(struct sdpc_iocb_q *table, struct sdpc_iocb *iocb)
 {
 	return _sdp_iocb_q_put(table, iocb, 0);
 } /* sdp_iocb_q_put_tail */
 
-/* ========================================================================= */
-/*..sdp_iocb_q_put_head - put the IOCB object at the tables head */
+/*
+ * sdp_iocb_q_put_head - put the IOCB object at the tables head
+ */
 int sdp_iocb_q_put_head(struct sdpc_iocb_q *table, struct sdpc_iocb *iocb)
 {
 	return _sdp_iocb_q_put(table, iocb, 1);
 } /* sdp_iocb_q_put_head */
 
-/* ========================================================================= */
-/*..sdp_iocb_q_cancel -- cancel all outstanding AIOs in a queue */
+/*
+ * sdp_iocb_q_cancel - cancel all outstanding AIOs in a queue
+ */
 int sdp_iocb_q_cancel(struct sdpc_iocb_q *table,
 		      u32     mask,
 		      ssize_t comp)
@@ -942,13 +965,13 @@ int sdp_iocb_q_cancel(struct sdpc_iocb_q
 	return 0;
 } /* sdp_iocb_q_cancel */
 
-/* --------------------------------------------------------------------- */
-/*                                                                       */
-/* public table functions                                                */
-/*                                                                       */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*..sdp_iocb_q_create - create an IOCB table */
+/*
+ * public table functions
+ */
+
+/*
+ * sdp_iocb_q_create - create an IOCB table
+ */
 struct sdpc_iocb_q *sdp_iocb_q_create(int *result)
 {
 	struct sdpc_iocb_q *table = NULL;
@@ -967,8 +990,9 @@ struct sdpc_iocb_q *sdp_iocb_q_create(in
 	return table;
 } /* sdp_iocb_q_create */
 
-/* ========================================================================= */
-/*..sdp_iocb_q_init - initialize a new empty IOCB table */
+/*
+ * sdp_iocb_q_init - initialize a new empty IOCB table
+ */
 int sdp_iocb_q_init(struct sdpc_iocb_q *table)
 {
 	SDP_CHECK_NULL(table, -EINVAL);
@@ -979,8 +1003,9 @@ int sdp_iocb_q_init(struct sdpc_iocb_q *
 	return 0;
 } /* sdp_iocb_q_init */
 
-/* ========================================================================= */
-/*..sdp_iocb_q_clear - clear the contents of an IOCB table */
+/*
+ * sdp_iocb_q_clear - clear the contents of an IOCB table
+ */
 int sdp_iocb_q_clear(struct sdpc_iocb_q *table)
 {
 	struct sdpc_iocb *iocb;
@@ -999,8 +1024,9 @@ int sdp_iocb_q_clear(struct sdpc_iocb_q 
 	return 0;
 } /* sdp_iocb_q_clear */
 
-/* ========================================================================= */
-/*..sdp_iocb_q_destroy - destroy an IOCB table */
+/*
+ * sdp_iocb_q_destroy - destroy an IOCB table
+ */
 int sdp_iocb_q_destroy(struct sdpc_iocb_q *table)
 {
 	int result;
@@ -1019,13 +1045,13 @@ int sdp_iocb_q_destroy(struct sdpc_iocb_
 	return 0;
 } /* sdp_iocb_q_destroy */
 
-/* --------------------------------------------------------------------- */
-/*                                                                       */
-/* primary initialization/cleanup functions                              */
-/*                                                                       */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*..sdp_main_iocb_init -- initialize the advertisment caches. */
+/*
+ * primary initialization/cleanup functions
+ */
+
+/*
+ * sdp_main_iocb_init - initialize the advertisment caches
+ */
 int sdp_main_iocb_init(void)
 {
 	int result;
@@ -1079,8 +1105,9 @@ error_iocb_c:
 	return result;
 } /* sdp_main_iocb_init */
 
-/* ========================================================================= */
-/*..sdp_main_iocb_cleanup -- cleanup the advertisment caches. */
+/*
+ * sdp_main_iocb_cleanup - cleanup the advertisment caches
+ */
 int sdp_main_iocb_cleanup(void)
 {
 	sdp_dbg_init("IOCB cache cleanup.");




More information about the general mailing list