[openib-general] [PATCH][SDP][2/22] Whitespace cleanup in sdp_advt.c
Tom Duffy
Tom.Duffy at Sun.COM
Fri Feb 18 16:44:43 PST 2005
Signed-off-by: Tom Duffy <tduffy at sun.com>
Index: linux-2.6.10-openib/drivers/infiniband/ulp/sdp/sdp_advt.c
===================================================================
--- linux-2.6.10-openib/drivers/infiniband/ulp/sdp/sdp_advt.c (revision 1836)
+++ linux-2.6.10-openib/drivers/infiniband/ulp/sdp/sdp_advt.c (working copy)
@@ -53,7 +53,6 @@ struct sdpc_advt *sdp_advt_create(void)
advt = kmem_cache_alloc(__sdp_advt_cache, SLAB_KERNEL);
if (NULL != advt) {
-
advt->next = NULL;
advt->prev = NULL;
advt->size = 0;
@@ -75,10 +74,8 @@ int sdp_advt_destroy(struct sdpc_advt *a
{
SDP_CHECK_NULL(advt, -EINVAL);
- if (NULL != advt->next || NULL != advt->prev) {
-
+ if (NULL != advt->next || NULL != advt->prev)
return -EACCES;
- }
/*
* return the object to its cache
*/
@@ -99,17 +96,12 @@ struct sdpc_advt *sdp_advt_q_get(struct
SDP_CHECK_NULL(table, NULL);
advt = table->head;
- if (NULL == advt) {
-
+ if (NULL == advt)
return NULL;
- }
-
- if (advt->next == advt && advt->prev == advt) {
+ if (advt->next == advt && advt->prev == advt)
table->head = NULL;
- }
else {
-
next = advt->next;
prev = advt->prev;
next->prev = prev;
@@ -148,13 +140,11 @@ int sdp_advt_q_put(struct sdpc_advt_q *t
SDP_CHECK_NULL(advt, -EINVAL);
if (NULL == table->head) {
-
advt->next = advt;
advt->prev = advt;
table->head = advt;
}
else {
-
next = table->head;
prev = next->prev;
@@ -195,7 +185,6 @@ int sdp_advt_q_clear(struct sdpc_advt_q
* drain the table of any objects
*/
while (NULL != (advt = sdp_advt_q_get(table))) {
-
result = sdp_advt_destroy(advt);
SDP_EXPECT(!(0 > result));
}
@@ -219,7 +208,6 @@ int sdp_main_advt_init(void)
* initialize the caches only once.
*/
if (NULL != __sdp_advt_cache) {
-
sdp_warn("Advertisment caches already initialized.");
return -EINVAL;
}
@@ -229,7 +217,6 @@ int sdp_main_advt_init(void)
0, SLAB_HWCACHE_ALIGN, NULL,
NULL);
if (NULL == __sdp_advt_cache) {
-
result = -ENOMEM;
goto error_advt_c;
}
More information about the general
mailing list