[openib-general] [PATCH][SDP][24/33] Fix comment style in sdp_queue.c
Tom Duffy
Tom.Duffy at Sun.COM
Thu Feb 17 14:12:36 PST 2005
Signed-off-by: Tom Duffy <tduffy at sun.com>
--- drivers/infiniband/ulp/sdp-orig/sdp_queue.c 2005-02-10 18:42:57.120000000 -0800
+++ drivers/infiniband/ulp/sdp/sdp_queue.c 2005-02-17 11:21:40.495015000 -0800
@@ -1,37 +1,48 @@
/*
- 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_queue.c 620 2004-08-10 03:46:43Z 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_desc_table = NULL;
-/* --------------------------------------------------------------------- */
-/* */
-/* module specific functions */
-/* */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*.._sdp_desc_q_get - Get an element from a specific table */
+/*
+ * module specific functions
+ */
+
+/*
+ * _sdp_desc_q_get - Get an element from a specific table
+ */
static struct sdpc_desc *_sdp_desc_q_get(struct sdpc_desc_q *table,
int fifo)
{
@@ -76,8 +87,9 @@ static struct sdpc_desc *_sdp_desc_q_get
return element;
} /* _sdp_desc_q_get */
-/* ========================================================================= */
-/*.._sdp_desc_q_put - Place an element into a specific table */
+/*
+ * _sdp_desc_q_put - Place an element into a specific table
+ */
static __inline__ int _sdp_desc_q_put(struct sdpc_desc_q *table,
struct sdpc_desc *element,
int fifo)
@@ -120,13 +132,13 @@ static __inline__ int _sdp_desc_q_put(st
return 0;
} /* _sdp_desc_q_put */
-/* --------------------------------------------------------------------- */
-/* */
-/* public advertisment object functions for FIFO object table */
-/* */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*..sdp_desc_q_remove - remove a specific element from a table */
+/*
+ * public advertisment object functions for FIFO object table
+ */
+
+/*
+ * sdp_desc_q_remove - remove a specific element from a table
+ */
int sdp_desc_q_remove(struct sdpc_desc *element)
{
struct sdpc_desc_q *table;
@@ -168,8 +180,9 @@ int sdp_desc_q_remove(struct sdpc_desc *
return 0;
} /* sdp_desc_q_remove */
-/* ========================================================================= */
-/*..sdp_desc_q_lookup - search and return an element from the table */
+/*
+ * sdp_desc_q_lookup - search and return an element from the table
+ */
struct sdpc_desc *sdp_desc_q_lookup(struct sdpc_desc_q *table,
int (*lookup)(struct sdpc_desc *element,
void *arg),
@@ -193,8 +206,9 @@ struct sdpc_desc *sdp_desc_q_lookup(stru
return NULL;
} /* sdp_desc_q_lookup */
-/* ========================================================================= */
-/*..sdp_desc_q_get_all - Get the element at the front of the table */
+/*
+ * sdp_desc_q_get_all - Get the element at the front of the table
+ */
struct sdpc_desc *sdp_desc_q_get_all(struct sdpc_desc_q *table)
{
struct sdpc_desc *head;
@@ -209,38 +223,43 @@ struct sdpc_desc *sdp_desc_q_get_all(str
return head;
} /* sdp_desc_q_get_all */
-/* ========================================================================= */
-/*..sdp_desc_q_get_head - Get the element at the front of the table */
+/*
+ * sdp_desc_q_get_head - Get the element at the front of the table
+ */
struct sdpc_desc *sdp_desc_q_get_head(struct sdpc_desc_q *table)
{
return _sdp_desc_q_get(table, 1);
} /* sdp_desc_q_get_head */
-/* ========================================================================= */
-/*..sdp_desc_q_get_tail - Get the element at the end of the table */
+/*
+ * sdp_desc_q_get_tail - Get the element at the end of the table
+ */
struct sdpc_desc *sdp_desc_q_get_tail(struct sdpc_desc_q *table)
{
return _sdp_desc_q_get(table, 0);
} /* sdp_desc_q_get_tail */
-/* ========================================================================= */
-/*..sdp_desc_q_put_head - Place an element into the head of a table */
+/*
+ * sdp_desc_q_put_head - Place an element into the head of a table
+ */
int sdp_desc_q_put_head(struct sdpc_desc_q *table,
struct sdpc_desc *element)
{
return _sdp_desc_q_put(table, element, 1);
} /* sdp_desc_q_put_head */
-/* ========================================================================= */
-/*..sdp_desc_q_put_tail - Place an element into the tail of a table */
+/*
+ * sdp_desc_q_put_tail - Place an element into the tail of a table
+ */
int sdp_desc_q_put_tail(struct sdpc_desc_q *table,
struct sdpc_desc *element)
{
return _sdp_desc_q_put(table, element, 0);
} /* sdp_desc_q_put_tail */
-/* ========================================================================= */
-/*..sdp_desc_q_look_head - look at the front of the table */
+/*
+ * sdp_desc_q_look_head - look at the front of the table
+ */
struct sdpc_desc *sdp_desc_q_look_head(struct sdpc_desc_q *table)
{
SDP_CHECK_NULL(table, NULL);
@@ -248,8 +267,9 @@ struct sdpc_desc *sdp_desc_q_look_head(s
return table->head;
} /* sdp_desc_q_look_head */
-/* ========================================================================= */
-/*..sdp_desc_q_look_tail - look at the end of the table */
+/*
+ * sdp_desc_q_look_tail - look at the end of the table
+ */
struct sdpc_desc *sdp_desc_q_look_tail(struct sdpc_desc_q *table)
{
SDP_CHECK_NULL(table, NULL);
@@ -257,8 +277,9 @@ struct sdpc_desc *sdp_desc_q_look_tail(s
return ((NULL == table->head) ? NULL : table->head->prev);
} /* sdp_desc_q_look_tail */
-/* ========================================================================= */
-/*..sdp_desc_q_type_head - look at the type at the front of the table */
+/*
+ * sdp_desc_q_type_head - look at the type at the front of the table
+ */
int sdp_desc_q_type_head(struct sdpc_desc_q *table)
{
SDP_CHECK_NULL(table, -EINVAL);
@@ -273,8 +294,9 @@ int sdp_desc_q_type_head(struct sdpc_des
}
} /* sdp_desc_q_type_head */
-/* ========================================================================= */
-/*..sdp_desc_q_type_tail - look at the type at the end of the table */
+/*
+ * sdp_desc_q_type_tail - look at the type at the end of the table
+ */
int sdp_desc_q_type_tail(struct sdpc_desc_q *table)
{
SDP_CHECK_NULL(table, -EINVAL);
@@ -289,8 +311,9 @@ int sdp_desc_q_type_tail(struct sdpc_des
}
} /* sdp_desc_q_type_tail */
-/* ========================================================================= */
-/*..sdp_desc_q_look_type_head - look at a specific object */
+/*
+ * sdp_desc_q_look_type_head - look at a specific object
+ */
struct sdpc_desc *sdp_desc_q_look_type_head(struct sdpc_desc_q *table,
enum sdp_desc_type type)
{
@@ -306,8 +329,9 @@ struct sdpc_desc *sdp_desc_q_look_type_h
}
} /* sdp_desc_q_look_type_head */
-/* ========================================================================= */
-/*..sdp_desc_q_look_type_tail - look at the type at the end of the table */
+/*
+ * sdp_desc_q_look_type_tail - look at the type at the end of the table
+ */
struct sdpc_desc *sdp_desc_q_look_type_tail(struct sdpc_desc_q *table,
enum sdp_desc_type type)
{
@@ -324,8 +348,9 @@ struct sdpc_desc *sdp_desc_q_look_type_t
}
} /* sdp_desc_q_look_type_tail */
-/* ========================================================================= */
-/*..sdp_desc_q_types_size - return the number of elements in the table */
+/*
+ * sdp_desc_q_types_size - return the number of elements in the table
+ */
int sdp_desc_q_types_size(struct sdpc_desc_q *table,
enum sdp_desc_type type)
{
@@ -335,13 +360,13 @@ int sdp_desc_q_types_size(struct sdpc_de
table->count[type] : -ERANGE);
} /* sdp_desc_q_types_size */
-/* --------------------------------------------------------------------- */
-/* */
-/* public table functions */
-/* */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*..sdp_desc_q_create - create/allocate a generic table */
+/*
+ * public table functions
+ */
+
+/*
+ * sdp_desc_q_create - create/allocate a generic table
+ */
struct sdpc_desc_q *sdp_desc_q_create(int *result)
{
struct sdpc_desc_q *table = NULL;
@@ -364,8 +389,9 @@ struct sdpc_desc_q *sdp_desc_q_create(in
return table;
} /* sdp_desc_q_create */
-/* ========================================================================= */
-/*..sdp_desc_q_init - initialize a new empty generic table */
+/*
+ * sdp_desc_q_init - initialize a new empty generic table
+ */
int sdp_desc_q_init(struct sdpc_desc_q *table)
{
SDP_CHECK_NULL(table, -EINVAL);
@@ -378,8 +404,9 @@ int sdp_desc_q_init(struct sdpc_desc_q *
return 0;
} /* sdp_desc_q_init */
-/* ========================================================================= */
-/*..sdp_desc_q_clear - clear the contents of a generic table */
+/*
+ * sdp_desc_q_clear - clear the contents of a generic table
+ */
int sdp_desc_q_clear(struct sdpc_desc_q *table)
{
struct sdpc_desc *element;
@@ -401,8 +428,9 @@ int sdp_desc_q_clear(struct sdpc_desc_q
return 0;
} /* sdp_desc_q_clear */
-/* ========================================================================= */
-/*..sdp_desc_q_destroy - destroy a generic table */
+/*
+ * sdp_desc_q_destroy - destroy a generic table
+ */
int sdp_desc_q_destroy(struct sdpc_desc_q *table)
{
int result;
@@ -421,13 +449,13 @@ int sdp_desc_q_destroy(struct sdpc_desc_
return 0;
} /* sdp_desc_q_destroy */
-/* --------------------------------------------------------------------- */
-/* */
-/* primary initialization/cleanup functions */
-/* */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*..sdp_main_desc_init -- initialize the generic table caches. */
+/*
+ * primary initialization/cleanup functions
+ */
+
+/*
+ * sdp_main_desc_init - initialize the generic table caches
+ */
int sdp_main_desc_init(void)
{
int result;
@@ -456,8 +484,9 @@ error_advt_t:
return 0;
} /* sdp_main_desc_init */
-/* ========================================================================= */
-/*..sdp_main_desc_cleanup -- cleanup the generic table caches. */
+/*
+ * sdp_main_desc_cleanup - cleanup the generic table caches
+ */
int sdp_main_desc_cleanup(void)
{
sdp_dbg_init("Generic table cache cleanup.");
More information about the general
mailing list